由于迭代深度问题导致NE5000E上静态路由不生效

发布时间:  2012-07-27 浏览次数:  122 下载次数:  0
问题描述
1、组网:NE5000E双上行两条pos链路到同一台C路由器     
loopback 222.83.16.19                                          loopback 202.97.32.243
NE5000E pos 1/0/0 (222.83.25.50)---------------------(.49)C路由器  
          pos 9/0/0 (222.83.25.222)------------------(.221) 
2、NE5000E已经与对端路由器建立了EBGP邻居:
<NE5000E>display bgp peer
 BGP local router ID : 222.83.16.19                                             
 Local AS number : 65338                                                        
 Total number of peers : 5           Peers in established state : 5                     
  Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State   
 202.97.32.243   4  4134    51037    24806     0 0171h03m Established     
3、在NE5000E上配置了两条静态路由:
ip route-static 202.97.32.243 255.255.255.255 Pos1/0/0 222.83.25.49            
ip route-static 202.97.32.243 255.255.255.255 222.83.25.221
这时,看路由表,往C路由器去的路由都只有一个下一跳:Pos1/0/0
<XJ-KS-28-A-1.163>dis ip rout                                                   
Routing Tables: Public                                                          
         Destinations : 21160    Routes : 21176                                 
Destination/Mask    Proto  Pre  Cost       NextHop         Interface
        0.0.0.0/0   BGP    100  0          202.97.32.243   Pos1/0/0             
    12.163.89.0/24  BGP    255  0          202.97.32.243   Pos1/0/0             
    12.163.90.0/23  BGP    255  0          202.97.32.243   Pos1/0/0             
    12.163.92.0/23  BGP    255  0          202.97.32.243   Pos1/0/0             
    12.163.94.0/24  BGP    255  0          202.97.32.243   Pos1/0/0             
   12.167.159.0/24  BGP    255  0          202.97.32.243   Pos1/0/0             
      24.96.0.0/17  BGP    255  0          202.97.32.243   Pos1/0/0        
告警信息

处理过程
1、将静态路由配置如下:
ip route-static 202.97.32.243 255.255.255.255 Pos1/0/0 222.83.25.49            
 ip route-static 202.97.32.243 255.255.255.255 Pos9/0/0 222.83.25.221    //增加了出接口
则路由表中到C路由器的路由都有了两个下一跳:
Destination/Mask    Proto  Pre  Cost       NextHop         Interface
        0.0.0.0/0   BGP    100  0          202.97.32.243   Pos1/0/0             
                           BGP    100  0          202.97.32.243   Pos9/0/0             
    12.163.89.0/24  BGP    255  0          202.97.32.243   Pos1/0/0             
                                 BGP    255  0          202.97.32.243   Pos9/0/0             
    12.163.90.0/23  BGP    255  0          202.97.32.243   Pos1/0/0             
                                 BGP    255  0          202.97.32.243   Pos9/0/0             
    12.163.92.0/23  BGP    255  0          202.97.32.243   Pos1/0/0             
                                 BGP    255  0          202.97.32.243   Pos9/0/0             
    12.163.94.0/24  BGP    255  0          202.97.32.243   Pos1/0/0             
                                 BGP    255  0          202.97.32.243   Pos9/0/0             
   12.167.159.0/24  BGP    255  0          202.97.32.243   Pos1/0/0             
                                   BGP    255  0          202.97.32.243   Pos9/0/0             
      24.96.0.0/17  BGP    255  0          202.97.32.243   Pos1/0/0             
                              BGP    255  0          202.97.32.243   Pos9/0/0 
2、原因分析:首先在NE5000E上配置了两条静态路由:
ip route-static 202.97.32.243 255.255.255.255 Pos1/0/0 222.83.25.49 //这条静态路由指定了出接口,不需要迭代,迭代深度为0;
ip route-static 202.97.32.243 255.255.255.255 222.83.25.221//这条静态路由没有指定出接口,需要进行1次迭代,迭代深度为1;
这样一来,BGP路由根据下一跳迭代,选择迭代深度最小的静态路由,选中上述第一条迭代深度为0的,所以BGP出接口都为P1/0/0。
3、当静态路由改写成如下:
ip route-static 202.97.32.243 255.255.255.255 Pos1/0/0 222.83.25.49  
ip route-static 202.97.32.243 255.255.255.255 Pos9/0/0 222.83.25.221      //增加了出接口,也不需要迭代,迭代深度为0; 
BGP路由根据下一跳迭代,选择迭代深度最小的静态路由,上述两条静态路由同时命中,所以可以迭代处两个出接口Pos1/0/0、Pos9/0/0。 
根因
1、静态路由配置产生的迭代深度问题导致路由不生效。
建议与总结

END