R1配置
接口IP配置
r1(config)#int lo0
r1(config-if)#ip add 1.1.1.1 255.255.255.0
r1(config-if)#int lo1
r1(config-if)#ip add 172.17.0.1 255.255.255.0
r1(config-if)#int lo2
r1(config-if)#ip add 172.16.2.1 255.255.255.0
r1(config-if)#int lo3
r1(config-if)#ip add 172.16.1.1 255.255.255.0
r1(config-if)#int s1/2
r1(config-if)#ip add 172.16.3.1 255.255.255.0
r1(config-if)#no sh
启动RIP协议
r1(config)#router rip
r1(config-router)#net 1.1.1.1
r1(config-router)#net 172.17.0.1
r1(config-router)#net 172.16.1.1
r1(config-router)#exit
R2配置
接口ip配置
r2(config)#int lo0
r2(config-if)#ip add 2.2.2.2 255.255.255.0
r2(config-if)#int lo1
r2(config-if)#ip add 172.17.1.2 255.255.255.0
r2(config-if)#int s2/1
r2(config-if)#ip add 172.16.3.2 255.255.255.0
启动协议
r2(config)#router rip
r2(config-router)#net 2.2.2.2
r2(config-router)#net 172.17.1.2
r2(config-router)#net 172.16.3.2
r2(config-router)#exit
在r2上打开debug看现象
r2#sh ip route
Codes: C �C connected, S �C static, I �C IGRP, R �C RIP, M �C mobile, B �C BGP
D �C EIGRP, EX �C EIGRP external, O �C OSPF, IA �C OSPF inter area
N1 �C OSPF NSSA external type 1, N2 �C OSPF NSSA external type 2
E1 �C OSPF external type 1, E2 �C OSPF external type 2, E �C EGP
i �C IS-IS, L1 �C IS-IS level-1, L2 �C IS-IS level-2, * �C candidate default
U �C per-user static route, o �C ODR
T �C traffic engineered route
Gateway of last resort is not set
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
172.17.0.0/24 is subnetted, 1 subnets
C 172.17.1.0 is directly connected, Loopback1
r2#
00:09:01: RIP: sending v1 update to 255.255.255.255 via Loopback0 (2.2.2.2)
00:09:01: network 172.17.0.0, metric 1
00:09:01: RIP: sending v1 update to 255.255.255.255 via Loopback1 (172.17.1.2)
00:09:01: network 2.0.0.0, metric 1
r2#
00:09:26: RIP: sending v1 update to 255.255.255.255 via Loopback0 (2.2.2.2)
00:09:26: network 172.17.0.0, metric 1
00:09:26: RIP: sending v1 update to 255.255.255.255 via Loopback1 (172.17.1.2)
00:09:26: network 2.0.0.0, metric 1
没有学习到路由
在r1上调试
r1#clear ip route *
r1#
00:10:16: RIP: sending general request on Loopback0 to 255.255.255.255
00:10:16: RIP: sending general request on Loopback0 to 224.0.0.9
00:10:16: RIP: sending general request on Loopback1 to 255.255.255.255
00:10:16: RIP: sending general request on Loopback1 to 224.0.0.9
00:10:16: RIP: sending general request on Loopback2 to 255.255.255.255
00:10:16: RIP: sending general request on Loopback2 to 224.0.0.9
00:10:16: RIP: sending general request on Loopback3 to 255.255.255.255
00:10:16: RIP: sending general request on Loopback3 to 224.0.0.9
00:10:16: RIP: ignored v2 packet from 1.1.1.1 (sourced from one of our addresses)
00:10:16: RIP: ignored v2 packet from 172.17.0.1 (sourced from one of our addresses)
00:10:16: RIP: ignored v2 packet from 172.16.2.1 (sourced from one of our addresses)
00:10:16: RIP: ignored v2 packet from 172.16.1.1 (sourced from one of our addresses)