rip路由协议的配置命令

rip路由协议的配置命令,第1张

相关调试命令 :
show ip protocol
show ip route
在全局设置模式下:
1.启动RIP路由
router rip
2.配置RIP路由协议的路由的子网
network 子网地址
3.允许在非广播型网络中进行RIP路由广播
neighbor 相邻路由器相邻端口的IP地址
4.配置RIP路由协议的版本
RIP路由协议有2个版本,在与其它厂商路由器相连时,注意版本要一致,缺省状态下,Cisco路由器接收RIP版本1和2的路由信息,但只发送版本1的路由信息,设置RIP的版本vesion 1或2另外,还可以控制特定端口发送或接收特定版本的路由信息。

实验步骤: 1 R1上的配置:Router>Router>enRouter#conf tRouter(config)#host r1r1(config)#int e0r1(config-if)#ip add 1721611 2552552550r1(config-if)#no shutdown r1(config-if)#exitr1(config)#int s0r1(config-if)#ip add 1721621 2552552550r1(config-if)#no shutdown r1(config-if)#clock rate 56000r1(config-if)#no shutdown r1(config-if)#exitr1(config)#router ripr1(config-router)#net 1721600r1(config-router)#^Z RIP协议启用前的路由表r1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, - candidate default U - per-user static route Gateway of last resort is not setC 1721610/24 is directly connected, Ethernet0C 1721620/24 is directly connected, Serial0RIP协议启用后的路由表r1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, - candidate default U - per-user static route Gateway of last resort is not setC 1721610/24 is directly connected, Ethernet0C 1721620/24 is directly connected, Serial0R 1721630/24 [120/1] via 1721622, 00:01:37, Serial0R 1721640/24 [120/1] via 1721622, 00:07:21, Serial0R 1721650/24 [120/2] via 1721622, 00:05:21, Serial0 2 R2上的配置:Router>Router>enRouter#conf tRouter(config)#host r2r2(config)#int s1r2(config-if)#ip add 1721622 2552552550r2(config-if)#no shutdown r2(config-if)#exitr2(config)#int s0r2(config-if)#ip add 1721640 2552552550r2(config-if)#ip add 1721641 2552552550r2(config-if)#clock rate 56000r2(config-if)#no shutdown r2(config-if)#exitr2(config)#int e0r2(config-if)#ip add 1721631 2552552550r2(config-if)#no shutdown r2(config-if)#exitr2(config)#router ripr2(config-router)#net 1721600r2(config-router)#^Z r2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, - candidate default U - per-user static route Gateway of last resort is not setC 1721620/24 is directly connected, Serial1C 1721630/24 is directly connected, Ethernet0C 1721640/24 is directly connected, Serial0R 1721610/24 [120/1] via 1721621, 00:09:13, Serial1R 1721650/24 [120/1] via 1721642, 00:09:13, Serial0 3 R3上的配置:Router>Router>enRouter#conf tRouter(config)#int s1Router(config-if)#ip add 1721642 2552552550Router(config-if)#no shutdown Router(config-if)#exitRouter(config)#int e0Router(config-if)#ip add 1721651 2552552550Router(config-if)#no shutdown Router(config-if)#exitRouter(config)#host r3r3(config)#r3(config)#router ripr3(config-router)#net 1721600r3(config-router)#^Z r3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, - candidate default U - per-user static route Gateway of last resort is not setC 1721640/24 is directly connected, Serial1C 1721650/24 is directly connected, Ethernet0R 1721610/24 [120/1] via 1721641, 00:05:32, Serial1R 1721620/24 [120/1] via 1721641, 00:08:19, Serial1R 1721630/24 [120/1] via 1721641, 00:05:32, Serial1 4 测试:r1#r1#pingProtocol [ip]:Target IP address: 1721652Repeat count [5]: Datagram size [100]: Timeout in seconds [2]:Extended commands [n]: Type escape sequence to abortSending 5, 100-byte ICMP Echos to 1721652, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms PC 上的配置为:PC1:IP为1721612 网关:1721611PC2:IP为1721632 网关:1721631PC3:IP为1721652 网关:1721651

rip+自己定义的序号,像“rip 1“、”rip 2”这样,然后把使用rip的端口号加进来,默认是ripv1协议,就是默认自然网络而不能发送变长掩码例如A类地址101921680默认加入的网络是10000,ripv2支持变长,也就是101921680可以被整个记录不被吃掉,启动ripv2要多一句“version 2”,然后就network 端口网络号/端口地址

使用命令配置清单:
R#conf t
R#(config)#router rip
R#(config-router)#version 2
R#(config-router)^Z
R#
这样就启用了RIPv2版本。
你可以象RIPv1版本一样配置路由。

1、创建RIP进程并进入RIP视图
[Router] rip [ process-id ]
2、在指定网段接口上使能RIP
[Router-rip-1] network network-address [ wildcard-mask ]
3、配置接口工作在抑制状态
[Router-rip-1] silent-interface { interface-type interface-number | all }
4、使能RIP水平分割功能
[Router-Ethernet1/0] rip split-horizon
5、使能RIP毒性逆转功能
[Router-Ethernet1/0] rip poison-reverse
6、指定全局RIP版本
[Router-rip-1] version { 1 | 2 }
7、关闭RIPv2自动路由聚合功能
[Router-rip-1] undo summary
8、配置RIPv2报文的认证
[Router-Ethernet1/0] rip authentication-mode { md5 { rfc2082 { cipher cipher-string | plain plain-string } key-id | rfc2453 { cipher cipher-string | plain plain-string } } | simple { cipher cipher-string | plain plain-string } }

1、如果是RIP V1的话,NETWORK 网络地址 (注意,V1是不支持Classless,就是它是有类路由,按照A、B、C、E类网络进行分类,不使用掩码,比如 network 19216810 那么它发布的就是一个C类的网络,即隐含了2552552550这个掩码)
2、如果是RIP V2的话,NETWORK 网络地址 反码(这个就和OSPF一样了,比如network 19216810 0003 就表示发布19216810/30这个网络)

router
rip进入rip进程,然后用network
+
网络号进行宣告,version
2改成版本二用来支持不连续子网,no
autosummary用来防止自动汇总,这几条命令下来rip就完全可以正常运行了。其他的比如passive
interface根据需要配置,具体得看需求。

这个看什么品牌的路由啊,以思科为例吧,锐捷一样
enable /进特权模式
config terminal /进全局配置模式
router rip /进路由RIP配置接口
network xxxxxxxxxxxx /指定想要参加RIP运算的接口的网络号(不加掩码)
no auto-summary /关闭自动汇总
version 2 /指定用RIP V2版本运行,V1版太古老了,基本不用,不支持VLSM
常用这么配置就能通了,回到特权模式show ip rotue看到路由表正常就没问题了,
至于关闭水平分割,配置毒化时间等其他调优得根据具体需要具体配置。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/13114210.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-30
下一篇 2023-05-30

发表评论

登录后才能评论

评论列表(0条)

保存