RIP路由选择基础实验
实验目的
使用RIP协议配置此拓扑,保证全网连通性。
初始配置
第一步 在R1上根据拓扑进行初始配置
R1(config)#interface loopback 0
R1(config-if)#ip address
R1(config-if)#interface s1/2
R1(config-if)#ip address
R1(config-if)#no shutdown
R1(config-if)#interface s1/3
R1(config-if)#ip address
R1(config-if)#no shutdown
R1(config-if)#end
第二步 在R2上根据拓扑进行初始配置。
R2(config)#interface s2/1
R2(config-if)#no shutdown
R2(config-if)#ip address
R2(config-if)#interface loopback 0
R2(config-if)#ip address
R2(config-if)#interface loopback 1
R2(config-if)#ip address 172.16.1.2 255.255.255.0
R2(config-if)#end
进行直连接口的ping测试
R2#ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max =
第三步 在R3上根据拓扑进行初始配置
R3(config)#interface s3/1
R3(config-if)#no shutdown
R3(config-if)#ip address
R3(config-if)#interface loopback 0
R3(config-if)#ip address
R3(config-if)#interface loopback 1
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#end
R3#
进行直连接口的ping测试
R3#ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max =
实验过程
第一步 配置RIP协议
R1(config)#router rip
R1(config-router)#network
R1(config-router)#network
R1(config-router)#^Z
R1#
R2(config)#router rip
R2(config-router)#network 172.16.0.0
R2(config-router)#network
R2(config-router)#network
R2(config-router)#^Z
R2#
R3(config)#router rip
R3(config-router)#network
R3(config-router)#network 192.168.1.0
R3(config-router)#network
R3(config-router)#^Z
R3#
第二步 检查RIP协议的运行情况
R1#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 11 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Key-chain
Serial1/2 1 1 2
Serial1/3 1 1 2
Loopback0 1 1 2
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 120)
第三步 查看RIP协议运行正常后的路由表情况
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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, * - candidate default
U - per-user static route, o - ODR
T - traffic engineered route
Gateway of last resort is not set
C
R
R
R 172.16.0.0/16 [120/1] vi
C
C
R 192.168.1.0/24 [120/1] vi
第四步 在R1上进行RIP调试
R1#debug ip rip
RIP protocol debugging is on
01:49:11: RIP: sending v1 update to 255.255.255.255 via Serial1/2 (
01:49:11: subnet
01:49:11: network
01:49:11: network
01:49:11: network 192.168.1.0, metric 2
01:49:11: RIP: sending v1 update to 255.255.255.255 via Serial1/3 (
01:49:11: subnet
01:49:11: network
01:49:11: network
01:49:11: network 172.16.0.0, metric 2
01:49:11: RIP: sending v1 update to 255.255.255.255 via Loopback0 (
01:49:11: network
01:49:11: network
01:49:11: network 172.16.0.0, metric 2
01:49:11: network
01:49:11: network 192.168.1.0, metric 2
R1#
01:49:13: RIP: received v1 update from
01:49:13:
01:49:13: 172.16.
R1#
01:49:25: RIP: received v1 update from
01:49:25:
01:49:25: 192.168.
R1#
第五步 查看R2上路由表和R3上路由表
R2上的路由表
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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, * - candidate default
U - per-user static route, o - ODR
T - traffic engineered route
Gateway of last resort is not set
R
C
R
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Loopback1
R
C
R 192.168.1.0/24 [120/2] vi
R3上的路由表
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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, * - candidate default
U - per-user static route, o - ODR
T - traffic engineered route
Gateway of last resort is not set
R
R
C
R 172.16.0.0/16 [120/2] vi
C
R
C 192.168.1.0/24 is directly connected, Loopback1
第六步 假设R3上的192.168.1.0接口down掉
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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, * - candidate default
U - per-user static route, o - ODR
T - traffic engineered route
Gateway of last resort is not set
C
R
R
R 172.16.0.0/16 [120/1] vi
C
C
R 192.168.1.0/24 is possibly down, routing vi
192.168.1.0路由条目显示possibly down。
在R1上测试
R1#ping 192.168.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
R2上路由表
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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, * - candidate default
U - per-user static route, o - ODR
T - traffic engineered route
Gateway of last resort is not set
R
C
R
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Loopback1
R
C
R 192.168.1.0/24 is possibly down, routing vi
R3上路由表
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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, * - candidate default
U - per-user static route, o - ODR
T - traffic engineered route
Gateway of last resort is not set
R
R
C
R 172.16.0.0/16 [120/2] vi
C
R
浙公网安备 33010602011771号