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 實例各一次。那不是重複渲染:
它正是確認該節點同時向兩者通告的證據。若某個區塊只出現在一個對等節點上,
而另一個缺失或內容過短,那才是值得關注的情況。