试验环境说明
:
R1
的
ip
地址为
10.1.1
.1 (S0/0)
网络掩码为
255.255.255.0
R2
的
ip
地址为
10.1.1 . 2 (S0/0) 10.2.2 .2
(
S0/1
)
网络掩码为
255.255.255.0
R3
的
ip
地址为
10.2.2 .3 (S0/1)
网络掩码为
255.255.255.0
R1
的
S0/0 R2
的
S0/1
为
DCE
端
试验要求:在路由器间配置
RIPv2
使路由器间相互
ping
通。
下面开始试验(红色字体为配置内容)
R1
Router>en
Router#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#host r1
r1(config)#int s0/0
r1(config-if)#ip addr 10.1.1 .1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#clock rate 64000
r1(config-if)#exit
r1(config)#router rip
r1(config-router)#ver 2
r1(config-router)#network 10.0.0 .0
R2
Router>en
Router#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#host r2
r2(config)#int s0/0
r2(config-if)#ip addr 10.1.1 .2 255.255.255.0
r2(config-if)#no shut
r2(config-if)#exit
r2(config)#int s0/1
r2(config-if)#ip addr 192.168.1.1 255.255.255.0
r2(config-if)#clock rate 64000
r2(config-if)#no shut
r2(config-if)#exit
r2(config)#router rip
r2(config-router)#ver 2
r2(config-router)#network 10.0.0 .0
r2(config-router)#network 192.168.1.0
R3
Router>en
Router#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#host r3
r3(config)#int s0/1
r3(config-if)#ip addr 192.168.1.2 255.255.255.0
r3(config-if)#no shut
r3(config-if)#exit
r3(config)#router rip
r3(config-router)#ver 2
r3(config-router)#network 192.168.1.0
在路由器
R1 R2 R3
上
show ip route
查看路由表信息
R1
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
10.0.0 .0/24 is subnetted, 1 subnets
C 10.1.1 .0 is directly connected, Serial0/0
R 192.168.1.0/24 [120/1] vi a 10.1.1 .2, 00:00:54, Serial0/0
R2
r2#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
10.0.0 .0/24 is subnetted, 1 subnets
C 10.1.1 .0 is directly connected, Serial0/0
C 192.168.1.0/24 is directly connected, Serial0/1
R3
r3>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
R 10.0.0 .0/8 [120/1] via 192.168.1.1, 00:00:15, Serial0/1
C 192.168.1.0/24 is directly connected, Serial0/1
在路由器
R1
上
show ip protocols
查看路由协议
如下内容所示
路由器之间通讯协议为
rip
r1#show ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 10 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Serial0/0 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0 .0
Routing Information Sources:
Gateway Distance Last Update
10.1.1 .2 120 00:00:16
Distance: (default is 120)
在
R1
上对
R3 R4
进行
ping
测试,如下所示,全部
ping
通啦
r1#ping 10.1.1 .2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1 .2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/402/576 ms
r1#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 140/258/500 ms
r1#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 356/548/860 ms
OK
试验成功