拓扑:
R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
ip address 1.1.2.1 255.255.255.0
!
interface Loopback2
ip address 1.1.3.1 255.255.255.0
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
ip address 1.1.2.1 255.255.255.0
!
interface Loopback2
ip address 1.1.3.1 255.255.255.0
interface Serial2/1
ip address 12.1.1.2 255.255.255.252
serial restart-delay 0
clock rate 64000
!
interface Serial2/2
ip address 13.1.1.2 255.255.255.252
serial restart-delay 0
clock rate 64000
ip address 12.1.1.2 255.255.255.252
serial restart-delay 0
clock rate 64000
!
interface Serial2/2
ip address 13.1.1.2 255.255.255.252
serial restart-delay 0
clock rate 64000
router eigrp 200
network 0.0.0.0
no auto-summary
network 0.0.0.0
no auto-summary
R2:
interface Serial2/1
ip address 12.1.1.1 255.255.255.252
serial restart-delay 0
interface Serial2/1
ip address 12.1.1.1 255.255.255.252
serial restart-delay 0
router eigrp 200
network 0.0.0.0
no auto-summary
network 0.0.0.0
no auto-summary
R3:
interface Serial2/2
ip address 13.1.1.1 255.255.255.252
serial restart-delay 0
interface Serial2/2
ip address 13.1.1.1 255.255.255.252
serial restart-delay 0
router eigrp 200
network 0.0.0.0
no auto-summary
network 0.0.0.0
no auto-summary
汇总前R1的路由表:
R1#show ip route
1.0.0.0/24 is subnetted, 3 subnets
C 1.1.1.0 is directly connected, Loopback0
C 1.1.2.0 is directly connected, Loopback1
C 1.1.3.0 is directly connected, Loopback2
12.0.0.0/30 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial2/1
13.0.0.0/30 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial2/2
R1#show ip route
1.0.0.0/24 is subnetted, 3 subnets
C 1.1.1.0 is directly connected, Loopback0
C 1.1.2.0 is directly connected, Loopback1
C 1.1.3.0 is directly connected, Loopback2
12.0.0.0/30 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial2/1
13.0.0.0/30 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial2/2
汇总前R2的路由表:
R2#show ip rou
1.0.0.0/24 is subnetted, 3 subnets
D 1.1.1.0 [90/2297856] via 12.1.1.2, 00:02:01, Serial2/1
D 1.1.2.0 [90/2297856] via 12.1.1.2, 00:02:01, Serial2/1
D 1.1.3.0 [90/2297856] via 12.1.1.2, 00:02:01, Serial2/1
12.0.0.0/30 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial2/1
13.0.0.0/30 is subnetted, 1 subnets
D 13.1.1.0 [90/2681856] via 12.1.1.2, 00:02:01, Serial2/1
R2#show ip rou
1.0.0.0/24 is subnetted, 3 subnets
D 1.1.1.0 [90/2297856] via 12.1.1.2, 00:02:01, Serial2/1
D 1.1.2.0 [90/2297856] via 12.1.1.2, 00:02:01, Serial2/1
D 1.1.3.0 [90/2297856] via 12.1.1.2, 00:02:01, Serial2/1
12.0.0.0/30 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial2/1
13.0.0.0/30 is subnetted, 1 subnets
D 13.1.1.0 [90/2681856] via 12.1.1.2, 00:02:01, Serial2/1
汇总前R3的路由表:
R3#show ip route
1.0.0.0/24 is subnetted, 3 subnets
D 1.1.1.0 [90/2297856] via 13.1.1.2, 00:02:03, Serial2/2
D 1.1.2.0 [90/2297856] via 13.1.1.2, 00:02:03, Serial2/2
D 1.1.3.0 [90/2297856] via 13.1.1.2, 00:02:03, Serial2/2
12.0.0.0/30 is subnetted, 1 subnets
D 12.1.1.0 [90/2681856] via 13.1.1.2, 00:02:03, Serial2/2
13.0.0.0/30 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial2/2
R3#show ip route
1.0.0.0/24 is subnetted, 3 subnets
D 1.1.1.0 [90/2297856] via 13.1.1.2, 00:02:03, Serial2/2
D 1.1.2.0 [90/2297856] via 13.1.1.2, 00:02:03, Serial2/2
D 1.1.3.0 [90/2297856] via 13.1.1.2, 00:02:03, Serial2/2
12.0.0.0/30 is subnetted, 1 subnets
D 12.1.1.0 [90/2681856] via 13.1.1.2, 00:02:03, Serial2/2
13.0.0.0/30 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial2/2
对于每台路由器,路由条目太多,CPU负担太重,影响网络质量
可以在R1上选择手工汇总,来减少在R2和R3上得到的路由条目
在R1上有1.1.1.0/24 到1.1.3.0/24,把第三个字节化成二进制
具体汇总如下:
1 00000001
2 00000010
3 00000011
得到一个22位的掩码255.255.252.0
在R1的s2/1和s2/2接口下进行路由手动汇总
R1(config-if)#int s 2/1
R1(config-if)#ip summary-address eigrp 200 1.1.1.0 255.255.252.0
R1(config-if)#int s 2/2
R1(config-if)#ip summary-address eigrp 200 1.1.1.0 255.255.252.0
R1(config-if)#end
可以在R1上选择手工汇总,来减少在R2和R3上得到的路由条目
在R1上有1.1.1.0/24 到1.1.3.0/24,把第三个字节化成二进制
具体汇总如下:
1 00000001
2 00000010
3 00000011
得到一个22位的掩码255.255.252.0
在R1的s2/1和s2/2接口下进行路由手动汇总
R1(config-if)#int s 2/1
R1(config-if)#ip summary-address eigrp 200 1.1.1.0 255.255.252.0
R1(config-if)#int s 2/2
R1(config-if)#ip summary-address eigrp 200 1.1.1.0 255.255.252.0
R1(config-if)#end
汇总后R2的路由表:
R2#show ip rou
1.0.0.0/22 is subnetted, 1 subnets
D 1.1.0.0 [90/2297856] via 12.1.1.2, 00:00:00, Serial2/1
12.0.0.0/30 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial2/1
13.0.0.0/30 is subnetted, 1 subnets
D 13.1.1.0 [90/2681856] via 12.1.1.2, 00:00:00, Serial2/1
汇总后R3的路由表:
R3#show ip rou
1.0.0.0/22 is subnetted, 1 subnets
D 1.1.0.0 [90/2297856] via 13.1.1.2, 00:00:25, Serial2/2
12.0.0.0/30 is subnetted, 1 subnets
D 12.1.1.0 [90/2681856] via 13.1.1.2, 00:05:21, Serial2/2
13.0.0.0/30 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial2/2
R3#show ip rou
1.0.0.0/22 is subnetted, 1 subnets
D 1.1.0.0 [90/2297856] via 13.1.1.2, 00:00:25, Serial2/2
12.0.0.0/30 is subnetted, 1 subnets
D 12.1.1.0 [90/2681856] via 13.1.1.2, 00:05:21, Serial2/2
13.0.0.0/30 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial2/2
汇总后R1的路由表:
R1#show ip rou
1.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
D 1.1.0.0/22 is a summary, 00:00:47, Null0
C 1.1.1.0/24 is directly connected, Loopback0
C 1.1.2.0/24 is directly connected, Loopback1
C 1.1.3.0/24 is directly connected, Loopback2
12.0.0.0/30 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial2/1
13.0.0.0/30 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial2/2
R1#show ip rou
1.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
D 1.1.0.0/22 is a summary, 00:00:47, Null0
C 1.1.1.0/24 is directly connected, Loopback0
C 1.1.2.0/24 is directly connected, Loopback1
C 1.1.3.0/24 is directly connected, Loopback2
12.0.0.0/30 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial2/1
13.0.0.0/30 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, Serial2/2
汇总后的默认管理距离为5,接口做汇总的时候可以手动更改
总结:
通过汇总来,减轻CPU的负担,减少路由条目
通过汇总来,减轻CPU的负担,减少路由条目
注意:
本地有明细/汇总路由,从做汇总的接口发出汇总路由。
直到明细的最后一条路由消失,汇总才会消失。
汇总路由的metric值会取最小的metric值
本地有明细/汇总路由,从做汇总的接口发出汇总路由。
直到明细的最后一条路由消失,汇总才会消失。
汇总路由的metric值会取最小的metric值
转载于:https://blog.51cto.com/net361/146801