NA-NP-IE系列实验57:多区域OSPF 末节区域和完全末节区域

实验57:多区域OSPF 末节区域和完全末节区域
1. 实验目的
通过本实验可以掌握:
1)末节区域的条件
2)末节区域的特征
3)完全末节区域的特征
4)末节区域的配置
5)完全末节区域的配置
2. 实验拓扑
本实验的拓扑结构如图所示。
NA-NP-IE系列实验57:多区域OSPF 末节区域和完全末节区域_第1张图片
3. 实验步骤
注:
1. 本实验在路由器R1上将环回接口1 以重分布的方式注入OSPF 区域,用来构造5 类的
LSA 。把区域1 配置成末节区域,将区域2 配置成完全末节区域。
2. area x no-summary”阻止区域间的路由进入末节区域,所以叫完全末节区域。
3. 末节和完全末节区域需要满足如下的条件:
1)区域只有一个出口;
2)区域不需要作为虚链路的过渡区;
3)区域内没有ASBR
4)区域不是主干区域。
 
 
r0(config)#int loo 1
r0(config-if)#ip add 1.1.1.1 255.255.255.0
r0(config-if)#int s0/0
r0(config-if)#ip add 172.16.1.1 255.255.255.0
r0(config-if)#no sh
*Mar  1 00:05:07.007: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r0(config-if)#exit
r0(config)#router ospf 1
r0(config-router)#net 1.1.1.0 0.0.0.255 area 1
r0(config-router)#net 172.16.1.0 0.0.0.255 area 1
r0(config-router)#area 1 stub // 把区域1 配置成末节区域
r0(config-router)#
*Mar  1 00:08:36.499: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/0 from LOADING to FULL, Loading Done
r0(config-router)#do sh ip route ospf
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 172.16.1.2, 00:02:05, Serial0/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 172.16.1.2, 00:01:28, Serial0/0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/193] via 172.16.1.2, 00:00:14, Serial0/0
     172.16.0.0/24 is subnetted, 3 subnets
O IA    172.16.2.0 [110/128] via 172.16.1.2, 00:02:05, Serial0/0
O IA    172.16.3.0 [110/192] via 172.16.1.2, 00:01:14, Serial0/0
O*IA 0.0.0.0/0 [110/65] via 172.16.1.2, 00:02:05, Serial0/0
以上的输出表明R1重分布进来的环回接口的路由并没有在R0 的路由表中出现,说明末
节区域不接收类型5 LSA,也就是外部路由;同时末节区域1 ABR R1 自动向该区域内
传播0.0.0.0/0 的默认路由;末节区域可以接收区域间路由。
 
r0(config-router)#do ping 172.16.3.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/36/56 ms
r0(config-router)#
 
Router(config)#int loo 1
Router(config-if)#ip add
*Mar  1 00:00:50.115: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
Router(config-if)#ip add 2.2.2.2 255.255.255.0
Router(config-if)#int s0/0
Router(config-if)#ip add 172.16.1.2 255.255.255.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#int s0
*Mar  1 00:01:13.371: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
Router(config)#int s0/1
*Mar  1 00:01:14.375: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Router(config)#int s0/1
Router(config-if)#ip add 172.16.2.1 255.255.255.0
Router(config-if)#no sh
*Mar  1 00:05:24.727: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#net 2.2.2.0 0.0.0.255 area 0
Router(config-router)#net 172.16.1.0 0.0.0.255 area 1
Router(config-router)#net 172.16.2.0 0.0.0.255 area 0
Router(config-router)#redistribute connected subnets // 将直连重分布进OSPF 区域
 
Router(config-router)#area 1 stub
 
 
 
r2(config)#int loo 1
*Mar  1 00:01:41.227: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r2(config-if)#ip add 3.3.3.3 255.255.255.0
r2(config-if)#int s0/0
r2(config-if)#ip add 172.16.2.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#exit
r2(config)#int s0/
*Mar  1 00:02:05.739: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
r2(config)#int s0/1
*Mar  1 00:02:06.743: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r2(config-if)#ip add 172.16.3.1 255.255.255.0
r2(config-if)#no sh
*Mar  1 00:02:24.003: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up
r2(config-if)#exit
r2(config)#router ospf 1
r2(config-router)#net 3.3.3.0 0.0.0.255 area 0
r2(config-router)#net 172.16.2.0 0.0.0.255 area 0
r2(config-router)#net 172.
*Mar  1 00:09:13.415: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/0 from LOADING to FULL, Loading Done
r2(config-router)#net 172.16.3.0 0.0.0.255 area 2
r2(config-router)#area 2 stub no-summary // 把区域2 配置成完全末节区域
 
 
 
r3(config)#int loo 1
r3(config-if)#ip add 4.4.4
*Mar  1 00:02:57.535: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r3(config-if)#ip add 4.4.4.4 255.255.255.0
r3(config-if)#exit
r3(config)#int s0/0
r3(config-if)#ip add 172.16.3.2 255.255.255.0
r3(config-if)#no sh
r3(config-if)#exit
*Mar  1 00:04:02.835: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r3(config)#router ospf 1
r3(config-router)#net 4.4.4.0 0.0.0.255 area 2
r3(config-router)#net 172.16.3.0 0.0.0.255 area 2
r3(config-router)#area 2 stub no-summary
r3(config-router)#
*Mar  1 00:10:37.879: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/0 from LOADING to FULL, Loading Done
r3(config-router)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF , IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is 172.16.3.1 to network 0.0.0.0
 
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback1
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.3.0 is directly connected, Serial0/0
O*IA 0.0.0.0/0 [110/65] via 172.16.3.1, 00:00:33, Serial0/0
以上输出表明在完全末节区域2 中,R3 的路由表中除了直连和区域内路由,全部被默
认路由代替,证明完全末节区域不接收外部路由和区域间路由,只有区域内的路由和一条由
ABR 向该区域注入的默认路由。
 

你可能感兴趣的:(网络,职场,休闲,交换,ospf)