4.3.1 实验 4:RIPv2 基本配置
1.实验目的
通过本实验可以掌握:
(1)在路由器上启动 RIPv2 路由进程
(2)启用参与路由
协议
离婚协议模板下载合伙人协议 下载渠道分销协议免费下载敬业协议下载授课协议下载
的接口,并且通告网络
(3)auto-summary 的开启和关闭
(4)查看和调试 RIPv2 路由协议相关信息
2.拓扑结构
实验拓扑如图 4-1 所示。
3.实验步骤
(1)步骤 1:配置路由器 R1
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 1.0.0.0
R1(config-router)#network 192.168.12.0
(2)步骤 2:配置路由器 R2
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
(3)步骤 3:配置路由器 R3
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.34.0
(4)步骤 4:配置路由器 R4
R4(config)#router rip
R4(config-router)#version 2
R4(config-router)#no auto-summary
R4(config-router)#network 192.168.34.0
R4(config-router)#network 4.0.0.0
4.实验调试
(1) show ip route
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
C 192.168.12.0/24 is directly connected, Serial0/0/0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R 4.4.4.0/24 [120/3] via 192.168.12.2, 00:00:22, Serial0/0/0
R 192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:22, Serial0/0/0
R 192.168.34.0/24 [120/2] via 192.168.12.2, 00:00:22, Serial0/0/0
从上面输出的路由条目“4.4.4.0/24”,可以看到 RIPv2 路由更新是携带子网信息的。
(2)show ip protocols
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 19 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/0 2 2
Loopback0 2 2
// RIPv2 默认情况下只接收和发送版本 2 的路由更新
【提示】
可以通过命令“ip rip send version”和“ip rip receive version”来控制在路由
器接口上接收和发送的版本,例如在 s0/0/0 接口上接收版本 1 和 2 的路由更新,但是只发
送版本 2 的路由更新,配置如下:
R1(config-if)#ip rip send version 2
R1(config-if)#ip rip receive version 1 2
【注意】
接口特性是优于进程特性的,对于本实验,虽然在 RIP 进程中配置了“version 2” ,
但是如果在接口上配置了“ip rip receive version 1 2” ,则该接口可以接收版本 1 和
2 的路由更新。
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
1.0.0.0
192.168.12.0
Routing Information Sources:
Gateway Distance Last Update
192.168.12.2 120 00:00:26
Distance: (default is 120)