IGP-LAB-RIP-3

2023-01-31 01:01:57 IGP

 

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的路由更新。
 

相关文章