FAQ-怎么判断因为防环导致ospf路由没有计算

发布时间:  2014-09-22 浏览次数:  203 下载次数:  0
问题描述
怎么判断因为防环导致ospf路由没有计算
解决方案
OSPF根据两种方式来防环:
1、 DN-bit
原理:PE在生成Type3、Type5或Type7 LSAs发布给CE时,都将DN位置位(值为1),其他类型LSA的DN位不置位(值为0)。PE路由器的OSPF多实例进程在进行计算时,忽略DN置位的LSA。这样就防止了PE又从CE学到发出的LSA而引起的环路。



检查方式:
1)display ospf lsdb ase 查看该LSA是否带DN-Bit:

HRP_Mdisplay  ospf lsdb ase 136.27.1.96  
17:51:36  2014/05/08

                OSPF Process 1 with Router ID 136.24.31.9
                         Link State Database

Type      : ASE
Ls id     : 136.27.1.96
Adv rtr   : 10.111.126.202 
Ls age    : 584
Len       : 36
Seq#      : 80000054
Chksum    : 0x772d
Options   : (DC)  //如果是有DN位,这里会显示:  E  DN
Net mask  : 255.255.255.224
   Tos 0 metric: 20
   E type    : 2
   Forwarding Address :0.0.0.0
   Tag: 0


2)display current-configuration configuration ospf查看OSPF进程是否绑定了VPN:
[ALAE1000E-3G-2-GN]display  current-configuration   configuration   ospf                                                           
09:09:12  2063/05/25                                                                                                               
#                                                                                                                                  
ospf 1 router-id 136.24.31.9 vpn-instance core                                                                                     
import-route static                                                                                                               
area 0.0.0.0                                                                                                                      
  network 136.24.30.16 0.0.0.3                                                                                                     
  network 136.24.31.9 0.0.0.0                                                                                                      
#                                      

2、VPN Route Tag
原理:当PE发现LSA的VPN路由标记(LSA的Tag值)和自己的一样,就会忽略这条LSA,因此避免了环路。



检查方式:
1)display ospf lsdb ase 查看该LSA的Route Tag值:
HRP_Mdisplay  ospf lsdb ase 136.27.1.96  
17:51:36  2014/05/08

                OSPF Process 1 with Router ID 136.24.31.9
                         Link State Database

Type      : ASE
Ls id     : 136.27.1.96
Adv rtr   : 10.111.126.202 
Ls age    : 584
Len       : 36
Seq#      : 80000054
Chksum    : 0x772d
Options   : (DC)
Net mask  : 255.255.255.224
   Tos 0 metric: 20
   E type    : 2
   Forwarding Address :0.0.0.0
   Tag: 0



2)display ospf brief命令查看OSPF本地Tag值是否和收到的LSA Tag值是否一致:
HRP_Mdisplay ospf brief
17:52:26  2014/05/08

                OSPF Process 1 with Router ID 136.24.31.9
                       OSPF Protocol Information

RouterID: 136.24.31.9  Border Router: Area AS
VPN-Instance's name: core Domain-id: 0 Route-tag: 0
PE router, connected to VPN backbone
Spf-schedule-interval: 5
Routing preference: Inter/Intra: 10 External: 150
Default ASE parameters: Metric: 1 Tag: 1 Type: 2
SPF computation count: 759
Area Count: 1    Nssa Area Count: 0

以上的现象都用vpn-instance-capability simple即可取消环路检查。
[FW-ospf-1]vpn-instance-capability simple
另外,更改本地Route Tag值,和LSA的Tag值不一致也可以解决该问题,但是改动这个可能导致跟其他的route-tag冲突。
[FW-ospf-1]route-tag 100

END