简介
本文档介绍边界网关协议(BGP)运行状况检查以及如何排除CLI故障。
ASR 5000/ASR 5500/虚拟数据包核心支持BGP,该BGP是AS间路由协议。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邻居IPV4> src <IPv4 Loopback>
- ping6 <BGP邻居IPv6> src <IPv6 Loopback>
排除CLI故障
- show snmp trap history verbose | grep -i bgp
- show logs | grep -i bgp
- show srp monitor all(如果使用ICSR)
这些命令应仅在思科支持部门提出建议时执行,因为过高的日志记录可能会对系统造成风险压力并影响用户。
- logging filter active facility bgp level
- logging filter active facility level debug
- 日志记录活动
- no logging active
- Wireshark跟踪
SNMP 陷阱
显示与BGP相关的SNMP陷阱
show snmp trap history verbose | grep -i bgp
此处的示例显示情景中的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事件后的连接恢复。
要采取的操作:无所需操作