1. 程式人生 > >2-高級路由:RIP路由匯總

2-高級路由:RIP路由匯總

ip route nag direct summary type 高級 ets 命令 RoCE

一、實驗拓撲:
技術分享圖片
二、命令部署:
R1(config)#int f0/0
R1(config-if)#no shutdown
R1(config-if)#ip add 12.1.1.1 255.255.255.0

R1(config)#int lo1
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#int lo2
R1(config-if)#ip add 172.16.2.1 255.255.255.0
R1(config-if)#int lo3
R1(config-if)#ip add 172.16.3.1 255.255.255.0

R1(config)#router rip

R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 12.1.1.1
R1(config-router)#network 172.16.1.1
R1(config-router)#network 172.16.2.1
R1(config-router)#network 172.16.3.1

R2(config)#int f0/0
R2(config-if)#no shutdown
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config)#int f0/1

R2(config-if)#no shutdown
R2(config-if)#ip add 23.1.1.2 255.255.255.0

R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 12.1.1.2
R2(config-router)#network 23.1.1.2

R3(config)#int f0/0
R3(config-if)#no shutdown
R3(config-if)#ip add 23.1.1.3 255.255.255.0

R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 23.1.1.3
註意:router rip 中不能有no auto-summary命令
三、驗證:
1、未部署匯總前,都是單獨的:
R3#show ip route
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, FastEthernet0/0
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/2] via 23.1.1.2, 00:00:24, FastEthernet0/0
R 172.16.2.0 [120/2] via 23.1.1.2, 00:00:24, FastEthernet0/0
R 172.16.3.0 [120/2] via 23.1.1.2, 00:00:24, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
R 12.1.1.0 [120/1] via 23.1.1.2, 00:00:24, FastEthernet0/0

2、部署匯總命令後:
R1(config)#int f0/0
R1(config-if)#ip summary-address rip 172.16.0.0 255.255.0.0
R3#clear ip route *
R3#show ip rip database

①以下為自動匯總結果:
R3#show ip route
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, FastEthernet0/0
R 172.16.0.0/16 [120/2] via 23.1.1.2, 00:00:20, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
R 12.1.1.0 [120/1] via 23.1.1.2, 00:00:20, FastEthernet0/0

R3#show ip rip database
12.0.0.0/8 auto-summary
12.0.0.0/8
[1] via 23.1.1.2, 00:00:09, FastEthernet0/0
12.1.1.0/24
[1] via 23.1.1.2, 00:01:59, FastEthernet0/0
23.0.0.0/8 auto-summary
23.1.1.0/24 directly connected, FastEthernet0/0
172.16.0.0/16 auto-summary
172.16.0.0/16
[1] via 23.1.1.2, 00:00:09, FastEthernet0/0
②以下為手工匯總結果:
技術分享圖片

技術分享圖片

2-高級路由:RIP路由匯總