OSPF的NSSA区域的特殊情况+实验
2009-07-18 10:10
351 查看
今天来完成一个实验,拓扑图如下
这个实验是为了说明当某个区域配置为NSSA区域时,正如这个图所示的情况,当EIGRP被重分布到OSPF网络时,NSSA区域内的路由器(除了ABR路由器外)是无法学习到此外部路由信息的。必须手动配置一条默认路由,引导路由器访问外部网络
具体配置如下:
R1:
interface Loopback0
ip address 172.16.0.1 255.255.255.0
!
interface Loopback1
ip address 172.16.1.1 255.255.255.0
!
interface Loopback2
ip address 172.16.2.1 255.255.255.0
!
interface Loopback3
ip address 172.16.3.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.0
ip ospf 1 area 1
serial restart-delay 0
clock rate 64000
!
router ospf 1
log-adjacency-changes
area 1 nssa
redistribute rip metric 50 subnets
!
router rip
version 2
network 172.16.0.0
no auto-summary
R2:
interface Serial0/0
ip address 192.168.2.2 255.255.255.0
ip ospf 1 area 0
serial restart-delay 0
clock rate 64000
!
interface Serial0/1
ip address 192.168.1.2 255.255.255.0
ip ospf 1 area 1
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
area 1 nssa
!
R3:
interface Serial0/0
ip address 192.168.3.3 255.255.255.0
ip ospf 1 area 2
serial restart-delay 0
clock rate 64000
!
interface Serial0/1
ip address 192.168.2.3 255.255.255.0
ip ospf 1 area 0
serial restart-delay 0
!!
router ospf 1
log-adjacency-changes
R4:
interface Loopback0
ip address 10.1.0.1 255.255.255.0
!
interface Loopback1
ip address 10.1.1.1 255.255.255.0
!
interface Loopback2
ip address 10.1.2.1 255.255.255.0
!
interface Loopback3
ip address 10.1.3.1 255.255.255.0
!
interface Serial0/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/1
ip address 192.168.3.4 255.255.255.0
ip ospf 1 area 2
serial restart-delay 0
!
router eigrp 1
network 10.0.0.0
auto-summary
!
router ospf 1
log-adjacency-changes
redistribute eigrp 1 metric 50 subnets
按上面配置完成后,我们来看看R1上的路由表
r1(config-if)#do 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
C 192.168.1.0/24 is directly connected, Serial0/0
O IA 192.168.2.0/24 [110/128] via 192.168.1.2, 00:01:07, Serial0/0
O IA 192.168.3.0/24 [110/192] via 192.168.1.2, 00:00:47, Serial0/0
果然没有重分发EIGRP后的路由信息。
再来看看R2上的路由条目
r2(config-if)#do sh ip rou
172.16.0.0/24 is subnetted, 4 subnets
O N2 172.16.0.0 [110/50] via 192.168.1.1, 00:00:41, Serial0/1
O N2 172.16.1.0 [110/50] via 192.168.1.1, 00:00:41, Serial0/1
O N2 172.16.2.0 [110/50] via 192.168.1.1, 00:00:41, Serial0/1
O N2 172.16.3.0 [110/50] via 192.168.1.1, 00:00:41, Serial0/1
10.0.0.0/24 is subnetted, 4 subnets
O E2 10.1.3.0 [110/50] via 192.168.2.3, 00:00:41, Serial0/0
O E2 10.1.2.0 [110/50] via 192.168.2.3, 00:00:41, Serial0/0
O E2 10.1.1.0 [110/50] via 192.168.2.3, 00:00:41, Serial0/0
O E2 10.1.0.0 [110/50] via 192.168.2.3, 00:00:41, Serial0/0
C 192.168.1.0/24 is directly connected, Serial0/1
C 192.168.2.0/24 is directly connected, Serial0/0
O IA 192.168.3.0/24 [110/128] via 192.168.2.3, 00:00:51, Serial0/0
R2上是有到达EIGRP网路的路由的。由此我们刚才的结论是正确的。
我们来测试一下
r1(config)#do ping 10.1.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
r1(config)#
当我们增加了默认路由后
r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
r1(config)#do 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
C 192.168.1.0/24 is directly connected, Serial0/0
O IA 192.168.2.0/24 [110/128] via 192.168.1.2, 00:03:11, Serial0/0
O IA 192.168.3.0/24 [110/192] via 192.168.1.2, 00:02:21, Serial0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.2
再来测试下
r1(config)#do ping 10.1.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 116/150/228 ms
OK,实验完成
本文出自 “爱学习-感悟人生” 博客,请务必保留此出处http://lovelife.blog.51cto.com/787101/179880
这个实验是为了说明当某个区域配置为NSSA区域时,正如这个图所示的情况,当EIGRP被重分布到OSPF网络时,NSSA区域内的路由器(除了ABR路由器外)是无法学习到此外部路由信息的。必须手动配置一条默认路由,引导路由器访问外部网络
具体配置如下:
R1:
interface Loopback0
ip address 172.16.0.1 255.255.255.0
!
interface Loopback1
ip address 172.16.1.1 255.255.255.0
!
interface Loopback2
ip address 172.16.2.1 255.255.255.0
!
interface Loopback3
ip address 172.16.3.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.0
ip ospf 1 area 1
serial restart-delay 0
clock rate 64000
!
router ospf 1
log-adjacency-changes
area 1 nssa
redistribute rip metric 50 subnets
!
router rip
version 2
network 172.16.0.0
no auto-summary
R2:
interface Serial0/0
ip address 192.168.2.2 255.255.255.0
ip ospf 1 area 0
serial restart-delay 0
clock rate 64000
!
interface Serial0/1
ip address 192.168.1.2 255.255.255.0
ip ospf 1 area 1
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
area 1 nssa
!
R3:
interface Serial0/0
ip address 192.168.3.3 255.255.255.0
ip ospf 1 area 2
serial restart-delay 0
clock rate 64000
!
interface Serial0/1
ip address 192.168.2.3 255.255.255.0
ip ospf 1 area 0
serial restart-delay 0
!!
router ospf 1
log-adjacency-changes
R4:
interface Loopback0
ip address 10.1.0.1 255.255.255.0
!
interface Loopback1
ip address 10.1.1.1 255.255.255.0
!
interface Loopback2
ip address 10.1.2.1 255.255.255.0
!
interface Loopback3
ip address 10.1.3.1 255.255.255.0
!
interface Serial0/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/1
ip address 192.168.3.4 255.255.255.0
ip ospf 1 area 2
serial restart-delay 0
!
router eigrp 1
network 10.0.0.0
auto-summary
!
router ospf 1
log-adjacency-changes
redistribute eigrp 1 metric 50 subnets
按上面配置完成后,我们来看看R1上的路由表
r1(config-if)#do 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
C 192.168.1.0/24 is directly connected, Serial0/0
O IA 192.168.2.0/24 [110/128] via 192.168.1.2, 00:01:07, Serial0/0
O IA 192.168.3.0/24 [110/192] via 192.168.1.2, 00:00:47, Serial0/0
果然没有重分发EIGRP后的路由信息。
再来看看R2上的路由条目
r2(config-if)#do sh ip rou
172.16.0.0/24 is subnetted, 4 subnets
O N2 172.16.0.0 [110/50] via 192.168.1.1, 00:00:41, Serial0/1
O N2 172.16.1.0 [110/50] via 192.168.1.1, 00:00:41, Serial0/1
O N2 172.16.2.0 [110/50] via 192.168.1.1, 00:00:41, Serial0/1
O N2 172.16.3.0 [110/50] via 192.168.1.1, 00:00:41, Serial0/1
10.0.0.0/24 is subnetted, 4 subnets
O E2 10.1.3.0 [110/50] via 192.168.2.3, 00:00:41, Serial0/0
O E2 10.1.2.0 [110/50] via 192.168.2.3, 00:00:41, Serial0/0
O E2 10.1.1.0 [110/50] via 192.168.2.3, 00:00:41, Serial0/0
O E2 10.1.0.0 [110/50] via 192.168.2.3, 00:00:41, Serial0/0
C 192.168.1.0/24 is directly connected, Serial0/1
C 192.168.2.0/24 is directly connected, Serial0/0
O IA 192.168.3.0/24 [110/128] via 192.168.2.3, 00:00:51, Serial0/0
R2上是有到达EIGRP网路的路由的。由此我们刚才的结论是正确的。
我们来测试一下
r1(config)#do ping 10.1.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
r1(config)#
当我们增加了默认路由后
r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
r1(config)#do 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
C 192.168.1.0/24 is directly connected, Serial0/0
O IA 192.168.2.0/24 [110/128] via 192.168.1.2, 00:03:11, Serial0/0
O IA 192.168.3.0/24 [110/192] via 192.168.1.2, 00:02:21, Serial0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.2
再来测试下
r1(config)#do ping 10.1.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 116/150/228 ms
OK,实验完成
本文出自 “爱学习-感悟人生” 博客,请务必保留此出处http://lovelife.blog.51cto.com/787101/179880
相关文章推荐
- 22、OSPF配置实验之特殊区域NSSA
- CCNA视频:CCNP重点难点理论+实验解析之:OSPF STUB、total STUB、NSSA、total NSSA区域对比
- OSPF实验7:OSPF特殊区域 推荐
- 熟悉OSPF的特殊区域:NSSA
- OSPF特殊区域之NSSA
- OSPF综合实验--多区域、Stub、NSSA、路由聚合与路由引入
- 20、OSPF配置实验之特殊区域stub
- OSPF特殊区域之NSSA和totally NSSA配置(一)
- 21、OSPF配置实验之特殊区域totally stub
- OSPF特殊区域之NSSA和totally NSSA配置(二)
- 23、OSPF配置实验之特殊区域Totally NSSA
- 单区域 OSPF 实验 1:点到点链路上的 OSPF
- OSPF之特殊区域
- OSPF特殊区域之STUB
- OSPF特殊区域之totally nssa
- OSPF的NSSA区域
- 熟悉OSPF的特殊区域:stub和stub totally
- BSCI―8-(1):OSPF的特殊区域类型与配置(末节与完全末节区域)
- OSPF 特殊区域
- OSPF的stub、完全stub及NSSA区域各自的特点