4.配置路由总结减少路由表大小<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

OSPF路由汇总只能在ABRASBR上进行

 

 

1)在R2上对区域1路由进行汇总

r2(config-router)#router ospf 1

r2(config-router)#area 1 range 172.16.0.0 255.255.252.0

 

2)在R3上对区域4路由进行汇总

r3(config-line)#router os 1

r3(config-router)#area 4 range 172.19.0.0 255.255.254.0

 

3)在R4上对区域2路由进行汇总

r4(config)#router os 1

r4(config-router)#area 2 range 172.18.0.0 255.255.254.0

 

4)在R7上对区域3路由进行汇总

r7(config)#router os 1

r7(config-router)#area 3 range 172.20.0.0 255.255.252.0

 

这里来看看当配置了virtual-link R1的路由表

r1#sh ip rou      

 

     172.17.0.0/32 is subnetted, 3 subnets

O IA    172.17.1.1 [110/64] vi<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />a 10.1.1.2, 00:00:01, Serial1/1

O IA    172.17.1.2 [110/128] via 10.1.1.2, 00:00:01, Serial1/1

O IA    172.17.1.3 [110/128] via 10.1.1.2, 00:00:01, Serial1/1

     172.16.0.0/24 is subnetted, 4 subnets

C       172.16.0.0 is directly connected, Loopback0

C       172.16.1.0 is directly connected, Loopback1

C       172.16.2.0 is directly connected, Loopback2

C       172.16.3.0 is directly connected, Loopback3

     172.19.0.0/23 is subnetted, 1 subnets

O IA    172.19.0.0 [110/193] via 10.1.1.2, 00:00:01, Serial1/1

     172.18.0.0/16 is variably subnetted, 3 subnets, 2 masks

O IA    172.18.0.0/24 [110/193] via 10.1.1.2, 00:00:01, Serial1/1

O IA    172.18.0.0/23 [110/193] via 10.1.1.2, 00:00:02, Serial1/1

O IA    172.18.1.0/24 [110/193] via 10.1.1.2, 00:00:02, Serial1/1

     172.20.0.0/22 is subnetted, 1 subnets

O IA    172.20.0.0 [110/257] via 10.1.1.2, 00:00:02, Serial1/1

     10.0.0.0/24 is subnetted, 4 subnets

O IA    10.1.3.0 [110/192] via 10.1.1.2, 00:00:02, Serial1/1

O IA    10.1.2.0 [110/192] via 10.1.1.2, 00:00:02, Serial1/1

C       10.1.1.0 is directly connected, Serial1/1

O IA    10.1.4.0 [110/256] via 10.1.1.2, 00:00:02, Serial1/1

可以看到,来自区域2的路由信息是没有被汇总。

 

 

RIPV2网络的路由信息重分布到OSPF网络,同时进行对外部网络的汇总,再在R6上配置一条默认路由到达其它网络

r5(config)#router ospf  1

r5(config-router)#redistribute rip subnets

r5(config-router)#summary-address 192.168.0.0 255.255.252.0

 

r6(config)#ip route 0.0.0.0 0.0.0.0 192.168.255.1

 

查看R1的路由表

r1#sh ip rou

 

     172.17.0.0/32 is subnetted, 3 subnets

O IA    172.17.1.1 [110/64] via 10.1.1.2, 00:11:10, Serial1/1

O IA    172.17.1.2 [110/128] via 10.1.1.2, 00:11:10, Serial1/1

O IA    172.17.1.3 [110/128] via 10.1.1.2, 00:11:10, Serial1/1

     172.16.0.0/24 is subnetted, 4 subnets

C       172.16.0.0 is directly connected, Loopback0

C       172.16.1.0 is directly connected, Loopback1

C       172.16.2.0 is directly connected, Loopback2

C       172.16.3.0 is directly connected, Loopback3

     172.19.0.0/23 is subnetted, 1 subnets

