路由器故障:BGP邻居无法建立

运维 网络运维
本文主要介绍了由于OSPF接口不一致导致BGP邻居无法建立的故障的解决,希望大家能够从中获得帮助。

BGP邻居无法建立故障之网络环境

在图中所示的组网中进行OSPF中建立BGP邻居建立配置。RouterA和RouterB之间链路层协议采用的为ppp,IGP协议为ospf,IBGP协议以各自loopback口作为发送BGP报文的源接口,RouterA和RouterB同属于area 0。RouterA的router-id为1.1.1.1,RouterB的router-id为2.2.2.2。

BGP邻居建立组网图

路由器故障:BGP邻居无法建立

配置完成后,发现ospf邻居显示建立,BGP邻居无法建立

#p#

BGP邻居无法建立故障之故障分析

步骤 1     依次在RouterA和RouterB执行display ospf peer命令,检查两个路由器的接口OSPF邻居是否建立,结果显示邻居已经达到FULL状态。

具体以RouterA的显示为例。

  1. [RouterA] display ospf peer  
  2.  
  3. OSPF Process 1 with Router ID 1.1.1.1  
  4.  
  5. Neighbors  
  6.  
  7. Area 0.0.0.1 interface 10.1.1.1(Serial1/0/1)'s neighbors  
  8.  
  9. Router ID: 2.2.2.2          Address: 10.1.1.2  
  10.  
  11. State: Full  Mode:Nbr is  Master  Priority: 1  
  12.  
  13. DR: None   BDR: None   MTU: 0  
  14.  
  15. Dead timer due in 35  sec  
  16.  
  17. Neighbor is up for 00:44:10  
  18.  
  19. Authentication Sequence: [ 0 ] 

 

步骤 2     在RouterA和RouterB上分别执行display bgp peer命令,结果BGP邻居状态处于Idle状态。

具体以RouterA的显示为例。

  1. [RouterA] display bgp peer  
  2.  
  3. BGP local router ID : 1.1.1.1  
  4.  
  5. Local AS number : 1  
  6.  
  7. Total number of peers : 1                 Peers in established state : 0  
  8.  
  9. Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv  
  10.  
  11. 2.2.2.2         4     1       20       20     0 00:00:31        Idle       0 

 

步骤 3     在RouterA上执行display ip routing-table命令,发现RouterA上没有能学习到RouterB上loopback口2.2.2.2/32的路由,这是通过ospf 学习到的。正常情况应该能够学到此路由。

具体以RouterA显示为例。

  1. [RouterA] display ip routing-table  
  2.  
  3. Route Flags: R - relay, D - download to fib  
  4.  
  5. ------------------------------------------------------------------------------  
  6.  
  7. Routing Tables: Public  
  8.  
  9. Destinations : 6        Routes : 6  
  10.  
  11.  
  12.  
  13. Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface  
  14.  
  15.  
  16.  
  17. 1.1.1.1/32  Direct 0    0           D  127.0.0.1       InLoopBack0  
  18.  
  19. 10.1.1.0/30  Direct 0    0           D  10.1.1.1        Serial1/0/1  
  20.  
  21. 10.1.1.1/32  Direct 0    0           D  127.0.0.1       InLoopBack0  
  22.  
  23. 10.1.1.2/32  Direct 0    0           D  10.1.1.2        Serial1/0/1  
  24.  
  25. 127.0.0.0/8   Direct 0    0           D  127.0.0.1       InLoopBack0  
  26.  
  27. 127.0.0.1/32  Direct 0    0           D  127.0.0.1       InLoopBack0 

 

步骤 4     在RouterA上执行disply ospf error命令,发现一个error。

具体RouterA显示.

  1. Configuration errors:  
  2.  
  3. 0     : Tunnel cost mistake  
  4.  
  5. 1     : The network type of the neighboring interface is not consistent. 

 

步骤 5     分别在RouterA和RouterB上执行display current-configuration命令,发现在RouterA上配置了ospf network-type broadcast这条命令,而RouterB上没有。

具体RouterA显示。

  1. sysname RouterA  
  2.  
  3. #  
  4.  
  5. interface Serial1/0/1  
  6.  
  7. link-protocol ppp  
  8.  
  9. ip address 10.1.1.1 255.255.255.252  
  10.  
  11. ospf cost 1  
  12.  
  13. ospf network-type broadcast  
  14.  

 

RouterB显示

  1. sysname RouterB  
  2.  
  3. #  
  4.  
  5. interface Serial1/0/1  
  6.  
  7. link-protocol ppp  
  8.  
  9. ip address 10.1.1.2 255.255.255.252  
  10.  
  11. ospf cost 1 

 

