动态路由距离矢量路由协议RIP

动态路由距离矢量路由协议RIP
rip不能关闭自动汇总,rip2可以关闭自动汇总(可以有反掩码作为通配符匹配指定的一组ip)
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no aut
R1(config-router)#no auto-summary

R1连接R2连接R3
R1 ip192.168.12.1   R2 ip192.168.12.2,192.168.23.2  R3 ip192.168.23.3,lo:3.3.3.3 255.255.255.0

R1(config)#int s0/0
R1(config-if)#ip add 192.168.12.1 255.255.255.0
R1(config-if)#no shut
R1(config)#router rip
R1(config-router)#network 192.168.12.0
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.12.0/24 is directly connected, Serial0/0
R    3.0.0.0/8 [120/2] via 192.168.12.2, 00:00:07, Serial0/0
R    192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:07, Serial0/0
上面的[120/1] 1表示本路由器到达该目的网络的跳数,120表示管理距离(AD值)

R2(config)#int s0/0
R2(config-if)#ip add 192.168.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int s0/1
R2(config-if)#ip add 192.168.23.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0

R3(config)#int s0/0
R3(config-if)#ip add 192.168.23.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int loopback 0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#no shut
R3(config)#router rip
R3(config-router)#network 192.168.23.0
R3(config-router)#network 3.0.0.0
R3(config-router)#end
R3#ping 192.168.12.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/101/128 ms

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值