簡介
本檔案介紹邊界閘道通訊協定(BGP)健康狀況檢查以及如何對CLI進行疑難排解。
ASR 5000/ASR 5500/虛擬資料包核心支援作為AS間路由協定的BGP。BGP也可用作機箱間會話恢復(ICSR)的監控機制。
系統中配置的鄰居狀態
以下CLI範例顯示如何檢查系統中設定的BGP鄰居狀態。系統中存在的每個情景都有一個獨立的路由表;因此,為了檢查BGP路由資訊,操作員必須處於要檢查的所需上下文中。
以下是情境感知CLI。
- BGP鄰居資訊show ip bgp summary
此處的示例顯示了上下文gn下的IPv4和IPv6鄰居條目。在上述示例中,四個鄰居運行在ECMP模式下,為系統提供了更高的吞吐量和可靠性。 您可以在Up/Down和State列下檢查對等體的穩定性。
[gn]asr5500# show ip bgp summary
BGP Address-Family : IPv4
BGP router identifier 10.10.1.100, local AS number 2
BGP table version is 2
2 BGP AS-PATH entries
Neighbor V AS MsgRcvd MsgSent TblVer Up/Down State/PfxRcd
192.168.2.1 4 65021 1362115 1666073 2 12w5d12h 1
192.168.3.1 4 65021 1362137 1666216 2 12w5d12h 1
192.168.4.1 4 65021 1362115 1665912 2 12w5d12h 1
192.168.5.1 4 65021 1362137 1666148 2 12w5d12h 1
BGP Address-Family : IPv6
BGP router identifier 10.10.1.100, local AS number 2
BGP table version is 2
2 BGP AS-PATH entries
Neighbor V AS MsgRcvd MsgSent TblVer Up/Down State/PfxRcd
2000:4000:1:aa01:a0:100:0:a1 4 65021 1362115 1666009 2 12w5d12h 1
2000:4000:1:aa01:a0:100:0:b1 4 65021 1362137 1666175 2 12w5d12h 1
2000:4000:1:aa01:a0:100:0:a2 4 65021 1362115 1666051 2 12w5d12h 1
2000:4000:1:aa01:a0:100:0:b2 4 65021 1362137 1666199 2 12w5d12h 1
- 顯示詳細的BGP鄰居資訊 show ip bgp neighbors
[gn]asr5500# show ip bgp neighbors
BGP neighbor is 192.168.2.1, remote AS 1, local AS 2, external link
BGP version 4, remote router ID 10.1.1.1
BGP state = Established,up for 00:08:50
Hold time is 90 seconds, keepalive interval is 30 seconds
Configured Hold time is 90 seconds, keepalive interval is 30 seconds
Connect Interval is 20 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 23 messages, 0 notifications, 0 in queue
Sent 25 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
AF-dependant capabilities:
Graceful restart: advertised
0 accepted prefixes, maximum limit 40960
Threshold for warning message 75(%)
3 announced prefixes
For address family: VPNv4 Unicast
0 accepted prefixes
0 announced prefixes
For address family: IPv6 Unicast
0 accepted prefixes
0 announced prefixes
For address family: VPNv6 Unicast
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 192.168.2.2, Local port: 38190
Foreign host: 192.168.2.1, Foreign port: 179
Next hop: 192.168.2.2
Next hop global: fe80::5:47ff:fe30:4fd8
運行狀況檢查CLI
以下是情境感知CLI。需要這些命令才能從正確的上下文中運行。
- show ip interface summary
- show ipv6 interface summary
- show ip bgp
- show ip bgp summary
- show ip bgp neighbors
- show ip bgp neighbors <IP Address> accepted-routes
- show ip bgp neighbors <IP Address> advertised-routes
- show ip bgp neighbors <IP Address> received-routes
- ping <BGP Neighbor IPV4> src <IPv4 Loopback>
- ping6 <BGP Neighbor IPv6> src <IPv6環回>
排除CLI故障
- show snmp trap history verbose | grep -i bgp
- 顯示日誌 | grep -i bgp
- show srp monitor all(如果使用ICSR)
只有根據思科支援部門的建議才能執行這些命令,因為日誌記錄過高可能會給系統帶來壓力並影響使用者。
- logging filter active facility bgp level debug
- logging filter active facility iparp level debug
- 日誌記錄活動
- 無活動日誌記錄
- Wireshark跟蹤
SNMP陷阱
顯示與BGP相關的SNMP陷阱
show snmp trap history verbose | grep -i bgp
此處的示例顯示上下文gn中的IPv6鄰居已關閉並恢復。
Mon Jan 11 07:14:18 2021 Internal trap notification 1289 (BGPPeerSessionIPv6Down) vpn gn ipaddr 2000:4000:1:aa01:a0:100:0:a1
Mon Jan 11 09:03:06 2021 Internal trap notification 1288 (BGPPeerSessionIPv6Up) vpn gn ipaddr 2000:4000:1:aa01:a0:100:0:a1
- BGPPeerSessionDown
說明:到指定IP地址的BGP對等會話不再運行。
可能原因:BGP對等點無法運作;節點和BGP對等體之間的網路發生中斷。要採取的行動:驗證BGP對等點是否可操作;驗證與BGP對等體的網路連線。
- BGPPeerSessionUp
說明:到指定IP地址的BGP對等會話運行正常。這可能表示新對等體的初始配置、系統重新啟動後的初始連線或BGPPeerSessionDown事件後的連線恢復。
要採取的行動:無需任何操作。
- BGPPeerSessionIPv6Down
說明:到指定IPv6地址的BGP對等會話不再運行。
可能原因:BGP對等點無法運作;節點和BGP對等體之間的網路發生中斷。
要採取的行動:驗證BGP對等點是否可操作;驗證與BGP對等體的網路連線。
- BGPPeerSessionIPv6Up
說明:到指定IPv6地址的BGP對等會話運行正常。這可能表示新對等體的初始配置、系統重新啟動後的初始連線或starBGNPeerSessionDown事件後的連線恢復。
要採取的行動:無需任何操作。