IGP-LAB-RIP-3
- 2020 年 1 月 13 日
- 筆記
RIPv2基本配置
1.實驗目的
通過實驗掌握:
(1)在路由器上啟動RIPv2路由進程
(2)啟用參與路由協議的接口,並且通告網絡
(3)auto-summary的開啟和關閉
(4)查看和調試RIPv2路由協議相關信息
2.拓撲結構

R0:
R0(config)#int lo0
R0(config-if)#ip add 1.1.1.1 255.255.255.0
R0(config-if)#no sh
R0(config-if)#int s0/0
R0(config-if)#ip add 12.1.1.1 255.255.255.0
R0(config-if)#clo r 64000
R0(config-if)#no sh
R0(config-if)#exit
R0(config)#router rip
R0(config-router)#v 2
R0(config-router)#network 1.0.0.0
R0(config-router)#network 12.0.0.0
R0(config-router)#no auto-summary //關閉自動匯總
R1:
R1(config)#int lo0
R1(config-if)#ip add 2.2.2.2 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int s0/1
R1(config-if)#ip add 12.1.1.2 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int s0/0
R1(config-if)#ip add 13.1.1.1 255.255.255.0
R1(config-if)#clo r 64000
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#v 2
R1(config-router)#no auto-summary
R1(config-router)#network 12.0.0.0
R1(config-router)#network 13.0.0.0
R1(config-router)#network 2.0.0.0
R2:
R2(config)#int lo0
R2(config-if)#ip add 3.3.3.3 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s0/1
R2(config-if)#ip add 13.1.1.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#v 2
R2(config-router)#no auto-summary
R2(config-router)#network 13.0.0.0
R2(config-router)#network 3.0.0.0
4.實驗調試
(1) show ip route
R0#sh ip ro
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
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
R 2.2.2.0 [120/1] via 12.1.1.2, 00:00:09, Serial0/0
3.0.0.0/24 is subnetted, 1 subnets
R 3.3.3.0 [120/2] via 12.1.1.2, 00:00:09, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/0
13.0.0.0/24 is subnetted, 1 subnets
R 13.1.1.0 [120/1] via 12.1.1.2, 00:00:09, Serial0/0
(2)show ip protocols
R0#sh ip pro
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 11 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
Loopback0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
1.0.0.0
12.0.0.0
Routing Information Sources:
Gateway Distance Last Update
12.1.1.2 120 00:00:21
Distance: (default is 120)
// RIPv2默認情況下只接收和發送版本2的路由更新
注意:
可以通過命令「ip rip send version」和「ip rip receive version」來控制在路由器接口上接收和發送的版本。
例如在s0/0接口上接收版本1和2的路由更新,但是只發送版本2的路由更新,配置如下:
R0(config-if)#ip rip send version 2
R0(config-if)#ip rip receive version 1 2
接口特性是優於進程特性的,雖然在RIP進程中配置了「version 2」 , 但是如果在接口上配置了「ip rip receive version 1 2」 ,則該接口可以接收版本1和 2的路由更新。