步骤 6     在RouterB的serial1/0/0口上配置ospf network-type broadcast这条命令后,执行display bgp peer命令。

RouterB显示BGP邻居状态信息为:

  1. [RouterB] display bgp peer  
  2.  
  3. BGP local router ID : 2.2.2.2  
  4.  
  5. Local AS number : 1  
  6.  
  7. Total number of peers : 1                 Peers in established state : 1  
  8.  
  9. Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv  
  10.  
  11. 1.1.1.1         4     1       28       39     0 00:10:00 Established       0 

 

状态变为Established,BGP邻居成功建立。

步骤 7     在RouterA上执行display ip routing-table命令,路由表中已经通过OSPF学到了RouterB的Loopback口2.2.2.2/32的路由信息。

具体RouterA显示。

  1. [RouterA] display ip routing-table  
  2.  
  3. Route Flags: R - relay, D - download to fib  
  4.  
  5. ------------------------------------------------------------------------------  
  6.  
  7. Routing Tables: Public  
  8.  
  9. Destinations : 7        Routes : 7  
  10.  
  11. Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface  
  12.  
  13. 1.1.1.1/32  Direct  10   2           D  10.1.1.1        Serial1/0/1  
  14.  
  15. 2.2.2.2/32  OSPF    0    0           D  127.0.0.1       InLoopBack0  
  16.  
  17. 10.1.1.0/30  Direct 0    0           D  10.1.1.2        Serial1/0/1  
  18.  
  19. 10.1.1.1/32  Direct 0    0           D  10.1.1.1        Serial1/0/1  
  20.  
  21. 10.1.1.2/32  Direct 0    0           D  127.0.0.1       InLoopBack0  
  22.  
  23. 127.0.0.0/8   Direct 0    0           D  127.0.0.1       InLoopBack0  
  24.  
  25. 127.0.0.1/32  Direct 0    0           D  127.0.0.1       InLoopBack0 

 

故障解决。

----结束

#p#

BGP邻居无法建立故障之处理步骤

在RouterB上进行完接口IP配置和OSPF基础配置之后,分别执行以下操作。

步骤 1     执行命令system-view,进入系统视图。

步骤 2     执行命令interface interface-type interface-number,进入接口视图。

步骤 3     执行命令ospf network-type broadcast。

步骤 4     执行命令return退回到用户视图,执行命令save,保存对配置的修改。

----结束

完成上述操作后,BGP邻居状态表为Established状态,故障排除。

BGP邻居无法建立故障之案例总结

在ospf中如果链路层协议配置为ppp,则ospf的network-type 默认为p2p如果强制一端为其他类型,ospf显示邻居虽然建立,但是处于一种非正常状态,无法学习到对端ospf路由。因而一些设备到对端的loopback口路由不可达,TCP连接没有正常建立,故BGP邻居无法正常建立。

【编辑推荐】

  1. 路由器故障:A个平面业务中断
  2. 路由器故障:OSPF路由选路失败
  3. 路由器故障:静态ARP配置不生效
  4. 路由器故障:黑洞路由导致业务中断
  5. 路由器故障:OSPF邻居无法正常建立 
  6. 路由器故障:下行设备无法学习到等值路由
责任编辑:佚名 来源: 51CTO
相关推荐

2011-03-30 16:27:07

POS接口OSPF

2011-04-11 16:29:31

OSPF

2011-05-17 13:31:37

IBGP路由

2011-04-08 17:42:13

OSPFOSPF邻居

2011-05-11 14:28:31

IS-IS路由IP-Trunk

2011-04-11 16:20:06

OSPF

2011-08-25 15:15:16

MPLS LDP邻居ATM接口MPLS LDP协议

2011-05-17 13:31:48

IBGP路由EBGP

2011-05-17 13:07:55

IBGP

2011-05-17 13:25:53

IBGPOSPF路由表

2011-09-16 15:52:14

BGP路由器故障VSI

2011-05-17 10:59:07

EBGPLoopback地址

2011-04-08 18:05:31

2009-12-22 15:04:11

路由器无法拨号故障

2015-02-10 09:32:20

BGP路由器

2011-04-08 17:10:54

路由静态路由

2011-04-08 17:22:40

路由

2011-08-25 10:59:06

192.168.1.1路由器

2011-04-08 18:13:29

默认路由等值路由

2010-08-25 11:04:28

路由器故障
点赞
收藏

51CTO技术栈公众号