NP-OSPF综合实验配置(二)

 
4. 配置路由总结减少路由表大小
OSPF 路由汇总只能在ABR ASBR 上进行
 
  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 a 10.1.1 .2, 00:00:01, Serial1/1
O IA    172.17.1.2 [110/128] vi a 10.1.1 .2, 00:00:01, Serial1/1
O IA    172.17.1.3 [110/128] vi a 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] vi a 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] vi a 10.1.1 .2, 00:00:01, Serial1/1
O IA    172.18.0.0/23 [110/193] vi a 10.1.1 .2, 00:00:02, Serial1/1
O IA    172.18.1.0/24 [110/193] vi a 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] vi a 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] vi a 10.1.1 .2, 00:00:02, Serial1/1
O IA    10.1.2 .0 [110/192] vi a 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] vi a 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] vi a 10.1.1 .2, 00:11:10, Serial1/1
O IA    172.17.1.2 [110/128] vi a 10.1.1 .2, 00:11:10, Serial1/1
O IA    172.17.1.3 [110/128] vi a 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] vi a 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] vi a 10.1.1 .2, 00:11:10, Serial1/1
O IA    172.18.0.0/23 [110/193] vi a 10.1.1 .2, 00:11:11, Serial1/1
O IA    172.18.1.0/24 [110/193] vi a 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] vi a 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] vi a 10.1.1 .2, 00:11:11, Serial1/1
O IA    10.1.2 .0 [110/192] vi a 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] vi a 10.1.1 .2, 00:11:11, Serial1/1
O E2 192.168.255.0/24 [110/20] vi a 10.1.1 .2, 00:01:28, Serial1/1
O E2 192.168.0.0/22 [110/20] vi a 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*I A 0.0.0 .0/0 [110/65] vi a 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*I A 0.0.0 .0/0 [110/65] vi a 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 ,实验基本完成
 

你可能感兴趣的:(职场,休闲)