O IA    172.19.0.0 [110/193] via 10.1.1.2, 00:11:10, Serial1/1

     172.18.0.0/16 is variably subnetted, 3 subnets, 2 masks

O IA    172.18.0.0/24 [110/193] via 10.1.1.2, 00:11:10, Serial1/1

O IA    172.18.0.0/23 [110/193] via 10.1.1.2, 00:11:11, Serial1/1

O IA    172.18.1.0/24 [110/193] via 10.1.1.2, 00:11:11, Serial1/1

     172.20.0.0/22 is subnetted, 1 subnets

O IA    172.20.0.0 [110/257] via 10.1.1.2, 00:11:11, Serial1/1

     10.0.0.0/24 is subnetted, 4 subnets

O IA    10.1.3.0 [110/192] via 10.1.1.2, 00:11:11, Serial1/1

O IA    10.1.2.0 [110/192] via 10.1.1.2, 00:11:11, Serial1/1

C       10.1.1.0 is directly connected, Serial1/1

O IA    10.1.4.0 [110/256] via 10.1.1.2, 00:11:11, Serial1/1

O E2 192.168.255.0/24 [110/20] via 10.1.1.2, 00:01:28, Serial1/1

O E2 192.168.0.0/22 [110/20] via 10.1.1.2, 00:00:15, Serial1/1

 

 

5.采用合适的区域类型抑制LSA的泛洪

通过观察拓扑图,区域1可以配置为totally stub  区域4配置为totally NSSA区域

由于区域3是通过virtual-link和主干区域相连的,所以不能配置为末节区域。

因为区域2是提供virtual-link的链接,因此也不能配置为末节区域。

区域1

r2(config)#router os 1

r2(config-router)#area 1 stub no-summary

 

r1(config)#router os 1

r1(config-router)#area 1 stub

 

区域4

r3(config)#router os 1

r3(config-router)#area 4 nssa no-summary

 

r5(config)#router os 1

r5(config-router)#area 4 nssa

 

查看R1 R5的路由表

r1#sh ip rou

 

     172.16.0.0/24 is subnetted, 4 subnets

C       172.16.0.0 is directly connected, Loopback0

C       172.16.1.0 is directly connected, Loopback1

C       172.16.2.0 is directly connected, Loopback2

C       172.16.3.0 is directly connected, Loopback3

     10.0.0.0/24 is subnetted, 1 subnets

C       10.1.1.0 is directly connected, Serial1/1

O*IA 0.0.0.0/0 [110/65] via 10.1.1.2, 00:00:08, Serial1/1

 

r5#sh ip ro

 

     172.19.0.0/24 is subnetted, 2 subnets

C       172.19.1.0 is directly connected, Loopback1

C       172.19.0.0 is directly connected, Loopback0

     10.0.0.0/24 is subnetted, 1 subnets

C       10.1.2.0 is directly connected, Serial1/0

C    192.168.255.0/24 is directly connected, Serial1/1

R    192.168.0.0/24 [120/1] via 192.168.255.2, 00:00:07, Serial1/1

R    192.168.1.0/24 [120/1] via 192.168.255.2, 00:00:07, Serial1/1

R    192.168.2.0/24 [120/1] via 192.168.255.2, 00:00:07, Serial1/1

R    192.168.3.0/24 [120/1] via 192.168.255.2, 00:00:07, Serial1/1

O*IA 0.0.0.0/0 [110/65] via 10.1.2.1, 00:00:29, Serial1/0

l               192.168.0.0/22 is a summary, 00:00:38, Null0

 

6.测试网络的联通性

r1#ping 192.168.255.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.255.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 268/305/356 ms

r1#ping 192.168.0.1 

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 280/344/400 ms

r1#ping 172.20.0.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.20.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 224/344/428 ms

r1#ping 172.18.0.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.18.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 188/228/284 ms

r1#ping 172.19.0.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.19.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 216/253/296 ms

 

r8#ping 192.168.0.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 264/336/372 ms

 

 

 

OK,实验基本完成