BGP
采集于 2026-07-28,来自本次部署的一台 CE。sitecli/capture-manifest.json
记录了具体是哪个节点,而 scripts/capture-sitecli.sh --check 会针对一台在线 CE
重新校验命令接口。
CE 使用 FRR 运行 BGP。在此拓扑中,它与两个 Azure Route Server 实例建立对等,通告 VIP,并学习 VNet 前缀。
show-ip-bgp-summary
Section titled “show-ip-bgp-summary”从这里开始。一屏即可告知你对等是否已建立,以及它已稳定多久。
{"command":["show-ip-bgp-summary"]}Instance 4094:
IPv4 Unicast Summary:BGP router identifier 10.0.1.4, local AS number 64512 vrf-id 3BGP table version 3RIB entries 3, using 480 bytes of memoryPeers 2, using 41 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd10.0.4.4 4 65515 1063 932 0 0 0 01:17:22 110.0.4.5 4 65515 1063 932 0 0 0 01:17:23 1
Total number of neighbors 2首先看 State/PfxRcd。数字表示已接收的前缀数量,意味着会话已建立;其他任何内容——Active、Connect、Idle——都表示会话未建立。Up/Down
显示当前状态已持续多长时间,因此一个不断重置的会话会显示出一个可疑的极小值。
show-ip-bgp
Section titled “show-ip-bgp”完整的路由表,可以看到最佳路径的选择结果。
{"command":["show-ip-bgp"]}Instance 4094:BGP table version is 3, local router ID is 10.0.1.4, vrf id 3Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R RemovedNexthop codes: @NNN nexthop's vrf id, < announce-nh-selfOrigin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path*= 10.0.0.0/16 10.0.4.4 0 65515 i*> 10.0.4.5 0 65515 i*> 10.250.0.10/32 10.0.1.4 255 32768 ?
Displayed 2 routes and 3 total paths* 表示有效路由,> 表示所选的最佳路径,= 表示多路径成员。在上面的采集中,学习到的 VNet 前缀 10.0.0.0/16 有两条路径——分别经由每个 Route Server
实例——分别标记为 *= 和 *>:一条最佳路径加一个多路径成员,因此该节点会将其
返回流量在两个实例之间负载分担。VIP 10.250.0.10/32 只有一条 *> 路径,
因为该节点是其起源节点。
show-ip-bgp-neighbors
Section titled “show-ip-bgp-neighbors”每个邻居的详情:协商的能力、定时器、消息计数器以及 上次重置的原因。
{"command":["show-ip-bgp-neighbors"]}当摘要显示某个会话在抖动而你需要知道原因时,就用它。
Last reset 及其原因是有用的行。
show-ip-bgp-neighbors-advertised-route
Section titled “show-ip-bgp-neighbors-advertised-route”该节点正在告诉其对等体什么,而不是它自己知道什么。
{"command":["show-ip-bgp-neighbors-advertised-route"]}bgp neighbor:BGP table version is 3, local router ID is 10.0.1.4, vrf id 3Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R RemovedNexthop codes: @NNN nexthop's vrf id, < announce-nh-selfOrigin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path*> 10.0.0.0/16 0.0.0.0 0 65515 i*> 10.250.0.10/32 0.0.0.0 255 32768 ?
Total number of prefixes 2
bgp neighbor:BGP table version is 3, local router ID is 10.0.1.4, vrf id 3Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R RemovedNexthop codes: @NNN nexthop's vrf id, < announce-nh-selfOrigin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path*> 10.0.0.0/16 0.0.0.0 0 65515 i*> 10.250.0.10/32 0.0.0.0 255 32768 ?
Total number of prefixes 2这是用于排查”VIP 从 VNet 不可达”的命令。如果 VIP 在这里 缺失,问题就在这个节点上,再怎么去看对等体也 无济于事。
输出会为每个对等体重复一个 bgp neighbor: 块,因此在此拓扑上你会看到
相同的两个前缀出现两次——每个 Route Server 实例一次。这不是重复
渲染:正是它确认了该节点向两者都进行了通告。如果某个块对一个
对等体存在,而对另一个缺失或内容偏少,那才是值得关注的情况。