簡介
本檔案將說明在Cisco Ultra封包核心(UPC)和Nexus 9000交換器之間設定備援BGP連線的邊界閘道通訊協定(BGP)翻動的解決方案。
問題
當Cisco Ultra資料包核心和Nexus交換機之間的某個冗餘介面發生抖動時,會觸發BGP抖動。
狀況
Ultra封包核心(UPC)節點在獨立的連線埠上連線到Nexus枝葉A和枝葉B。BGP IPv6對等體已建立,預設路由安裝在UPC節點上。圖1顯示了包含到枝葉交換機的冗餘路徑的高級網路圖。
圖1:網路圖
組態
使用VLAN和介面繫結的UPC埠配置:
port ethernet 1/10
no shutdown
vlan 140
no shutdown
bind interface saegw_vlan140_1/10 saegw
#exit
#exit
port ethernet 1/11
no shutdown
vlan 141
no shutdown
bind interface saegw_vlan141_1/11 saegw
#exit
#exit
end
使用IP地址配置UPC介面:
interface saegw_vlan140_1/10
ip address 10.11.11..8 255.255.255.0
ipv6 address fd00:10:11:11::8/64 secondary
bfd interval 300 min_rx 300 multiplier 3
#exit
interface saegw_vlan141_1/11
ip address 10.11.12.8 255.255.255.0
ipv6 address fd00:10:11:12::8/64 secondary
bfd interval 300 min_rx 300 multiplier 3
#exit
UPC BGP配置:
router bgp 25949
router-id 172.19.20.30
maximum-paths ebgp 4
neighbor 10.11.11..1 remote-as 25949
neighbor 10.11.11..1 fall-over bfd
neighbor 10.11.12.1 remote-as 25949
neighbor 10.11.12.1 fall-over bfd
neighbor fd00:10:11:11::1 remote-as 25949
neighbor fd00:10:11:12::1 remote-as 25949
address-family ipv4
neighbor 10.11.11..1 route-map accept_default in
neighbor 10.11.11..1 route-map gw-1-OUT out
neighbor 10.11.12.1 route-map accept_default in
neighbor 10.11.12.1 route-map gw-1-OUT out
redistribute connected
#exit
address-family ipv6
neighbor fd00:10:11:11::1 activate
neighbor fd00:10:11:11::1 route-map accept_v6_default in
neighbor fd00:10:11:11::1 route-map allow_service_ips_v6 out
neighbor fd00:10:11:12::1 activate
neighbor fd00:10:11:12::1 route-map accept_v6_default in
neighbor fd00:10:11:12::1 route-map allow_service_ips_v6 out
redistribute connected
#exit
ipv6 prefix-list name accept_v6_default_routes seq 10 permit ::/0
route-map accept_v6_default permit 10
match ipv6 address prefix-list accept_v6_default_routes
#exit
Nexus 9000交換機配置:
Interface vlan140
ipv6 address fd00:10:11:11::1/64
no ipv6 redirects
interface vlan141
ipv6 address fd00:10:11:12::1/64
no ipv6 redirects
vrf upc
address-family ipv4 unicast
advertise l2vpn evpn
maximum-paths ibgp 2
address-family ipv6 unicast
advertise l2vpn evpn
maximum-paths ibgp 2
neighbor fd00:10:11:12::5
remote-as 25949
address-family ipv6 unicast
neighbor fd00:10:11:12::6
remote-as 25949
address-family ipv6 unicast
neighbor fd00:10:11:12::8
remote-as 25949
address-family ipv6 unicast
分析
最初,會觀察到一個UPC介面(fd00:10:11:12::8)和Nexus交換機(fd00:10:11:12::1屬於vlan141)之間的正常BGP通訊,其中包括TCP ACK消息:
2023-01-01 01:01:59.000000 fd00:10:11:12::8 -> fd00:10:11:12::1 TCP 35813 > bgp [ACK] Seq=250 Ack=8664 Win=31744 Len=0 TSV=2412344062 TSER=531234647
2023-01-01 01:01:59.000087 fd00:10:11:12::8 -> fd00:10:11:12::1 TCP 35813 > bgp [ACK] Seq=250 Ack=11520 Win=37376 Len=0 TSV=2412344062 TSER=531234647
2023-01-01 01:01:59.000162 fd00:10:11:12::8 -> fd00:10:11:12::1 TCP 35813 > bgp [ACK] Seq=250 Ack=14376 Win=43008 Len=0 TSV=241234062 TSER=531234647
2023-01-01 01:01:59.000281 fd00:10:11:12::8 -> fd00:10:11:12::1 TCP 35813 > bgp [ACK] Seq=250 Ack=17232 Win=49152 Len=0 TSV=2412344062 TSER=531234647
2023-01-01 01:01:59.000936 fd00:10:11:12::8 -> fd00:10:11:12::1 TCP 35813 > bgp [ACK] Seq=250 Ack=20663 Win=48640 Len=0 TSV=2412344063 TSER=531234647
在枝葉B介面向UPC發生故障時,日誌中出現錯誤行為,其中UPC(源:fd00:10:11:12::8)對屬於不同VLAN(vlan140)的介面fd00:10:11:11::1上的枝葉A發起新的BGP連線嘗試。
2023-01-01 22:36:12.370117 fd00:10:11:12::8 -> fd00:10:11:11::1 TCP 41987 > bgp [SYN] Seq=0 Win=14400 Len=0 MSS=1440 TSV=2412347369 TSER=0 WS=9
在錯誤的介面上傳送的此類無效BGP SYN消息會導致BGP關閉。當Nexus通告其自己的已連線路由,並且UPC獲得在BGP上發生故障的介面的路由時,UPC會嘗試通過另一個具有不同/錯誤的傳出IP的介面進行連線。
解決方案
由於本文「條件」部分中提到的配置,由於UPC從兩個介面都收到兩個枝葉的已連線路由資訊,因此當其中一個介面關閉時,UPC會嘗試通過另一個介面與該枝葉通訊。
要避免UPC從錯誤的介面傳送BGP連線建立消息,請注意以下配置更改:
- 在UPC配置中,新增
update-source
為鄰居。如果主介面關閉,此配置將阻止來自其他介面的BGP連線。例如,當saegw_vlan140_1/10(fd00:10:11:11::1/64)關閉時,節點不能對BGP對等體fd00:10:11:11::8使用傳出介面saegw_vlan141_1/11。
以下是組態範例:
neighbor fd00:10:11:11::1 update-source fd00:10:11:11::8
neighbor fd00:10:11:12::1 update-source fd00:10:11:12::8
- 在Nexus配置中,阻止來自錯誤介面的字首。
例如,我們拒絕鄰居fd00:10:11:11::1上的冗餘枝葉的路由
neighbor fd00:10:11:11::1
update prefix list to deny fd00:10:11:12::8/64
- 在Nexus交換機中,通過VXLAN從VTEP到外部節點的EBGP對等必須位於租戶VRF中,並且必須使用
update-source
的 loopback
介面(通過VXLAN對等),如Cisco Nexus 9000配置指南中所建