|
网络拓扑图 Cisco允许对地址进行汇总,以通过限制区域间通告的路由来达到节省资源的目的。Cisco路由器支持两种类型的地址汇总:区域间汇总和外部路由汇总。区域间汇总用于在区域间汇总地址,而外部汇总用于收集到某个域中的一系列外部路由的汇总。
[pre]// R1 //int e0/0 ip ad 192.1.1.1 255.255.255.252router os 1 network 192.1.1.1 0.0.0.0 area 1[/pre] |
[pre]// R2 //int e0/0 ip ad 192.1.1.2 255.255.255.252int e1/0 ip ad 193.1.1.2 255.255.255.128int lo0 ip ad 193.1.1.129 255.255.255.192router os 1 network 192.1.1.2 0.0.0.0 area 1 network 193.1.1.2 0.0.0.0 area 0 network 193.1.1.129 0.0.0.0 area 0[/pre] |
[pre]// R3 //int e1/0 ip ad 193.1.1.3 255.255.255.128int e0/0 ip ad 194.1.1.1 255.255.255.252int lo0 ip ad 193.1.1.193 255.255.255.192router os 1 network 193.1.1.193 0.0.0.0 area 0 network 193.1.1.3 0.0.0.0 area 0 network 194.1.1.1 0.0.0.0 area 2[/pre] |
[pre]// R4 //int e0/0 ip ad 194.1.1.2 255.255.255.252int e1/0 ip ad 130.1.4.4 255.255.255.0router os 1 network 194.1.1.2 0.0.0.0 area 2router rip network 130.1.0.0[/pre] |
[pre]// R5 //int e1/0 ip ad 130.1.4.5 255.255.255.0int lo1 ip ad 130.1.1.1 255.255.255.0int lo2 ip ad 130.1.2.1 255.255.255.0int lo3 ip ad 130.1.3.1 255.255.255.0int lo5 ip ad 130.1.5.1 255.255.255.0int lo6 ip ad 130.1.6.1 255.255.255.0int lo7 ip ad 130.1.7.1 255.255.255.0router rip network 130.1.0.0[/pre] |
基本配置完成后,我们首选来验证一下。
[pre]r1#sh ip ro 130.1.0.0/24 is subnetted, 7 subnetsO E2 130.1.3.0 [110/10] via 192.1.1.2, 00:00:03, Ethernet0/0O E2 130.1.2.0 [110/10] via 192.1.1.2, 00:00:03, Ethernet0/0O E2 130.1.1.0 [110/10] via 192.1.1.2, 00:00:03, Ethernet0/0O E2 130.1.7.0 [110/10] via 192.1.1.2, 00:00:03, Ethernet0/0O E2 130.1.6.0 [110/10] via 192.1.1.2, 00:00:03, Ethernet0/0O E2 130.1.5.0 [110/10] via 192.1.1.2, 00:00:03, Ethernet0/0O E2 130.1.4.0 [110/10] via 192.1.1.2, 00:00:03, Ethernet0/0 193.1.1.0/24 is variably subnetted, 3 subnets, 2 masksO IA 193.1.1.192/26 [110/21] via 192.1.1.2, 00:00:48, Ethernet0/0O IA 193.1.1.128/26 [110/11] via 192.1.1.2, 00:00:48, Ethernet0/0O IA 193.1.1.0/25 [110/20] via 192.1.1.2, 00:00:48, Ethernet0/0 192.1.1.0/30 is subnetted, 1 subnetsC 192.1.1.0 is directly connected, Ethernet0/0 194.1.1.0/30 is subnetted, 1 subnetsO IA 194.1.1.0 [110/30] via 192.1.1.2, 00:39:39, Ethernet0/0[/pre] |
在我们汇总完成后,上述结果里,红、蓝色显示部分将会被取代。方法如下:
区域间汇总:
[pre]// R2 //router os 1 area 0 range 193.1.1.0 255.255.255.0[/pre] |
[pre]// R3 //router os 1 area 0 range 193.1.1.0 255.255.255.0[/pre] |
外部路由汇总:
[pre]// R4 //router os 1 summary-address 130.1.0.0 255.255.248.0[/pre] |
验证如下:
[pre]r1#sh ip ro 130.1.0.0/21 is subnetted, 1 subnetsO E2 130.1.0.0 [110/10] via 192.1.1.2, 00:00:02, Ethernet0/0O IA 193.1.1.0/24 [110/11] via 192.1.1.2, 00:00:13, Ethernet0/0 192.1.1.0/30 is subnetted, 1 subnetsC 192.1.1.0 is directly connected, Ethernet0/0 194.1.1.0/30 is subnetted, 1 subnetsO IA 194.1.1.0 [110/30] via 192.1.1.2, 00:47:19, Ethernet0/0[/pre] |
|
|