实验来源:工大瑞普Cisco网络技术论坛
1.按照拓扑上的要求,配置好各个接口的IP地址;
2.在每台路由器上配置RIP协议:
3.使用ping命令验证3台路由器之间的连通性,我们这里略。
4.查看路由信息:
5.查看相关路由协议信息,例R1:
6.调试,例R1:
这里我们发现在Loopback0口也发送了广播消息,如果我们不想让Loopback0发送广播,我们就要用到passive-interface的命令来设置被动接口(有关passive-interface解释点击
这里),例R1:
然后我们再在R1上debug看一下:
在这里我们找不到有关Loopback0口的信息了。
OK,实验完。
![](../p_w_upload/200706/200706101181468141796.gif)
说明:我们这里的连线方式和拓扑上的不太一样,具体连线方式为:
Router1 S1/0 <----> Router2 S1/0
Router3 S1/1 <----> Router2 S1/1
Router1 S1/0 <----> Router2 S1/0
Router3 S1/1 <----> Router2 S1/1
2.在每台路由器上配置RIP协议:
Router1:
Router(config)#router rip
Router(config-router)#network 172.16.1.0
Router(config-router)#network 10.0.0.0
Router2:
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router3:
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#network 192.168.1.0
Router(config)#router rip
Router(config-router)#network 172.16.1.0
Router(config-router)#network 10.0.0.0
Router2:
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router3:
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#network 192.168.1.0
3.使用ping命令验证3台路由器之间的连通性,我们这里略。
4.查看路由信息:
Router1:
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 2 subnets
R 10.2.2.0 [120/1] via 10.1.1.2, 00:00:25, Serial1/0
C 10.1.1.0 is directly connected, Serial1/0
R 192.168.1.0/24 [120/2] via 10.1.1.2, 00:00:25, Serial1/0
Router2:
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
R 172.16.0.0/16 [120/1] via 10.1.1.1, 00:00:07, Serial1/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.2.2.0 is directly connected, Serial1/1
C 10.1.1.0 is directly connected, Serial1/0
R 192.168.1.0/24 [120/1] via 10.2.2.2, 00:00:08, Serial1/1
Router3:
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
R 172.16.0.0/16 [120/2] via 10.2.2.1, 00:00:13, Serial1/1
10.0.0.0/24 is subnetted, 2 subnets
R 10.1.1.0 [120/1] via 10.2.2.1, 00:00:13, Serial1/1
C 10.2.2.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 2 subnets
R 10.2.2.0 [120/1] via 10.1.1.2, 00:00:25, Serial1/0
C 10.1.1.0 is directly connected, Serial1/0
R 192.168.1.0/24 [120/2] via 10.1.1.2, 00:00:25, Serial1/0
Router2:
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
R 172.16.0.0/16 [120/1] via 10.1.1.1, 00:00:07, Serial1/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.2.2.0 is directly connected, Serial1/1
C 10.1.1.0 is directly connected, Serial1/0
R 192.168.1.0/24 [120/1] via 10.2.2.2, 00:00:08, Serial1/1
Router3:
Router#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
R 172.16.0.0/16 [120/2] via 10.2.2.1, 00:00:13, Serial1/1
10.0.0.0/24 is subnetted, 2 subnets
R 10.1.1.0 [120/1] via 10.2.2.1, 00:00:13, Serial1/1
C 10.2.2.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
Router#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 22 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Serial1/0 1 1 2
Loopback0 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
172.16.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.1.2 120 00:00:11
Distance: (default is 120)
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 22 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Serial1/0 1 1 2
Loopback0 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
172.16.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.1.2 120 00:00:11
Distance: (default is 120)
Router#debug ip rip
RIP protocol debugging is on
Router#
00:05:15: RIP: received v1 update from 10.1.1.2 on Serial1/0
00:05:15: 10.2.2.0 in 1 hops
00:05:15: 192.168.1.0 in 2 hops
00:05:24: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (10.1.1.1)
00:05:24: RIP: build update entries
00:05:24: network 172.16.0.0 metric 1
00:05:24: RIP: sending v1 update to 255.255.255.255 via Loopback0 (172.16.1.1)
00:05:24: RIP: build update entries
00:05:24: network 10.0.0.0 metric 1
00:05:24: network 192.168.1.0 metric 3
RIP protocol debugging is on
Router#
00:05:15: RIP: received v1 update from 10.1.1.2 on Serial1/0
00:05:15: 10.2.2.0 in 1 hops
00:05:15: 192.168.1.0 in 2 hops
00:05:24: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (10.1.1.1)
00:05:24: RIP: build update entries
00:05:24: network 172.16.0.0 metric 1
00:05:24: RIP: sending v1 update to 255.255.255.255 via Loopback0 (172.16.1.1)
00:05:24: RIP: build update entries
00:05:24: network 10.0.0.0 metric 1
00:05:24: network 192.168.1.0 metric 3
Router(config)#router rip
Router(config-router)# passive-interface loopback 0
Router(config-router)# passive-interface loopback 0
Router#debug ip rip
RIP protocol debugging is on
Router#
00:17:58: RIP: received v1 update from 10.1.1.2 on Serial1/0
00:17:58: 10.2.2.0 in 1 hops
00:17:58: 192.168.1.0 in 2 hops
00:17:59: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (10.1.1.1)
00:17:59: RIP: build update entries
00:17:59: network 172.16.0.0 metric 1
RIP protocol debugging is on
Router#
00:17:58: RIP: received v1 update from 10.1.1.2 on Serial1/0
00:17:58: 10.2.2.0 in 1 hops
00:17:58: 192.168.1.0 in 2 hops
00:17:59: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (10.1.1.1)
00:17:59: RIP: build update entries
00:17:59: network 172.16.0.0 metric 1
OK,实验完。
转载于:https://blog.51cto.com/loveme23/29536