免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1079 | 回复: 0
打印 上一主题 下一主题

OSPF区域0分割问题的解决方案 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-30 16:24 |只看该作者 |倒序浏览


如图所示,区域0被分成了两部分。这肯定会造成问题。如:R2会收到R3发来的一条类型3的LSA,其中包含了34.0.0.0/24网络的路由信息。由于这条LSA来自于右边的区域0,当R2收到这条LSA时,它发现这是一条来自于区域0的类型3的LSA,而R2本身又是区域0的边界路由器,因此它认为这种情况是不可能发生的。于是它会认为这是SPF算法出错,所以不会接收这条LSA,路由也就无法学习到。
在本实验中就要观察这种现象,然后找出解决方案。目前可行的方法有三种;分别是:
1 建立虚链路;
2 建立tunnel;
3 不同进程之间的重分布。
下面将逐一进行试验。
―――――――――――――――――――――――――――――――――――――――
1 基本配置
R1
interface Serial2/1
ip address 12.0.0.1 255.255.255.0
router ospf 1
router-id 1.1.1.1
network 12.0.0.0 0.0.0.255 area 0
R2
interface Serial2/1
ip address 12.0.0.2 255.255.255.0
interface Serial2/2
ip address 23.0.0.2 255.255.255.0
router ospf 1
router-id 2.2.2.2
network 12.0.0.0 0.0.0.255 area 0
network 23.0.0.0 0.0.0.255 area 1
R3
interface Serial2/1
ip address 23.0.0.3 255.255.255.0
interface Serial2/2
ip address 34.0.0.3 255.255.255.0
router ospf 1
router-id 3.3.3.3
network 23.0.0.0 0.0.0.255 area 1
network 34.0.0.0 0.0.0.255 area 0
R4
interface Serial2/1
ip address 34.0.0.4 255.255.255.0
router ospf 1
router-id 4.4.4.4
network 34.0.0.0 0.0.0.255 area 0

r2#sh ip os neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/  -        00:00:31    12.0.0.1        Serial2/1
3.3.3.3           1   FULL/  -        00:00:39    23.0.0.3        Serial2/2
r3#sh ip os neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/  -        00:00:34    23.0.0.2        Serial2/1
4.4.4.4           1   FULL/  -        00:00:30    34.0.0.4        Serial2/2
OSPF邻居已经建立。

r2#sh ip route
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial2/2
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial2/1
但R2无法学习到34.0.0.0/24的路由。原因正如前文所说
现在就前面提到的方法分别进行验证。
*******************************************************************************
方法一 建立虚链路(最常用的方法)
r2(config)#router os 1
r2(config-router)#area 1 virtual-link 3.3.3.3

r3(config)#router os 1
r3(config-router)#area 1 virtual-link 2.2.2.2


r2#sh ip route
     34.0.0.0/24 is subnetted, 1 subnets
O       34.0.0.0 [110/128] via 23.0.0.3, 00:00:33, Serial2/2
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial2/2
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial2/1

方法二 建立tunnel
1 建立TUNNEL
r2(config)#int tunnel 0
r2(config-if)#ip add 2.2.2.2 255.255.255.0  /为tunnel接口配一个IP地址
r2(config-if)#tunnel source 23.0.0.2       /为tunnel指定一个源端
r2(config-if)#tunnel destination 23.0.0.3   /为tunnel指定一个目的端

r3(config)#int tunnel 0
r3(config-if)#ip add 2.2.2.3 255.255.255.0
r3(config-if)#tunnel source 23.0.0.3
r3(config-if)#tunnel destination 23.0.0.2

在本例中tunnel是建立在R2,R3之间的串行链路上。并且为tunnel接口配置了IP地址。而且IP地址必须处于同一网段。目的是将这一网段宣告至OSPF的区域0中。让tunnel将区域0连接起来。
――――――――――――――――――――――――――――――――――――――
2 将TUNNEL接口的IP宣告进OSPF的区域 0
r2(config)#router os 1
r2(config-router)#net 2.2.2.0 0.0.0.255 a 0
r3(config)#router os 1
r3(config-router)#net 2.2.2.0 0.0.0.255 a 0

―――――――――――――――――――――――――――――――――――――
r2#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/  -        00:00:38    12.0.0.1        Serial2/1
3.3.3.3           1   FULL/  -        00:00:35    23.0.0.3        Serial2/2
3.3.3.3           1   FULL/  -        00:00:36    2.2.2.3         Tunnel0


r3# sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/  -        00:00:37    23.0.0.2        Serial2/1
4.4.4.4           1   FULL/  -        00:00:33    34.0.0.4        Serial2/2
2.2.2.2           1   FULL/  -        00:00:31    2.2.2.2         Tunnel0
可以看到R2,R3之间通过tunnel接口也建立起了邻居。

――――――――――――――――――――――――――――――――――――
r2#sh ip rou
     34.0.0.0/24 is subnetted, 1 subnets
O       34.0.0.0 [110/11175] via 2.2.2.3, 00:03:51, Tunnel0
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Tunnel0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial2/2
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial2/1


r3#sh ip rou
     34.0.0.0/24 is subnetted, 1 subnets
C       34.0.0.0 is directly connected, Serial2/2
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Tunnel0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial2/1
     12.0.0.0/24 is subnetted, 1 subnets
O       12.0.0.0 [110/11175] via 2.2.2.2, 00:04:13, Tunnel0


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/36438/showart_289811.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP