RIPV1的基本配置
1、 实验目的:
通过本次的实验,我们可以掌握以下技能:
1) 在路由器上启用RIPV1路由进程。
2) 启用参与路由协议的接口,并且通告出去。
3) 理解路由表的含义。
4) 查看和调试RIPv1路由协议的相关信息。
2、 实验拓扑图:
clip_image002
3、 实验步骤:
(1) 根据拓扑图标示配置各个路由器接口地址
R1(config-if)#interface loopback 0
R1(config-if)#ip ad
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 2/0
R1(config-if)#ip ad
R1(config-if)#ip address 192.168.1.1 255.255.255.252
R1(config-if)#cl
R1(config-if)#clock r
R1(config-if)#clock rate 128000
R1(config-if)#no sh
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname R2
R2(config)#int
R2(config)#interface s
R2(config)#interface serial 2/0
R2(config-if)#ip ad
R2(config-if)#ip address 192.168.1.2 255.255.255.252
R2(config-if)#no sh
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
R2(config-if)#exit
R2(config)#int
R2(config)#interface se
R2(config)#interface serial 3/0
R2(config-if)#clock r
R2(config-if)#clock rate 128000
R2(config-if)#ip ad
R2(config-if)#ip address 192.168.2.1 255.255.255.252
R2(config-if)#no sh
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
Router(config)#hostname R3
R3(config)#int
R3(config)#interface s
R3(config)#interface serial 3/0
R3(config-if)#ipa d
R3(config-if)#ip ad
R3(config-if)#ip address 192.168.2.2 255.255.255.252
R3(config-if)#no sh
R3(config-if)#no shutdown
R3(config)#interface s
R3(config)#interface serial 2/0
R3(config-if)#ip address 192.168.3.1 255.255.255.252
R3(config-if)#cl
R3(config-if)#clock r
R3(config-if)#clock rate 128000
R3(config-if)#no sh
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#
R4(config-if)#interface loopback 0
R4(config-if)#ip ad
R4(config-if)#ip address 4.4.4.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#inr
R4(config)#int
R4(config)#interface s
R4(config)#interface serial 2/0
R4(config-if)#ip ad
R4(config-if)#ip address 192.168.3.2 255.255.255.252
R4(config-if)#no shutdown
(2) 在各个路由器上启用RIPV1,并将网络通告出去
R1(config)#router r
R1(config)#router rip
R1(config-router)#ve
R1(config-router)#version 1
R1(config-router)#ne
R1(config-router)#network 192.168.1.0
R1(config-router)#ne
R1(config-router)#network 1.0.0.0
R1(config-router)#
R2(config)#rou
R2(config)#router r
R2(config)#router rip
R2(config-router)#ve
R2(config-router)#version 1
R2(config-router)#ne
R2(config-router)#network 192.168.1.0
R2(config-router)#ne
R2(config-router)#network 192.168.2.0
R2(config-router)#
R3(config)#router r
R3(config)#router rip
R3(config-router)#ver
R3(config-router)#version 1
R3(config-router)#ne
R3(config-router)#network 192.168.2.0
R3(config-router)#ne
R3(config-router)#network 192.168.3.0
R3(config-router)#
R4(config)#route r
R4(config)#route rip
R4(config-router)#ve
R4(config-router)#version 1
R4(config-router)#ne
R4(config-router)#network 192.168.3.0
R4(config-router)#ne
R4(config-router)#network 4.0.0.0
R4(config-router)#
(3) 查看各路由表情况
R1#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
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
R 4.0.0.0/8 [120/3] via 192.168.1.2, 00:00:16, Serial2/0
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, Serial2/0
R 192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:16, Serial2/0
R 192.168.3.0/24 [120/2] via 192.168.1.2, 00:00:16, Serial2/0
R1#
R2#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 1.0.0.0/8 [120/1] via 192.168.1.1, 00:00:28, Serial2/0
R 4.0.0.0/8 [120/2] via 192.168.2.2, 00:00:01, Serial3/0
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, Serial2/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:01, Serial3/0
R2#
R3#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 1.0.0.0/8 [120/2] via 192.168.2.1, 00:00:27, Serial3/0
R 4.0.0.0/8 [120/1] via 192.168.3.2, 00:00:03, Serial2/0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:27, Serial3/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
192.168.3.0/30 is subnetted, 1 subnets
C 192.168.3.0 is directly connected, Serial2/0
R3#
R4#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 1.0.0.0/8 [120/3] via 192.168.3.1, 00:00:29, Serial2/0
4.0.0.0/24 is subnetted, 1 subnets
C 4.4.4.0 is directly connected, Loopback0
R 192.168.1.0/24 [120/2] via 192.168.3.1, 00:00:29, Serial2/0
R 192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:29, Serial2/0
192.168.3.0/30 is subnetted, 1 subnets
C 192.168.3.0 is directly connected, Serial2/0
R4#
注意:前面带有R标记的表明已经通过RIP学习到了!!
(4) 测试配置情况
R1#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 93/93/94 ms
R1#
R4#
R4#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 78/87/94 ms
R4#
由此可以看出我们已经能够ping同lo地址了。成功的标志是出现一串!!!!!。
OK 实验完成!!!!!!!