本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本檔案將介紹將透過IPv6執行的封裝區段路由(SRv6)套用到BGP IPv6單點傳播作業階段時的控制平面流。
有關其他資訊,請參閱Cisco ASR 9000系列路由器IOS XR版本24.1.x、24.2.x、24.3.x、24.4.x的網段路由配置指南。
本文檔中使用的拓撲如圖1所示。 SRv6域由三台路由器組成,所有這些路由器都運行在Cisco IOS-XR上。SRv6底層基礎設施使用IS-IS和uSID SRv6實現。路由器R1和R3之間建立BGP IPv6單播對等,而路由器R2不參與BGP,在此配置中作為P路由器運行。R1和R3上的Loopback 6介面代表必須在兩個BGP IPv6單播對等體之間交換的IPv6字首。
圖1.通過SRv6的BGP ipv6單播的拓撲圖
本節顯示所有三台SRv6路由器的配置。路由器R2僅包括SRv6配置,因為它不參與BGP。
路由器R1是SRv6域的一部分,定位符為fc00:bb00:1::/48。它還充當BGP IPv6單播路由器,發出本地字首fc00:aa00:1::1/128。此外,它通過SRv6基礎架構與路由器R3建立BGP IPv6單播對等。以粗體突出顯示的配置是調試本文檔中所述控制流的起點,並且是整個中使用的唯一觸發器。
interface Loopback0 ipv4 address 10.0.0.1 255.255.255.255 ipv6 address fc00:bb00:1::1/128 ! interface Loopback6 ipv6 address fc00:aa00:1::1/128 ! interface TenGigE0/0/0/8 ipv6 enable ! router isis 1 is-type level-1 net 49.0000.0000.0001.00 address-family ipv6 unicast metric-style wide segment-routing srv6 locator MAIN ! ! ! interface TenGigE0/0/0/8 point-to-point address-family ipv6 unicast ! ! ! router bgp 1 bgp router-id 10.0.0.1 segment-routing srv6 locator MAIN ! address-family ipv6 unicast segment-routing srv6 locator MAIN alloc mode per-vrf ! network fc00:aa00:1::1/128 ! neighbor fc00:bb00:3::1 remote-as 1 update-source Loopback0 address-family ipv6 unicast encapsulation-type srv6 ! ! segment-routing srv6 encapsulation source-address fc00:bb00:1::1 ! locators locator MAIN micro-segment behavior unode psp-usd prefix fc00:bb00:1::/48 !
路由器R2屬於SRv6域,定位符為fc00:bb00:2::/48。它不參與BGP,在此拓撲中作為P路由器運行。
interface Loopback0 ipv4 address 10.0.0.2 255.255.255.255 ipv6 address fc00:bb00:2::1/128 ! interface TenGigE0/0/0/0 description TO R1 ipv6 enable ! interface TenGigE0/0/0/1 description TO R2 ipv6 enable ! router isis 1 is-type level-1 net 49.0000.0000.0002.00 address-family ipv6 unicast metric-style wide segment-routing srv6 locator MAIN ! ! ! interface TenGigE0/0/0/0 point-to-point address-family ipv6 unicast ! ! interface TenGigE0/0/0/1 point-to-point address-family ipv6 unicast ! ! ! segment-routing srv6 encapsulation source-address fc00:bb00:2::1 ! locators locator MAIN micro-segment behavior unode psp-usd prefix fc00:bb00:2::/48 !
路由器R3屬於SRv6域,定位符為fc00:bb00:3::/48。它與路由器R1具有BGP IPv6單播對等,並且兩者都交換其Loopback 6介面的IPv6字首。
interface Loopback0 ipv4 address 10.0.0.3 255.255.255.255 ipv6 address fc00:bb00:3::1/128 ! interface Loopback6 ipv6 address fc00:aa00:3::3/128 ! interface TenGigE0/0/0/1 description TO R2 ipv6 enable ! router isis 1 is-type level-1 net 49.0000.0000.0003.00 address-family ipv6 unicast metric-style wide segment-routing srv6 locator MAIN ! ! ! interface TenGigE0/0/0/1 point-to-point address-family ipv6 unicast ! ! ! router bgp 1 bgp router-id 10.0.0.3 segment-routing srv6 locator MAIN ! address-family ipv6 unicast segment-routing srv6 locator MAIN alloc mode per-vrf ! network fc00:aa00:3::3/128 ! neighbor fc00:bb00:1::1 remote-as 1 update-source Loopback0 address-family ipv6 unicast encapsulation-type srv6 ! ! segment-routing srv6 encapsulation source-address fc00:bb00:3::1 ! locators locator MAIN micro-segment behavior unode psp-usd prefix fc00:bb00:3::/48 ! ! ! !
在底層SRv6基礎架構中,每台路由器在整個拓撲中都有鏈路狀態資訊,每台路由器都通過鏈路狀態ISIS協定通告其SRv6定位器。R1上的ISIS資料庫顯示了參與SRv6域的所有路由器的定位器。
RP/0/RSP0/CPU0:R1#show isis database verbose R1 | include SRv6 Locator SRv6 Locator: MT (IPv6 Unicast) fc00:bb00:1::/48 D:0 Metric: 1 Algorithm: 0
RP/0/RSP0/CPU0:R1#show isis database verbose R2 | include SRv6 Locator SRv6 Locator: MT (IPv6 Unicast) fc00:bb00:2::/48 D:0 Metric: 0 Algorithm: 0
RP/0/RSP0/CPU0:R1#show isis database verbose R3 | include SRv6 Locator SRv6 Locator: MT (IPv6 Unicast) fc00:bb00:3::/48 D:0 Metric: 1 Algorithm: 0
此SRv6實施支援全域性路由表(GRT)流量重疊。當R1和R3上啟用全域性BGP IPv6單播覆蓋服務時,每台路由器都會生成新的服務SID。此服務SID與預設VRF關聯,在此場景中利用終端行為uDT6。必須在BGP IPv6單播對等體之間交換此服務SID,以便在兩個BGP對等體之間啟用SRv6轉發。下一節將概述BGP信令流的步驟,從觸發執行(啟用encapsulation-type srv6)到路由器R3上對SRv6轉發進行程式設計的點開始。
在BGP對等體的IPv6單播SAFI上啟用SRv6封裝之前,路由器R1必須具有具有已分配服務SID的BGP IPv6字首。當R1上的IPv6單播全域性SAFI下啟用「segment-routing srv6」時,會發生這種情況。輸出顯示本地SID fc00:bb00:1:e002::分配給BGP ipv6單播下的所有字首。
RP/0/RSP0/CPU0:R1#show bgp ipv6 unicast local-sids BGP router identifier 10.0.0.1, local AS number 1 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0xe0800000 RD version: 7 BGP table nexthop route policy: BGP main routing table version 7 BGP NSR Initial initsync version 7 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard Origin codes: i - IGP, e - EGP, ? - incomplete Network Local Sid Alloc mode Locator *> fc00:aa00:1::1/128 fc00:bb00:1:e002:: per-vrf MAIN *>ifc00:aa00:3::3/128 NO SRv6 Sid - - Processed 2 prefixes, 2 paths
此服務SID由R1上的sid_mgr進程本地程式設計,該進程將終端行為視為uDT6,它與預設vrf關聯並由bgp擁有。這僅僅意味著,只要R1收到具有目的地址的資料包與服務SID fc00:bb00:1:e002::它是最後一個網段,R1必須解除封裝報頭並將解除封裝的資料包提交給IPv6預設vrf表的FIB查詢。這是根據RFC8986(它列出了所有SRv6端點行為)進行的。注意其中顯示sid_mgr建立服務SID fc00:bb00:1:e002:然後把這個資訊傳給RIB,最後傳給FIB
RP/0/RSP0/CPU0:R1#show segment-routing srv6 sid all *** Locator: 'MAIN' *** SID Behavior Context Owner State RW -------------------------- ---------------- -------------------------------- ------------------ ----- -- fc00:bb00:1:: uN (PSP/USD) 'default':1 sidmgr InUse Y fc00:bb00:1:e001:: uA (PSP/USD) [Te0/0/0/8, Link-Local]:0 isis-1 InUse Y fc00:bb00:1:e002:: uDT6 'default' bgp-1 InUse Y
RP/0/RSP0/CPU0:R1#show segment-routing srv6 sid fc00:bb00:1:e002:: internal *** Locator: 'MAIN' *** SID Behavior Context Owner State RW -------------------------- ---------------- -------------------------------- ------------------ ----- --
fc00:bb00:1:e002:: uDT6 'default' bgp-1 InUse Y SID Function: 0xe002 SID context: { table-id=0xe0800000 ('default':IPv6/Unicast) } App data: [0000000000000000] Locator: 'MAIN' Allocation type: Dynamic Owner List: 1) Name: bgp-1, Client-ID: 32, Proto-ID: 8, Node-ID: 0, Locator-ID: 5 () Refcount: 1 Flags: 0x0 () Chkpt Obj ID: 0x2f60 TI Object: Type: Entry Ptr: 0x140160285526000, Producer ID: 0 Flags: Generic: 0x0 () Specific: 0x0 () Modified: Fri Jun 27 16:27:05 EST 2025 (2d01h ago) Created: Jun 27 16:17:40.796 (2d01h ago) Event history: SIDMGR-OPCODE-EVENT-CLASS Total entries : 4 +---------------------------------+----------------------+------+ | Event | Time Stamp | S, M | +---------------------------------+----------------------+------+ | object create | Jun 27 16:17:40.864 | 1, 0 | | object delete | Jun 27 16:27:04.320 | 1, 1 | | object modify | Jun 27 16:27:04.320 | 0, 1 | | object refcount decrement | Jun 27 16:27:04.320 | 0, 1 | +---------------------------------+----------------------+------+ RP/0/RSP0/CPU0:R1#show route ipv6 fc00:bb00:1:e002:: detail Routing entry for fc00:bb00:1:e002::/64 Known via "local-srv6 bgp-1", distance 0, metric 0, SRv6 Endpoint uDT6, SRv6 Format f3216 Installed Jun 27 16:27:06.040 for 2d01h Routing Descriptor Blocks directly connected Route metric is 0 Label: None Tunnel ID: None Binding Label: None Extended communities count: 0 NHID: 0x0 (Ref: 0) Route version is 0x15 (21) No local label IP Precedence: Not Set QoS Group ID: Not Set Flow-tag: Not Set Fwd-class: Not Set Route Priority: RIB_PRIORITY_LOCAL (3) SVD Type RIB_SVD_TYPE_LOCAL Download Priority 0, Download Version 3140327 No advertising protos.
RP/0/RSP0/CPU0:R1#show cef ipv6 fc00:bb00:1:e002:: fc00:bb00:1:e002::/64, version 3140327, SRv6 Endpoint uDT6, internal 0x1000001 0x0 (ptr 0x7bb98f54) [1], 0x400 (0x7ba7cfa0), 0x0 (0x7a90d290) Updated Jun 27 16:27:06.043 Prefix Len 64, traffic index 0, precedence n/a, priority 0 gateway array (0x78e92608) reference count 3, flags 0x0, source rib (7), 0 backups [4 type 3 flags 0x8401 (0x78f35598) ext 0x0 (0x0)] LW-LDI[type=3, refc=1, ptr=0x7ba7cfa0, sh-ldi=0x78f35598] gateway array update type-time 1 Jun 26 15:54:48.345 LDI Update time Jun 26 15:54:48.349 LW-LDI-TS Jun 27 16:17:42.533 Accounting: Disabled via ::/128, 0 dependencies, weight 0, class 0 [flags 0x0] path-idx 0 NHID 0x0 [0x781b61e8 0x0] next hop ::/128 Load distribution: 0 (refcount 4) Hash OK Interface Address 0 Y recursive Lookup in table
由於R1未在其BGP ipv6單播對等體下啟用SRv6封裝,因此R1會在BGP更新中向R3通告這些字首(不帶SRv6 TLV),即使R1已在本地分配本地SID。
RP/0/RSP0/CPU0:R1#show bgp ipv6 unicast BGP router identifier 10.0.0.1, local AS number 1 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0xe0800000 RD version: 7 BGP table nexthop route policy: BGP main routing table version 7 BGP NSR Initial initsync version 7 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> fc00:aa00:1::1/128 :: 0 32768 i *>ifc00:aa00:3::3/128 fc00:bb00:3::1 0 100 0 i Processed 2 prefixes, 2 paths RP/0/RSP0/CPU0:R1#show bgp ipv6 unicast advertised neighbor fc00:bb00:3::1 fc00:aa00:1::1/128 is advertised to fc00:bb00:3::1 Path info: neighbor: Local neighbor router id: 10.0.0.1 valid local best Received Path ID 0, Local Path ID 1, version 4 Attributes after inbound policy was applied: next hop: :: MET ORG AS origin: IGP metric: 0 aspath: Attributes after outbound policy was applied: next hop: fc00:bb00:1::1 MET ORG AS origin: IGP metric: 0 aspath:
路由器R3收到來自路由器R1的更新,沒有SID。R3將從R1接收的字首安裝到其RIB和FIB表,沒有SRv6報頭。
RP/0/RSP0/CPU0:R3#show bgp ipv6 unicast received-sids BGP router identifier 10.0.0.3, local AS number 1 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0xe0800000 RD version: 44 BGP table nexthop route policy: BGP main routing table version 44 BGP NSR Initial initsync version 6 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Received Sid *>ifc00:aa00:1::1/128 fc00:bb00:1::1 NO SRv6 Sid *> fc00:aa00:3::3/128 :: NO SRv6 Sid Processed 2 prefixes, 2 paths
RP/0/RSP0/CPU0:R3#show route ipv6 unicast fc00:aa00:1::1/128 detail Routing entry for fc00:aa00:1::1/128 Known via "bgp 1", distance 200, metric 0, type internal Installed Jun 8 17:34:24.126 for 00:12:38 Routing Descriptor Blocks fc00:bb00:1::1, from fc00:bb00:1::1 Route metric is 0 Label: None Tunnel ID: None Binding Label: None Extended communities count: 0 NHID: 0x0 (Ref: 0) Path Grouping ID: 1 Route version is 0x1d (29) No local label IP Precedence: Not Set QoS Group ID: Not Set Flow-tag: Not Set Fwd-class: Not Set Route Priority: RIB_PRIORITY_RECURSIVE (12) SVD Type RIB_SVD_TYPE_LOCAL Download Priority 4, Download Version 162 No advertising protos. RP/0/RSP0/CPU0:R3#show cef ipv6 fc00:aa00:1::1/128 fc00:aa00:1::1/128, version 162, internal 0x5000001 0x40 (ptr 0x7941f0f4) [1], 0x0 (0x0), 0x0 (0x0) Updated Jun 8 17:34:24.128 Prefix Len 128, traffic index 0, precedence n/a, priority 4 gateway array (0x78eac518) reference count 1, flags 0x2010, source rib (7), 0 backups [1 type 3 flags 0x48441 (0x78f4f538) ext 0x0 (0x0)] LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0] gateway array update type-time 1 Jun 8 17:34:24.129 LDI Update time Jun 8 17:34:24.129 Level 1 - Load distribution: 0 [0] via fc00:bb00:1::1/128, recursive Accounting: Disabled via fc00:bb00:1::1/128, 5 dependencies, recursive [flags 0x6000] path-idx 0 NHID 0x0 [0x7941edb4 0x0] next hop fc00:bb00:1::1/128 via fc00:bb00:1::/48 Load distribution: 0 (refcount 1) Hash OK Interface Address 0 Y TenGigE0/0/0/1 remote
啟用SRv6封裝會使R1向其具有屬性型別40的對等方傳送BGP更新消息,該消息用於段路由以通告具有特定段路由識別符號(SID)的BGP字首。 路由器R1向R3傳送帶有相關SID fc00:bb00:1:e002::的IPv6字首fc00:bb00:3::1(步驟1)的UPDATE。收到更新後,路由器R3更新其BGP IPv6單播表(步驟2),然後更新其RIB和FIB表(步驟3)。 圖2說明了BGP信令流程以及相應的步驟。
圖2.啟用封裝srv6後的BGP信令流
在R3對等裝置上啟用SRv6封裝後,輸出立即顯示BGP調試日誌,顯示R1向R3傳送BGP更新消息:
router bgp 1 neighbor fc00:bb00:3::1 address-family ipv6 unicast encapsulation-type srv6 ! ! ! end RP/0/RSP0/CPU0:R1(config)#commit
bgp[1100]: [default-upd] (ip6u): Added reference to table TBL:default (2/1) refcount 9 bgp[1100]: [default-upd] (ip6u): Created update group for table TBL:default (2/1), index 0.3 neighbor fc00:bb00:3::1 bgp[1100]: [default-upd] (ip6u): Removed neighbor fc00:bb00:3::1 from update group 0.2 for IPv6 Unicast bgp[1100]: [default-upd] (ip6u): Removing neighbor fc00:bb00:3::1 from update filter-group 0.2 in IPv6 Unicast sub-group 0.2 in updgrp 0.2 bgp[1100]: [default-upd]: Enqueue Wdw: Nbr:fc00:bb00:3::1(5) Wdw:0 Del:0 Pending:0 RefreshPending:0 bgp[1100]: [default-upd]: Deleting filter-group 0.2 in TBL:default (2/1) refcount 2 bgp[1100]: [default-upd] (ip6u): Deleted update group 0.2 bgp[1100]: [default-upd] (ip6u): Added reference to table TBL:default (2/1) refcount 10 bgp[1100]: [default-upd]: Compute RT set for vrf default neighbor fc00:bb00:3::1 from old filter-group 0.2 rtset 0in subgrp 0.2 bgp[1100]: [default-upd]: Allocating filter-group 0.3in TBL:default (2/1) bgp[1100]: [default-upd] (ip6u): Added reference to table TBL:default (2/1) refcount 11 bgp[1100]: [default-upd] (ip6u): Adding vrf default neighbor fc00:bb00:3::1 to new filter-group 0.3 in IPv6 Unicast sub-group 0.1 rtset size 0 in updgrp 0.3 bgp[1100]: [default-upd] (ip6u): Added vrf default neighbor fc00:bb00:3::1 to update filter-group 0.3 in IPv6 Unicast sub-group 0.1 bgp[1100]: [default-upd] (ip6u): Added neighbor fc00:bb00:3::1 to update sub-group 0.1 in IPv6 Unicast update-group 0.3 bgp[1100]: [default-upd] (ip6u): Added vrf default neighbor fc00:bb00:3::1 to update group 0.3 for IPv6 Unicast bgp[1100]: [default-upd] (ip6u): Removed reference to Table TBL:default (2/1) refcount 10 bgp[1100]: [default-upd] (ip6u): Started updgrp timer for updgrp 0.3:: delay=0.010, delaytype=0 bgp[1100]: [default-upd] (ip6u): Removed reference to Table TBL:default (2/1) refcount 9 bgp[1100]: [default-upd] (ip6u): Starting updgen walk for updgrp 0.3:: targetver=27: tblver=27, labelver=27, minfwdver=27, ackdfwdver=27, standbyver=0 bgp[1100]: [default-upd] (ip6u): Computing updates for update sub-group 0.1 (Regular) bgp[1100]: [default-upd] (ip6u): bgp_srv6_execute_sid_alloc_mode_policy: Use default SRv6 alloc mode per-vrf as policy NOT in use/configured for net and table TBL:default (2/1) bgp[1100]: [default-upd]: table-attr walk for table TBL:default (2/1), resume version 0, subgrp version 0, target version 27 bgp[1100]: [default-upd] (ip6u): process UPDATE for: tbl=TBL:default (2/1), afi=5: ug=0.3, (Regular), pelem (Regular), sg=0.1, ugfl=0x00104183: bgpctxfl=0x00, tblctxfl=0x10000021, ltblctxfl=0x10000021, sendlab=0: net=fc00:aa00:1::1/128, nver=24: PELEM=0x7f4566d78f60 (lpathid=1, ver=24, fl=0x00000001): PATH=0x7f4566ee3eb8 (::/128,::,0, 0x20000000010401a3)::: allowbe=0, isbe=0, allowspurwdr=0, pelem-send=1, pelem-wdr=0, netExtflag=21000000 bgp[1100]: [default-upd] (ip6u): Ran 'internal' policy '(null)', result 'TRUE', ptr 0x7f4584005f30, use (nil) bgp[1100]: [default-upd] (ip6u): : tbl=TBL:default (2/1), afi=5: ug=0.3, sg=0.1, ugfl=0x00104183: net=fc00:aa00:1::1/128, PELEM=0x7f4566d78f60(lpathid=1, fl=0x00000001), PATH=0x7f4566ee3eb8(::/128,::,0, 0x20000000010401a3), reflected=0, bmsgfl=0x00000000, wdr=0::: netlab=0/0, pathlab=1048577, updlab= bgp[1100]: [default-upd] (ip6u): <NH&LABEL-SEL>: tbl=TBL:default (2/1), afi=5: ug=0.3, sg=0.1, ugfl=0x00104183+0x00001022: net=fc00:aa00:1::1/128, netlab=0/0, PELEM=0x7f4566d78f60(lpathid=1, fl=0x00000001), PATH=0x7f4566ee3eb8(::/128,::,0, 0x20000000010401a3), pathlab=1048577, reflected=0, bmsgfl=0x00000000::: pelemwdr=0, isnhself=1, enforcenhself=0, nhselectdone=0, nhcfgeval=1, updnh=0x00000000, nhlen=16, nhif=0x00000000, nh3rdp=0 bgp[1100]: [default-upd] (ip6u): <nh&label-sel>::: labselectdo=1, labselectdone=0, updlab=1048577(0x00100001) bgp[1100]: [default-upd]: Comm-lib: Assigned ID (0x1d000008) for elem-type PREFIX_SID SRV6_L3SVC bgp[1100]: [default-upd]: Comm-lib: Assigned ID (0x900000c) for elem-type Attribute bgp[1100]: [default-upd] (ip6u): Permit UPDATE to filter-group 0.3 (Regular, pelem Regular) for fc00:aa00:1::1/128 (changedfl=0x0/0x0), path bgp[1100]: [default-upd] (ip6u): Sending UPDATE message(0x0x7f4589fd4ba4) to sub-group 0.1 (Regular, pelem Regular) for fc00:aa00:1::1/128 (changedfl=0x0/0x0) - creating new message with bmsgflags=0x00000000, attributes: nexthop ::, originator 0.0.0.0 bgp[1100]: [default-upd] (ip6u): origin i, path , metric 0, localpref 100, Prefix-SID attribute 0x05002200 0x01001e00 0xfc00bb00 0x0001e002 0x00000000 0x00000000 0x00003e00 0x01000620 0x10100000 0x0000 bgp[1100]: [default-upd] (ip6u): Created msg elem 0x0x7f4589e3afc8 (pointing to message 0x0x7f4589fd4ba4), for filtergroup 0.3 bgp[1100]: [default-upd] (ip6u): process UPDATE for: tbl=TBL:default (2/1), afi=5: ug=0.3, (Regular), pelem (Regular), sg=0.1, ugfl=0x00104183: bgpctxfl=0x00, tblctxfl=0x10000021, ltblctxfl=0x10000021, sendlab=0: net=fc00:aa00:3::3/128, nver=27: PELEM=0x7f4566d78d30 (lpathid=1, ver=27, fl=0x00000001): PATH=0x7f4566ee3d98 (fc00:bb00:3::1/128,fc00:bb00:3::1,0, 0x2000000001060005)::: allowbe=0, isbe=0, allowspurwdr=0, pelem-send=1, pelem-wdr=0, netExtflag=20000000 bgp[1100]: [default-upd] (ip6u): No unreachable (not advertising to sender: fc00:bb00:3::1) sent to sub-group 0.1 (Regular) with fc00:aa00:3::3/128 - already withdrawn bgp[1100]: [default-upd] (ip6u): Generated 1 updates for update sub-group 0.1 (average size = 126 bytes, maximum size = 126 bytes) bgp[1100]: [default-upd] (ip6u): Updates replicated to neighbor fc00:bb00:3::1 bgp[1100]: [default-iowt]: fc00:bb00:3::1 send UPDATE length (incl. header) 126 bgp[1100]: [default-iowt]: Send message dump for fc00:bb00:3::1: bgp[1100]: [default-iowt]: ffff ffff ffff ffff ffff ffff ffff ffff bgp[1100]: [default-iowt]: 007e 0200 0000 6790 0e00 2600 0201 10fc bgp[1100]: [default-iowt]: 00bb 0000 0100 0000 0000 0000 0000 0100 bgp[1100]: [default-iowt]: 80fc 00aa 0000 0100 0000 0000 0000 0000 bgp[1100]: [default-iowt]: 0140 0101 0040 0200 8004 0400 0000 0040 bgp[1100]: [default-iowt]: 0504 0000 0064 c028 2505 0022 0001 001e bgp[1100]: [default-iowt]: 00fc 00bb 0000 01e0 0200 0000 0000 0000 bgp[1100]: [default-iowt]: 0000 003e 0001 0006 2010 1000 0000 bgp[1100]: [default-iowt]: bgp_io_nbr_add_version: New ver: nbr=fc00:bb00:3::1, io_wr_txsn=58992, acksn=58866: ver=27 <58992>, osver=2 bgp[1100]: [default-iowt]: bgp_io_nbr_derive_acked_version: nbr=fc00:bb00:3::1, io_wr_txsn=58992, acksn=58866, osver=2 bgp[1100]: [default-iowt]: fc00:bb00:3::1 (afi:4) advancedpeer_acked_version to 10refresh peer acked version to 0 bgp[1100]: [default-iowt]: fc00:bb00:3::1 (afi:5) received ack for version 27 bgp[1100]: [default-iowt]: bgp_write_list_tonet: IO_SENDMSG: nbr=fc00:bb00:3::1, fd=530: total=1, send-attempt=1 (size 126), sent-successful=1: res=0 allmsg_adv_count = 1 msg 0x7f4589fd4ba4 bmsg_nbr_count 0 bgp[1100]: [default-iowt] (ip6u): Deleting msg elem 0x0x7f4589e3afc8 (message 0x0x7f4589fd4ba4), for filtergroup 0.3 bgp[1100]: [default-iowt] (ip6u): Deleting message 0x0x7f4589fd4ba4, from subgroup 0.1 bgp[1100]: [default-iowt]: Keepalive timer started for fc00:bb00:3::1(loc 10): last 529293 this 529308 bgp[1100]: [default-iowt]: bgp write for afi 4 for neighbor fc00:bb00:3::1 (fd 530) bgp[1100]: [default-iowt]: bgp write for afi 5 for neighbor fc00:bb00:3::1 (fd 530) bgp[1100]: [default-iowt]: bgp_io_nbr_derive_acked_version: nbr=fc00:bb00:3::1, io_wr_txsn=58992, acksn=58866, osver=1 bgp[1100]: [default-iowt]: fc00:bb00:3::1 (afi:4) advancedpeer_acked_version to 10refresh peer acked version to 0 bgp[1100]: [default-iowt]: fc00:bb00:3::1 (afi:5) advancedpeer_acked_version to 27refresh peer acked version to 0 bgp[1100]: [default-iowt]: bgp_io_write_nbr_ver_timer_process: nbr_ver_timer handler: Walk complete: nbrcount=1, synctrigger=1
輸出顯示R1上的BGP跟蹤條目:
default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:7799: trying to find update group for nbr fc00:bb00:3::1, afi IPv6 Unicast default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:6752: created update group for table TBL:default (2/1), index 0.3, nbr fc00:bb00:3::1, flags 0x104183 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:2039: Filter-group op (Filter-group Rm Nbr) Tbl/Nbr(Afi:IPv6 Unicast:Nbr:fc00:bb00:3::1) fgrp idx 0.2 subgrp idx 0.2 updgrp 0.2 rtset 0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:1501: Filter-group op (Delete) Tbl/Nbr(TBL:default (2/1)) fgrp idx 0.2 subgrp idx 0.2 updgrp 0.0 rtset 2 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:6798: Delete update group for table TBL:default (2/1), index 0.2 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:2181: Filter-group op (Filter-group Compute Nbr RT) Tbl/Nbr(fc00:bb00:3::1) fgrp idx 0.2 subgrp idx 0.2 updgrp 0.3 rtset 0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:1411: Filter-group op (Alloc) Tbl/Nbr(TBL:default (2/1)) fgrp idx 0.3 subgrp idx 0.1 updgrp 0.0 rtset 3 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:2725: Filter-group op (Filter-group Add Nbr new) Tbl/Nbr(Afi:IPv6 Unicast:Vrf:default:Nbr:fc00:bb00:3::1) fgrp idx 0.3 subgrp idx 0.1 updgrp 0.3 rtset 0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:2751: created filtergrp 3 for vrf default nbr fc00:bb00:3::1, afi 5, subgrp version 0, refresh 0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:4473: Created subgrp:1(0x840070a0) refr:0 for nbr fc00:bb00:3::1 (vrf default), afi 5 version 0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:6935: added vrf default nbr fc00:bb00:3::1 to update group 0.3, afi IPv6 Unicast, flags 0x104183 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:3088: TBL:default (2/1) free subgrp SG:2 subgrp:0x84007440 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:1316: Update gen Start bit operation Filtergrp delete-timer fgrp idx/size 2 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:11342: Updgen - TBL:default (2/1) UG: 0.3 SG: 0.1 msg: 1 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:11344: Updgen - pfx: [tot] adv/wdn/sup/skp/be[2] 1/0/0/1/0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:11351: Updgen - fpx: wdn/skp[0/0] ver: 0 -> 27 res ver: 0 -> 27 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:4009: Updgen - UG: 3 FG: 3 afi:5 msg: 1 ver -> 27 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t32561 [UPD]:4011: pfx: adv/wdn/sup/skp 1/0/0/1 default-bgp/spkr-tr2-common 0/RSP0/CPU0 t32558 [COMMON]:638: vrf default nbr fc00:bb00:3::1, set peer ack version to 27, afi 5, loc 2 default-bgp/spkr-tr2-gen 0/RSP0/CPU0 t32501 [GEN]:617: vrf default nbr 2000:0:0:1::1, old state 1, new state 3, fd type 2, fd 0
解碼的BGP UPDATE消息顯示屬性型別40和TLV型別5,其中包含服務SID fc00:bb00:1:e002::。
.
完整的解碼BGP UPDATE消息如下:
Message #1 - 126 bytes FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 7E 02 00 00 00 67 90 0E 00 26 00 02 01 10 FC 00 BB 00 00 01 00 00 00 00 00 00 00 00 00 01 00 80 FC 00 AA 00 00 01 00 00 00 00 00 00 00 00 00 01 40 01 01 00 40 02 00 80 04 04 00 00 00 00 40 05 04 00 00 00 64 C0 28 25 05 00 22 00 01 00 1E 00 FC 00 BB 00 00 01 E0 02 00 00 00 00 00 00 00 00 00 00 3E 00 01 00 06 20 10 10 00 00 00 BGP Marker: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF BGP Length: 0x007E - 126 bytes BGP Type: 0x02 - UPDATE UPDATE UNFEASIBLE ROUTES LENGTH: 0x0000 - 0 bytes TOTAL PATH ATTRIBUTES LENGTH: 0x0067 - 103 bytes Attribute ATTRIBUTE FLAG: 0x90 ATTRIBUTE FLAG binary: 10010000 Bit 0, the Optional bit, is 1 so this is an optional attribute Bit 1, the Transitive bit, is 0 so this is a non-transitive attribute Bit 2, the Partial bit, is not set Bit 3, the Extended Length Bit, is 1 so the length field is 2 bytes The lower-order four bits of the Attribute Flag are unused and are set to 0000 ATTRIBUTE TYPE: 0x0E - 14 ATTRIBUTE LENGTH: 0x0026 - 38 bytes ATTRIBUTE CONTENT: 0x00020110FC00BB000001000000000000000000010080FC00AA00000100000000000000000001 AFI: 2 (0x0002) Sub AFI: 1 (0x01) NEXTHOP Length: 16 (0x10) bytes NEXTHOP: FC00:BB00:0001:0000:0000:0000:0000:0001 Numb of SNPAs: 0 (0x00) NLRI Length: 128 bits (0x80) MP_REACH_NLRI: FC00:AA00:0001:0000:0000:0000:0000:0001/128 (0xFC00AA00000100000000000000000001) Attribute ATTRIBUTE FLAG: 0x40 ATTRIBUTE FLAG binary: 01000000 Bit 0, the Optional bit, is 0 so this is a well-known attribute Bit 1, the Transitive bit, is 1 so this is a transitive attribute Bit 2, the Partial bit, is not set Bit 3, the Extended Length Bit, is 0 so the length field is 1 byte The lower-order four bits of the Attribute Flag are unused and are set to 0000 ATTRIBUTE TYPE: 0x01 - 1 ATTRIBUTE LENGTH: 0x01 - 1 bytes ATTRIBUTE CONTENT: 0x00 - IGP Attribute ATTRIBUTE FLAG: 0x40 ATTRIBUTE FLAG binary: 01000000 Bit 0, the Optional bit, is 0 so this is a well-known attribute Bit 1, the Transitive bit, is 1 so this is a transitive attribute Bit 2, the Partial bit, is not set Bit 3, the Extended Length Bit, is 0 so the length field is 1 byte The lower-order four bits of the Attribute Flag are unused and are set to 0000 ATTRIBUTE TYPE: 0x02 - 2 ATTRIBUTE LENGTH: 0x00 - 0 bytes Attribute ATTRIBUTE FLAG: 0x80 ATTRIBUTE FLAG binary: 10000000 Bit 0, the Optional bit, is 1 so this is an optional attribute Bit 1, the Transitive bit, is 0 so this is a non-transitive attribute Bit 2, the Partial bit, is not set Bit 3, the Extended Length Bit, is 0 so the length field is 1 byte The lower-order four bits of the Attribute Flag are unused and are set to 0000 ATTRIBUTE TYPE: 0x04 - 4 ATTRIBUTE LENGTH: 0x04 - 4 bytes ATTRIBUTE CONTENT: 0x00000000 - 0 Attribute ATTRIBUTE FLAG: 0x40 ATTRIBUTE FLAG binary: 01000000 Bit 0, the Optional bit, is 0 so this is a well-known attribute Bit 1, the Transitive bit, is 1 so this is a transitive attribute Bit 2, the Partial bit, is not set Bit 3, the Extended Length Bit, is 0 so the length field is 1 byte The lower-order four bits of the Attribute Flag are unused and are set to 0000 ATTRIBUTE TYPE: 0x05 - 5 ATTRIBUTE LENGTH: 0x04 - 4 bytes ATTRIBUTE CONTENT: 0x00000064 - 100 Attribute ATTRIBUTE FLAG: 0xC0 ATTRIBUTE FLAG binary: 11000000 Bit 0, the Optional bit, is 1 so this is an optional attribute Bit 1, the Transitive bit, is 1 so this is a transitive attribute Bit 2, the Partial bit, is not set Bit 3, the Extended Length Bit, is 0 so the length field is 1 byte The lower-order four bits of the Attribute Flag are unused and are set to 0000 ATTRIBUTE TYPE: 0x28 - 40 ATTRIBUTE LENGTH: 0x25 - 37 bytes ATTRIBUTE CONTENT: 0x0500220001001E00FC00BB000001E002000000000000000000003E00010006201010000000 BGP Prefix-SID: Type: 5 (0x05) - SRv6 L3 Service Length: 34 - 0x0022 Value: 0x0001001E00FC00BB000001E002000000000000000000003E00010006201010000000 Reserved: 0x00 Sub Type: 1 (0x01) Sub Length: 30 (0x001E) SRv6 SID = FC00:BB00:0001:E002:0000:0000:0000:0000 SID Flags: 0 (0x00) Endpoint Behavior: 62 (0x003E) Reserved2 : 0 (0x00) SRv6 SID Optional Type: 1 (0x01) SRv6 SID Optional Len: 6 (0x0006) SRv6 SID Optional Value: 35253360001024 (0x201010000000) NLRI NLRI LENGTH: UPDATE Length - 23 - TOTAL PATH ATTRIBUTES LENGTH - UNFEASIBLE ROUTES LENGTH NLRI LENGTH: 126 - 23 - 103 - 0 NLRI LENGTH: 0 bytes
路由器R3收到來自R1的BGP更新,可以通過在R3上啟用BGP調試來觀察此更新。收到的BGP更新資料包必須與R1傳送的BGP更新資料包匹配,如調試輸出所示。
bgp[1100]: [default-rtr]: UPDATE from fc00:bb00:1::1 contains nh fc00:bb00:1::1/128, gw_afi 5, flags 0x0, nlri_afi 5 bgp[1100]: [default-rtr]: NH-Validate-Create: addr=fc00:bb00:1::1/128, len=16, nlriafi=5, nbr=fc00:bb00:1::1, gwafi=5, gwlen=32, gwaddrlen=128::: nhout=0x0x7fc41b5fdcb0, validity=1, attrwdrflags=0x00000000 bgp[1100]: [default-rtr]: --bgp4_rcv_attributes--: END: nbr=fc00:bb00:1::1:: msg=0x0x7fc420108bdc/126, updlen=107, attrbl=0x0x7fc420108bf3/103, ipv4reachlen=0, msginpath=0x0x7fc3e2d54830, asloopcheck=1, attrwdrfl=0x00000000:: samecluster=0, local_as_prepended=0, attr_wdr_flags 0x00000000, myascount=0:: myconfedascount=0::rcvdata=0x0x7fc420108c5a/0, errptr=0x0x7fc420108c32/40 bgp[1100]: [default-rtr]: Comm-lib: Assigned ID (0x1d0000ac) for elem-type PREFIX_SID SRV6_L3SVC bgp[1100]: [default-rtr]: Comm-lib: Assigned ID (0x90000de) for elem-type Attribute bgp[1100]: [default-rtr] (ip6u): Received UPDATE from fc00:bb00:1::1 with attributes: bgp[1100]: [default-rtr] (ip6u): nexthop fc00:bb00:1::1/128, origin i, localpref 100, metric 0 bgp[1100]: [default-rtr] (ip6u): Received prefix fc00:aa00:1::1/128 (path ID: none) from fc00:bb00:1::1 bgp[1100]: [default-rtr] (ip6u): Handling OCRIB attrs while relacing path 0x7fc3e1be61d8. Old oc attr (nil), new oc attr (nil) bgp[1100]: [default-rtr]: bgp_bmp_table_path_update_cb: Operation: 0x1, Inbound Post-Policy Route Mon is not enabled (0) (or) not primary active - return bgp[1100]: [default-rtr] (ip6u): Done modify path (old tlv size=0 new tlv size=0) for net=fc00:aa00:1::1/128, nver=2000371, nfl=0x00003001+0x20000000: usedpath=0x0x7fc3e1be61d8(fc00:bb00:1::1/128,fc00:bb00:1::1,0,0x2000000000060005), rcvdpath=0x0x7fc3e2d52b20: needmove=0, pcount=1 IdenticalPath=0, TLVPresent=0 bgp[1100]: [default-rtr]: bgp_set_path_metric:8712 afi 5 net fc00:aa00:1::1/128 path 0x7fc3e1be61d8 nh fc00:bb00:1::1/128 (0x7fc41b5fdcb0) metric 21 bgp[1100]: [default-rtr] (ip6u): bestpath: (full bp 1) start for net=fc00:aa00:1::1/128, nver=2000371, nfl=0x00003001+0x20000200: lastpath=0x0x7fc3e1be61d8(fc00:bb00:1::1/128,fc00:bb00:1::1,0,0x2000000000060005): PELEM=0x0x7fc3e1a82930(lpathid=1, ver=2000371, fl=0x00000801, path=0x0x7fc3e1be61d8) bgp[1100]: [default-rtr] (ip6u): bestpath: (full 1) calculated for net=fc00:aa00:1::1/128, nver=2000371, nfl=0x00003001+0x20000200, pelemver=2000371, pelemfl=0x00000881: oldbest=0x0x7fc3e1be61d8(fc00:bb00:1::1/128,fc00:bb00:1::1,0,0x2000000001060005), newbest=0x0x7fc3e1be61d8(fc00:bb00:1::1/128,fc00:bb00:1::1,0,0x2000000001060005), lastpath=0x0x7fc3e1be61d8(fc00:bb00:1::1/128,fc00:bb00:1::1,0,0x2000000001060005), bumpv=1 bgp[1100]: [default-rtr] (ip6u): bestpath: change for net=fc00:aa00:1::1/128, nver=2000371, nfl=0x00003001+0x20000200: oldbest=0x0x7fc3e1be61d8: PELEM=0x0x7fc3e1a82930(lpathid=1, ver=2000371, fl=0x00000901, path=0x0x7fc3e1be61d8) bgp[1100]: [default-rtr] (ip6u): bestpath: update flags for net=fc00:aa00:1::1/128, nver=2000371, nfl=0x00003001+0x20000200: oldtblattr=0x0x7fc41b5eccc0, oldnh=0x0x7fc41b5fdcb0: PELEM=0x0x7fc3e1a82930(lpathid=1, ver=2000371, fl=0x00000901, path=0x0x7fc3e1be61d8) bgp[1100]: [default-rtr] (ip6u): bestpath: modified path: net=fc00:aa00:1::1/128, nver=2000371, nfl=0x00003001+0x20000200: PELEM=0x0x7fc3e1a82930(lpathid=1, ver=2000371, fl=0x00001901, path=0x0x7fc3e1be61d8) bgp[1100]: [default-rtr] (ip6u): bgp_srv6_get_alloc_mode_locator_from_policy: Use default SRv6 alloc mode as policy NOT in use/configured for net and table TBL:default (2/1) bgp[1100]: [default-rtr] (ip6u): bestpath: complete for net=fc00:aa00:1::1/128, nver=2000371, nfl=0x00007001+0x20000200: pselect=0x0, bumpv=1(1:1,0,0,0) bgp[1100]: [default-rtr]: Received UPDATE from fc00:bb00:1::1 (length incl. header = 126) bgp[1100]: [default-rtr]: Receive message dump for fc00:bb00:1::1: bgp[1100]: [default-rtr]: ffff ffff ffff ffff ffff ffff ffff ffff bgp[1100]: [default-rtr]: 007e 0200 0000 6790 0e00 2600 0201 10fc bgp[1100]: [default-rtr]: 00bb 0000 0100 0000 0000 0000 0000 0100 bgp[1100]: [default-rtr]: 80fc 00aa 0000 0100 0000 0000 0000 0000 bgp[1100]: [default-rtr]: 0140 0101 0040 0200 8004 0400 0000 0040 bgp[1100]: [default-rtr]: 0504 0000 0064 c028 2505 0022 0001 001e bgp[1100]: [default-rtr]: 00fc 00bb 0000 01e0 0200 0000 0000 0000 bgp[1100]: [default-rtr]: 0000 003e 0001 0006 2010 1000 0000 bgp[1100]: [default-rtr]: Enabling read from: fc00:bb00:1::1 readset: 1 msgcount: 0 bgp[1100]: [default-iowt]: bgp write for afi 4 for neighbor fc00:bb00:1::1 (fd 516) bgp[1100]: [default-iowt]: bgp write for afi 5 for neighbor fc00:bb00:1::1 (fd 516) bgp[1100]: [default-impt] (ip6u): START import walk from 2000371 to 2000372 skip_walk 1 bgp[1100]: [default-rib2] (ip6u): RIB thread triggered for versioned walk: current version 2000371, acked version 2000371, target version 2000371 bgp[1100]: [default-rib2] (ip6u): RNH rib opaque update for (IPv6 Unicast) bgp[1100]: [default-rib2] (ip6u): RIB thread triggered for RNH walk for nh table(IPv6 Unicast): current version 2000371, target version 2000372 bgp[1100]: [default-lbl] (ip6u): Label update triggered: current version 2000371, target version 2000372, mpls component is up bgp[1100]: [default-lbl]: Table: TBL:default (2/1) bgp_label_srv6_sid_config_release: label_sid_need_eval:0 loc trigger:0 srv6 enabled:1 label disabled:1 dual mode:0 label alloc mode:2 sid alloc mode:0 sid release:0 bgp[1100]: [default-lbl]: uSID WLIB allocation is (LIB Default) bgp[1100]: [default-lbl]: Table: TBL:default (2/1) bgp_label_thread_walk_type: rd:0x7fc3e1efbf30(ALLzero:0:0) rd_flags:0x1 SRv6 eval/en/cnt:1/1/1 locator:MAIN Label up/dis/cnt: 1/1/0 dual mode:0 ibgp_nhself_count:0 policy_set_nhself:0 bgp[1100]: [default-lbl] (ip6u): rd:0x7fc3e1efbf30 sid_walk:1 label_walk:0 bgp[1100]: [default-lbl]: uSID WLIB allocation is (LIB Default) bgp[1100]: [default-upd] (vpn4u): Started updgrp timer for updgrp 0.1:: delay=0.010, delaytype=0 bgp[1100]: [default-lbl] (ip6u): SRv6 SID process for net: TBL:default (2/1)fc00:aa00:1::1/128(SID N) extflags 20000000 Default locator Y UP/exh/oor/rclm MAIN/N/N/N mode 0 clear handle 0 bgp[1100]: [default-lbl] (ip6u): SRv6 SID process for net: TBL:default (2/1)fc00:aa00:1::1/128 point 1 sid_mode 0 clear_handle 0 bgp[1100]: [default-lbl]: uSID WLIB allocation is (LIB Default) bgp[1100]: [default-lbl] (ip6u): Label update run from 2000371 target label version 2000372, rib version 2000371, bgp table version 2000372,best-external allocs 0 bgp[1100]: [default-lbl] (ip6u): Wake up rib thread, label version 2000372, rib version 2000371, bgp table version 2000372, bgp[1100]: [default-rib2] (ip6u): RIB thread triggered for versioned walk: current version 2000371, acked version 2000371, target version 2000372 bgp[1100]: [default-rib2] (ip6u): RNH rib opaque update for (IPv6 Unicast) bgp[1100]: [default-rib2] (ip6u): RIB thread triggered for RNH walk for nh table(IPv6 Unicast): current version 2000371, target version 2000372 bgp[1100]: [default-rib2] (ip6u): Rib Batch-buf Route ADD: table=TBL:default (2/1), tableid=0xe0800000, net=fc00:aa00:1::1/128, netfl=0x00003001: label=1048577, dist=200, attrkey=0x00000000, pathcount=1: batchres=1, succ=1, send=0 locator prefix No, 0 bgp[1100]: [default-rib2] (ip6u): Revise route batch: installing fc00:aa00:1::1/128 with next hop fc00:bb00:1::1(tbl-id=0xe0800000, ifh=0x0), pathribflags: 0x9800000008, #ext-comms=0, to IP-RIB table[0xe0800000] bgp[1100]: [default-rib2] (ip6u): [0]: Rib Batch-buf Path ADD: table=TBL:default (2/1), net=fc00:aa00:1::1/128: nh=fc00:bb00:1::1, nhifh=0x00000000, nhtableid=0xe0800000: rlabel=1048577, metric=0, bsid=0, numecomms=0: pelemfl=0x00001001, pathfl=0x2000000001060005,pathribfl=0x9800000008, nhresplenmin=0 (constraint=1):: batchres=1, succ=1, sendbatch=0 bgp[1100]: [default-rib2] (ip6u): Sending convergence info for IPv6 Unicast - not converged, version: 0, last received version 0 bgp[1100]: [default-upd] (ip6u): Started updgrp timer for updgrp 0.1:: delay=0.010, delaytype=0 bgp[1100]: [default-rib2] (ip6u): vrf default: RIB update run to 2000372: installed 0, modified 1, skipped 0, removed 0 IPv6 Unicast prefixes, installed 0 attributes, removed 0 attributes. bgp[1100]: [default-rib2] (ip6u): RIB thread finished versioned walk: table version 2000372, acked table version 2000372 bgp[1100]: [default-upd] (vpn4u): Starting updgen walk for updgrp 0.1:: targetver=463: tblver=463, labelver=463, minfwdver=463, ackdfwdver=463, standbyver=0 bgp[1100]: [default-upd] (ip6u): Starting updgen walk for updgrp 0.1:: targetver=2000372: tblver=2000372, labelver=2000372, minfwdver=2000372, ackdfwdver=2000372, standbyver=0 bgp[1100]: [default-upd] (ip6u): Computing updates for update sub-group 0.1 (Regular) bgp[1100]: [default-upd] (ip6u): bgp_srv6_execute_sid_alloc_mode_policy: Use default SRv6 alloc mode per-vrf as policy NOT in use/configured for net and table TBL:default (2/1) bgp[1100]: [default-upd]: table-attr walk for table TBL:default (2/1), resume version 0, subgrp version 2000371, target version 2000372 bgp[1100]: [default-upd] (ip6u): process UPDATE for: tbl=TBL:default (2/1), afi=5: ug=0.1, (Regular), pelem (Regular), sg=0.1, ugfl=0x00104183: bgpctxfl=0x00, tblctxfl=0x10000021, ltblctxfl=0x10000021, sendlab=0: net=fc00:aa00:1::1/128, nver=2000372: PELEM=0x7fc3e1a82930 (lpathid=1, ver=2000372, fl=0x00001001): PATH=0x7fc3e1be61d8 (fc00:bb00:1::1/128,fc00:bb00:1::1,0, 0x2000000001060005)::: allowbe=0, isbe=0, allowspurwdr=0, pelem-send=1, pelem-wdr=0, netExtflag=20000000 bgp[1100]: [default-upd] (ip6u): No unreachable (not advertising to sender: fc00:bb00:1::1) sent to sub-group 0.1 (Regular) with fc00:aa00:1::1/128 - already withdrawn
路由器R3生成與來自R1的更新處理對應的BGP跟蹤,最終導致R3更新其BGP IPv6單播表。此更新包含BGP屬性型別40,涉及從R1安裝接收的SID以及關聯的BGP IPv6單播字首。
RP/0/RSP0/CPU0:R3#show bgp trace
default-bgp/spkr-tr2-imp 0/RSP0/CPU0 t16100 [IMPORT]:6661: Skipping Import walk: import ver 2000371 -> 2000372: afi 5 forced 0 default-bgp/spkr-tr2-rib 0/RSP0/CPU0 t30391 [RIB]:17177: RIB walk for afi IPv6 Unicast: target version 2000371, min_fwdtable_version 2000371, import_version 2000372, label_version 2000371, table_version 2000372 default-bgp/spkr-tr2-label 0/RSP0/CPU0 t16061 [LABEL]:8505: label walk afi:IPv6 Unicast, lbl ver 2000371 -> 2000372, be 0, skp 0 upd 0 default-bgp/spkr-tr2-label 0/RSP0/CPU0 t16061 [LABEL]:8510: label walk afi:IPv6 Unicast, lbl ver 2000371 -> 2000372, be 0, skp 0 upd 1 default-bgp/spkr-tr2-rib 0/RSP0/CPU0 t30391 [RIB]:17177: RIB walk for afi IPv6 Unicast: target version 2000372, min_fwdtable_version 2000371, import_version 2000372, label_version 2000372, table_version 2000372 default-bgp/spkr-tr2-rib 0/RSP0/CPU0 t30391 [RIB]:14681: send converge to RIB, afi IPv6 Unicast, tableid 0xe0800000, converged 0, send_version 0, last_recv_version 0 default-bgp/spkr-tr2-rib 0/RSP0/CPU0 t30391 [RIB]:15892: RIB(default:v6u): ver 2000371 -> 2000372 :pfx inst/upd/skip/rem 0/1/0/0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t16101 [UPD]:11342: Updgen - TBL:default (2/1) UG: 0.1 SG: 0.1 msg: 0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t16101 [UPD]:11344: Updgen - pfx: [tot] adv/wdn/sup/skp/be[1] 0/0/0/1/0 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t16101 [UPD]:11351: Updgen - fpx: wdn/skp[0/0] ver: 2000371 -> 2000372 res ver: 0 -> 2000372 default-bgp/spkr-tr2-common 0/RSP0/CPU0 t16101 [COMMON]:3628: vrf default nbr fc00:bb00:1::1, set peer ack version to 2000372, afi 5, loc 4 default-bgp/spkr-tr2-upd 0/RSP0/CPU0 t16101 [UPD]:11663: Updgen - Skip EoR for Tbl:(TBL:default (2/1)) subgrp:(1) UG:(1) end 2000372
RP/0/RSP0/CPU0:R3#show bgp ipv6 unicast received-sids BGP router identifier 10.0.0.3, local AS number 1 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0xe0800000 RD version: 46 BGP table nexthop route policy: BGP main routing table version 46 BGP NSR Initial initsync version 6 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Received Sid *>ifc00:aa00:1::1/128 fc00:bb00:1::1 fc00:bb00:1:e002:: *> fc00:aa00:3::3/128 :: NO SRv6 Sid Processed 2 prefixes, 2 paths
最終R3安裝RIB和FIB以完成信令過程。然後R3充當SRv6頭端,SID清單為fc00:bb00:1:e002::。此入口R1充當SR策略中封裝的SRv6頭端,縮寫為H.Encaps(RFC 8986,第5.1節)。 此行為將資料包封裝在IPv6報頭中,強制實施段清單並在需要時新增SRH。在這種情況下,不需要新增SRH,因為只有一個網段。資料包將以目標地址fc00:bb00:1:e002::傳送,這是R1上具有行為SRv6終結點UDT6的服務SID。
RP/0/RSP0/CPU0:R3#show route ipv6 fc00:aa00:1::1/128 detail Routing entry for fc00:aa00:1::1/128 Known via "bgp 1", distance 200, metric 0, type internal Installed Jun 8 17:52:31.546 for 00:53:55 Routing Descriptor Blocks fc00:bb00:1::1, from fc00:bb00:1::1 Route metric is 0 Label: None Tunnel ID: None Binding Label: None Extended communities count: 0 NHID: 0x0 (Ref: 0) Path Grouping ID: 1 SRv6 Headend: H.Encaps.Red [f3216], SID-list {fc00:bb00:1:e002::} Route version is 0x1f (31) No local label IP Precedence: Not Set QoS Group ID: Not Set Flow-tag: Not Set Fwd-class: Not Set Route Priority: RIB_PRIORITY_RECURSIVE (12) SVD Type RIB_SVD_TYPE_LOCAL Download Priority 4, Download Version 166 No advertising protos.
RP/0/RSP0/CPU0:R3#show cef ipv6 fc00:aa00:1::1/128 fc00:aa00:1::1/128, version 166, SRv6 Headend, internal 0x5000001 0x40 (ptr 0x7941f0f4) [1], 0x0 (0x0), 0x0 (0x7ad58368) Updated Jun 8 17:52:31.551 Prefix Len 128, traffic index 0, precedence n/a, priority 4 gateway array (0x78eac428) reference count 1, flags 0x2010, source rib (7), 0 backups [1 type 3 flags 0x48441 (0x78f4f4d8) ext 0x0 (0x0)] LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0] gateway array update type-time 1 Jun 8 17:52:31.551 LDI Update time Jun 8 17:52:31.551 Level 1 - Load distribution: 0 [0] via fc00:bb00:1::/128, recursive Accounting: Disabled via fc00:bb00:1::/128, 5 dependencies, recursive [flags 0x6000] path-idx 0 NHID 0x0 [0x7941edb4 0x0] next hop fc00:bb00:1::/128 via fc00:bb00:1::/48 SRv6 H.Encaps.Red SID-list {fc00:bb00:1:e002::} Load distribution: 0 (refcount 1) Hash OK Interface Address 0 Y TenGigE0/0/0/1 remote
圖4顯示了路由器R3(fc00:aa00:3::3)對R1(fc00:aa00:1::1)執行ping操作時的資料包格式。
圖4.通過SRv6的BGP IPv6單播路徑上的資料包處理
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
03-Oct-2025
|
初始版本 |