注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 CCIE-Lab考试将新增10分钟..
 帮助

OSPF实验4:虚链路


2007-08-15 13:27:00
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://gairuhe.blog.51cto.com/77728/38402

OSPF实验4:虚链路

实验等级:Professional
 
实验拓扑:
 
 
实验分析:
     上面这个网络的设计在OSPF中是比较失败的,因为OSPF建议所有的非骨干区域都和骨干区域直连。上面这个网络的设计将会导致Area2的数据和Area0无法通信。为了解决这个问题,一种方法可以在R3R1上增加一条物理链路。还有一种过渡的方法就是使用虚链路。
 
实验基本配置:
 
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.0
ip ospf network point-to-point
!
interface Serial1/0
ip address 10.1.1.1 255.255.255.0
serial restart-delay 0
!
router ospf 10
router-id 1.1.1.1
log-adjacency-changes
network 10.1.1.0 0.0.0.255 area 0
 
R2
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!
interface Serial1/0
 ip address 10.1.1.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 11.1.1.1 255.255.255.0
 serial restart-delay 0
!
router ospf 10
 router-id 2.2.2.2
 log-adjacency-changes
 network 10.1.1.0 0.0.0.255 area 0
 network 11.1.1.0 0.0.0.255 area 1
 
R3
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
!
interface Serial1/0
 ip address 11.1.1.2 255.255.255.0
 serial restart-delay 0
!
router ospf 10
 router-id 3.3.3.3
 log-adjacency-changes
 network 3.3.3.0 0.0.0.255 area 2
 network 11.1.1.0 0.0.0.255 area 1
 
我们在R1上查看路由表,发现没有R3Loopback接口路由:
 
R1#sho ip rou
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 not set
 
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Serial1/0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.1.1.0 [110/128] via 10.1.1.2, 00:04:50, Serial1/0
 
为了让R1学习到R3的路由,我们配置虚链路。
 
虚链路的配置:
 
虚链路必须配置在ABR,在这个网络中ABRR2R3
虚链路的配置使用的命令是area transit-area-id virtual-link router-id。我们现在在R2R3上进行配置。
 
R2(config)#router ospf 10
R2(config-router)#area 1 virtual-link 3.3.3.3
R3(config)#router ospf 10
R3(config-router)#area 1 virtual-link 2.2.2.2
 
等虚链路起来后,我们查看其状态:
 
R2#sho ip ospf virtual-links
Virtual Link OSPF_VL0 to router 3.3.3.3 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface Serial1/1, Cost of using 64
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:05
    Adjacency State FULL (Hello suppressed)
    Index 2/3, retransmission queue length 0, number of retransmission 1
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 1, maximum is 1
    Last retransmission scan time is 0 msec, maximum is 0 msec
 
在上面的信息中我们可以看到。虚链路在逻辑上是等同于一条物理的按需链路,既只有在两端路由器的配置有变动的时候才进行更新,并且使用的是不老化(DoNotAgeLSA,既虚链路是无须Hello包控制的。
 
R1#sho ip rou
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 not set
 
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/129] via 10.1.1.2, 00:03:02, Serial1/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Serial1/0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.1.1.0 [110/128] via 10.1.1.2, 00:03:02, Serial1/0
 
这时看到R1已经学习到了R3环回口的路由。Metric值为129虚链路的Metric等同于所经过的全部链路开销之和,在这个网络中,Metric=1Loopback+64+64=129
 
R1上查看OSPF数据库:
R1#show ip ospf database
 
            OSPF Router with ID (1.1.1.1) (Process ID 10)
 
                Router Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         797         0x80000002 0x00B9C0 2
2.2.2.2         2.2.2.2         369         0x80000004 0x00DD29 3
3.3.3.3         3.3.3.3         6     (DNA) 0x80000002 0x008B35 1
 
                Summary Net Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         3.3.3.3         12    (DNA) 0x80000001 0x00AE75
11.1.1.0        2.2.2.2         789         0x80000001 0x0029BE
11.1.1.0        3.3.3.3         12    (DNA) 0x80000001 0x000BD8
 
这里的(DNA)就是DoNotAge
 
 
总结:
 
   虚链路被看成网络设计失败的一种补救手段,它不仅可以让没有和骨干区域直连的非骨干区域在逻辑上建立一条链路,还可以连接两个分离的骨干区域。但是由于虚链路的配置会造成日后维护和排错的困难。所以在进行网络设计的时候,不能将虚链路考虑进去。

本文出自 “盖如鹤的步徒” 博客,请务必保留此出处http://gairuhe.blog.51cto.com/77728/38402





    文章评论
 
2007-08-15 21:50:30
虚链路必须配置在ABR上,在这个网络中ABR是R2和R3。
虚链路的配置使用的命令是area transit-area-id virtual-link router-id。我们现在在R2和R3上进行配置。
不错哦

2007-08-18 19:13:14
讲的很详细...谢谢分享...

2008-08-09 13:54:29
非常好,谢谢!

2008-08-09 13:54:30
非常好,谢谢!

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: