路由器故障:BGP鄰居無法建立
BGP鄰居無法建立故障之網(wǎng)絡環(huán)境
在圖中所示的組網(wǎng)中進行OSPF中建立BGP鄰居建立配置。RouterA和RouterB之間鏈路層協(xié)議采用的為ppp,IGP協(xié)議為ospf,IBGP協(xié)議以各自loopback口作為發(fā)送BGP報文的源接口,RouterA和RouterB同屬于area 0。RouterA的router-id為1.1.1.1,RouterB的router-id為2.2.2.2。
BGP鄰居建立組網(wǎng)圖
配置完成后,發(fā)現(xiàn)ospf鄰居顯示建立,BGP鄰居無法建立
#p#
BGP鄰居無法建立故障之故障分析
步驟 1 依次在RouterA和RouterB執(zhí)行display ospf peer命令,檢查兩個路由器的接口OSPF鄰居是否建立,結(jié)果顯示鄰居已經(jīng)達到FULL狀態(tài)。
具體以RouterA的顯示為例。
- [RouterA] display ospf peer
- OSPF Process 1 with Router ID 1.1.1.1
- Neighbors
- Area 0.0.0.1 interface 10.1.1.1(Serial1/0/1)'s neighbors
- Router ID: 2.2.2.2 Address: 10.1.1.2
- State: Full Mode:Nbr is Master Priority: 1
- DR: None BDR: None MTU: 0
- Dead timer due in 35 sec
- Neighbor is up for 00:44:10
- Authentication Sequence: [ 0 ]
步驟 2 在RouterA和RouterB上分別執(zhí)行display bgp peer命令,結(jié)果BGP鄰居狀態(tài)處于Idle狀態(tài)。
具體以RouterA的顯示為例。
- [RouterA] display bgp peer
- BGP local router ID : 1.1.1.1
- Local AS number : 1
- Total number of peers : 1 Peers in established state : 0
- Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
- 2.2.2.2 4 1 20 20 0 00:00:31 Idle 0
步驟 3 在RouterA上執(zhí)行display ip routing-table命令,發(fā)現(xiàn)RouterA上沒有能學習到RouterB上loopback口2.2.2.2/32的路由,這是通過ospf 學習到的。正常情況應該能夠?qū)W到此路由。
具體以RouterA顯示為例。
- [RouterA] display ip routing-table
- Route Flags: R - relay, D - download to fib
- ------------------------------------------------------------------------------
- Routing Tables: Public
- Destinations : 6 Routes : 6
- Destination/Mask Proto Pre Cost Flags NextHop Interface
- 1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 10.1.1.0/30 Direct 0 0 D 10.1.1.1 Serial1/0/1
- 10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 10.1.1.2/32 Direct 0 0 D 10.1.1.2 Serial1/0/1
- 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
步驟 4 在RouterA上執(zhí)行disply ospf error命令,發(fā)現(xiàn)一個error。
具體RouterA顯示.
- Configuration errors:
- 0 : Tunnel cost mistake
- 1 : The network type of the neighboring interface is not consistent.
步驟 5 分別在RouterA和RouterB上執(zhí)行display current-configuration命令,發(fā)現(xiàn)在RouterA上配置了ospf network-type broadcast這條命令,而RouterB上沒有。
具體RouterA顯示。
- sysname RouterA
- #
- interface Serial1/0/1
- link-protocol ppp
- ip address 10.1.1.1 255.255.255.252
- ospf cost 1
- ospf network-type broadcast
- #
RouterB顯示
- sysname RouterB
- #
- interface Serial1/0/1
- link-protocol ppp
- ip address 10.1.1.2 255.255.255.252
- ospf cost 1
步驟 6 在RouterB的serial1/0/0口上配置ospf network-type broadcast這條命令后,執(zhí)行display bgp peer命令。
RouterB顯示BGP鄰居狀態(tài)信息為:
- [RouterB] display bgp peer
- BGP local router ID : 2.2.2.2
- Local AS number : 1
- Total number of peers : 1 Peers in established state : 1
- Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
- 1.1.1.1 4 1 28 39 0 00:10:00 Established 0
狀態(tài)變?yōu)镋stablished,BGP鄰居成功建立。
步驟 7 在RouterA上執(zhí)行display ip routing-table命令,路由表中已經(jīng)通過OSPF學到了RouterB的Loopback口2.2.2.2/32的路由信息。
具體RouterA顯示。
- [RouterA] display ip routing-table
- Route Flags: R - relay, D - download to fib
- ------------------------------------------------------------------------------
- Routing Tables: Public
- Destinations : 7 Routes : 7
- Destination/Mask Proto Pre Cost Flags NextHop Interface
- 1.1.1.1/32 Direct 10 2 D 10.1.1.1 Serial1/0/1
- 2.2.2.2/32 OSPF 0 0 D 127.0.0.1 InLoopBack0
- 10.1.1.0/30 Direct 0 0 D 10.1.1.2 Serial1/0/1
- 10.1.1.1/32 Direct 0 0 D 10.1.1.1 Serial1/0/1
- 10.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
故障解決。
----結(jié)束
#p#
BGP鄰居無法建立故障之處理步驟
在RouterB上進行完接口IP配置和OSPF基礎配置之后,分別執(zhí)行以下操作。
步驟 1 執(zhí)行命令system-view,進入系統(tǒng)視圖。
步驟 2 執(zhí)行命令interface interface-type interface-number,進入接口視圖。
步驟 3 執(zhí)行命令ospf network-type broadcast。
步驟 4 執(zhí)行命令return退回到用戶視圖,執(zhí)行命令save,保存對配置的修改。
----結(jié)束
完成上述操作后,BGP鄰居狀態(tài)表為Established狀態(tài),故障排除。
BGP鄰居無法建立故障之案例總結(jié)
在ospf中如果鏈路層協(xié)議配置為ppp,則ospf的network-type 默認為p2p如果強制一端為其他類型,ospf顯示鄰居雖然建立,但是處于一種非正常狀態(tài),無法學習到對端ospf路由。因而一些設備到對端的loopback口路由不可達,TCP連接沒有正常建立,故BGP鄰居無法正常建立。
【編輯推薦】