簡介
本文描述當路由器設定過載(OL)位元時,分段路由流量工程師(SR-TE)靜態和動態原則的行為。
必要條件
需求
思科建議您瞭解以下基本知識:
- 多重協定標籤交換(MPLS)。
- 中間系統到中間系統(ISIS)
- 分段路由流量工程師(SR-TE)
- 使用IPv6的分段路由(SRV6)
採用元件
- 本檔案中的資訊是根據Device:聚合服務路由器9000(ASR9K)。
- 本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
網路拓撲

圖1網路拓撲
網路設計
- 啟用了IPV4和IPV6地址系列的單個ISIS域
- 配置了拓撲無關的無環替代方案(TI-LFA)和SR微環規避(MLA)
- 分段路由全域性塊(SRGB):16000-24000
靜態SR TE策略行為
條件1 — 段識別符號(SID)清單僅由SID(標籤值)組成
組態
segment-routing
traffic-eng
segment-list PE1-to-PE3
index 10 mpls label 16002 >>>>>>>>>> P2
index 20 mpls label 16022 >>>>>>>>>> PE2
index 30 mpls label 16033>>>>>>>>>>>PE3
!
policy Policy-PE1-to-PE3
binding-sid mpls 1000
color 1000 end-point ipv4 10.10.33.33
candidate-paths
preference 100
explicit segment-list PE1-to-PE3

圖 2:策略Policy-PE1-to-PE3採用的路徑
驗證
RP/0/RSP1/CPU0:ASR9906-1-PE1-PCC#show segment-routing traffic-eng policy color 1000 detail
SR-TE policy database
---------------------
Color: 1000, End-point: 10.10.33.33
Name: srte_c_1000_ep_10.10.33.33
Status:
Admin: up Operational: up for 00:00:24 (since Apr 18 10:22:21.382)
Candidate-paths:
Preference: 100 (configuration) (active)
Name: Policy-PE1-to-PE3
Requested BSID: 1000
Protection Type: protected-preferred
Maximum SID Depth: 10
Explicit: segment-list PE1-to-PE3 (valid)
Weight: 1, Metric Type: TE
16002 [Prefix-SID, 10.10.2.2]
16022
16033
RP/0/RSP1/CPU0:ASR9906-1-PE1-PCC#show isis database
Fri Apr 18 10:29:47.616 UTC
IS-IS core (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL
ASR9910-4-P1-CE1.00-00 0x000015f7 0x7c3d 1195 /1200 0/0/0
ASR9906-2-P2-CE23.00-00 0x000015f2 0xa255 1188 /1200 0/0/1
ASR9906-1-PE1-PCC.00-00* 0x000015ee 0xa580 495 /* 0/0/0
ASR-9904-5-PE2-PCC.00-00 0x000015e6 0x47df 1086 /1200 0/0/1
ASR9910-3-PE3-PCC.00-00 0x000015e8 0x053e 966 /1200 0/0/1
觀察
當在路徑中的任何路由器(提供商路由器(P)2、提供商邊緣路由器(PE)2和PE3)上設定了過載位時,如果SR-TE路徑中的任何中間路由器上或甚至末端路由器本身上設定了過載位,則不會影響分段路由流量工程(SR-TE)策略的驗證或安裝,前提是顯式SID清單中的第一個分段識別符號(SID)可以成功解析為轉發介面。
說明
段識別符號(SID)表示為MPLS標籤值。當頭端路由器(PE1)收到SR-TE策略(通常來自路徑計算元素(PCE))時,它不會驗證整個SID清單。相反,它只對網段清單中的第一個SID執行解析和驗證。
此設計行為是有意為之,能夠支援域間SR-TE策略,即單個SR策略跨多個IGP域。由於頭端路由器缺乏對遠端域的可視性,因此集中式PCE負責執行這些域的端到端路徑計算。PCE將完全解析的標籤堆疊(SID清單)返回到路徑計算客戶端(PCC),通常是頭端路由器。
收到策略後,只要第一個SID可以通過本地轉發條目解析,頭端路由器就會安裝它。它不會嘗試解析或驗證後續SID,因為它們與拓撲檢視之外的遠端域有關。此行為同樣適用於在頭端路由器上手動配置的靜態SID清單,其中僅驗證SID清單的1st SID,而不驗證後續SID。
條件2 - SID清單由SID和SID描述符組成(示例IP地址)
組態
segment-list PE3-to-PE1-4sids
index 1 mpls label 16022
index 2 mpls label 16002
index 3 mpls adjacency 10.10.21.1 >>>>>> SID descriptor
index 4 mpls label 16011
policy Policy-PE3-to-PE1-4sids
binding-sid mpls 3001
color 3001 end-point ipv4 10.10.11.11
candidate-paths
preference 100
explicit segment-list PE3-to-PE1-4sids

圖3 :策略Policy-PE3-to-PE1-4sid採用的路徑
驗證
RP/0/RSP0/CPU0:ASR9910-3-PE3-PCC#show segment-routing traffic-eng policy color 3001
SR-TE policy database
---------------------
Color: 3001, End-point: 10.10.11.11
Name: srte_c_3001_ep_10.10.11.11
Status:
Admin: up Operational: up for 00:01:00 (since Apr 27 07:03:01.980)
Candidate-paths:
Preference: 100 (configuration) (active)
Name: Policy-PE3-to-PE1-4sids
Requested BSID: 3001
Constraints:
Protection Type: protected-preferred
Maximum SID Depth: 10
Explicit: segment-list PE3-to-PE1-4sids (valid)
Weight: 1, Metric Type: TE
16022 [Prefix-SID, 10.10.22.22]
16002 [Prefix-SID, 10.10.2.2]
24000 [Adjacency-SID, 10.10.21.2 - 10.10.21.1]
16011 [Prefix-SID, 10.10.11.11]
Attributes:
Binding SID: 3001
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
在P1上設定了過載位時:
RP/0/RSP0/CPU0:ASR9910-3-PE3-PCC#show segment-routing traffic-eng policy color 3001
SR-TE policy database
---------------------
Color: 3001, End-point: 10.10.11.11
Name: srte_c_3001_ep_10.10.11.11
Status:
Admin: up Operational: down for 00:00:02 (since Apr 27 07:06:24.845) >> policy is down
Candidate-paths:
Preference: 100 (configuration) (inactive)
Name: Policy-PE3-to-PE1-4sids
Requested BSID: 3001
Constraints:
Protection Type: protected-preferred
Maximum SID Depth: 10
Explicit: segment-list PE3-to-PE1-4sids (inactive) >>> path is inactive
Last error: IPv4 address follows an unresolved label: 10.10.21.1
Weight: 1, Metric Type: TE
16022
16002
16011
16011
Attributes:
Forward Class: 0
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: no
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
觀察
當PE2、P2或P1上設定了過載位時,策略關閉,路徑失效。
說明
頭端路由器嘗試解析所有指定的SID描述符。雖然第一個SID有效,但P1的SID描述符的解析失敗,因為P1在其IGP LSP通告中設定了過載位。這會導致相應的鄰接SID不可用,從而導致該路徑段的驗證失敗。
因此,即使部分解析成功,由於P1的不可解析鄰接SID,SR-TE策略作為一個整體仍無法驗證。此策略操作狀態被標籤為down,而關聯的顯式路徑被置於非活動狀態,從而阻止將其用於流量引導。
附註:
在尾端路由器(PE1)上設定過載位時,其SID仍屬於配置的SID清單,但在驗證期間會從封裝標籤堆疊中刪除。因此,SR-TE策略保持啟用和有效,因為它符合最低要求:第一個SID解析為傳出介面(例如HundredGigE0/1/0/2),並具有已解析的SID描述符。但是,流量無法到達PE1,因為其標籤在轉發堆疊中不存在。要確保SR-TE中的靜態SID清單完全端到端驗證,請使用最後一個躍點的SID描述符驗證整個LSP路徑。
使SID-List無效的條件
- 當它是空的。
- 當頭端無法將第一個SID解析為一個或多個傳出介面或下一跳。
- 當頭端無法解析任何表示為SID描述符的非第一個SID時。
動態SR TE策略行為
組態
policy Dynamic-Policy-PE1-to-PE3
binding-sid mpls 1001
color 1001 end-point ipv4 10.10.33.33
candidate-paths
preference 100
dynamic
RP/0/RSP1/CPU0:ASR9906-1-PE1-PCC#show segment-routing traffic-eng policy color 1001
SR-TE policy database
---------------------
Color: 1001, End-point: 10.10.33.33
Name: srte_c_1001_ep_10.10.33.33
Status:
Admin: up Operational: up for 02:27:53 (since Apr 27 08:31:55.304)
Candidate-paths:
Preference: 100 (configuration) (active)
Name: Dynamic-Policy-PE1-to-PE3
Requested BSID: 1001
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (valid)
Metric Type: TE, Path Accumulated Metric: 20
16033 [Prefix-SID, 10.10.33.33]
Attributes:
Binding SID: 1001
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
SRTE策略的Traceroute提供策略所採用的路徑,在本例中為IGP路徑:
RP/0/RSP1/CPU0:ASR9906-1-PE1-PCC#traceroute sr-mpls policy name srte_c_1001_ep_10.10.33.33 lsp-end-point 10.10.33.33
Type escape sequence to abort.
0 10.10.112.11 MRU 1500 [Labels: 16033 Exp: 0] >>>>>>>>>>>>>>>>>>>>>>>>> PE1
L 1 10.10.112.1 MRU 1500 [Labels: explicit-null Exp: 0] 13 ms >>>>>>>>>>>>>P1
! 2 10.10.31.33 6 ms>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>PE3

圖4 :策略Dynamic-Policy-PE1-to-PE3採用的路徑
在P1上設定Overload位時:
RP/0/RSP1/CPU0:ASR9906-1-PE1-PCC#traceroute sr-mpls policy binding-sid 1001 lsp-end-point 10.10.33.33
Type escape sequence to abort.
0 10.10.212.11 MRU 1500 [Labels: 16033 Exp: 0]>>>>>>>>>>>>>>>>>>>>>>>>>> PE1
L 1 10.10.212.2 MRU 1500 [Labels: 16033 Exp: 0] 10 ms>>>>>>>>>>>>>>>>>>>>>>P2
L 2 10.10.223.22 MRU 1500 [Labels: explicit-null Exp: 0] 5 ms>>>>>>>>>>>>>>>PE2
! 3 10.10.123.33 4 ms>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PE3
SRTE策略所採用的路徑繞過P1路由器。

圖5 :在P1上設定OL位時,繞過P11時,策略Dynamic-Policy-PE1-to-PE3採用的路徑
在PE3上設定Overload Bit時:
RP/0/RSP1/CPU0:ASR9906-1-PE1-PCC#show isis database
ASR9910-3-PE3-PCC.00-00 0x000019c6 0x3d24 1195 /1200 0/0/1
RP/0/RSP1/CPU0:ASR9906-1-PE1-PCC#show segment-routing traffic-eng policy color 1001
Color: 1001, End-point: 10.10.33.33
Name: srte_c_1001_ep_10.10.33.33
Status:
Admin: up Operational: up for 02:27:53 (since Apr 27 08:31:55.304)
Candidate-paths:
Preference: 100 (configuration) (active)
Name: Dynamic-Policy-PE1-to-PE3
Requested BSID: 1001
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (valid)
Metric Type: TE, Path Accumulated Metric: 20
16033 [Prefix-SID, 10.10.33.33]
Attributes:
Binding SID: 1001
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
RP/0/RSP1/CPU0:ASR9906-1-PE1-PCC#traceroute sr-mpls policy name srte_c_1001_ep_10.10.33.33 lsp-end-point 10.10.33.33
Type escape sequence to abort.
0 10.10.112.11 MRU 1500 [Labels: 16033 Exp: 0] >>>>>>>>>>>>>>>>>> PE1
L 1 10.10.112.1 MRU 1500 [Labels: explicit-null Exp: 0] 8 ms>>>>>>> P1
! 2 10.10.31.33 4 ms>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PE3
觀察
這裡,即使OL位在PE3上傳送,也會獲得PE3的SID,並將流量路由到其目的路由器PE3。
SRV6 SRTE靜態策略行為
組態
segment-routing
traffic-eng
segment-lists
srv6
sid-format usid-f3216
topology-check>>>>>>>>>>>>>>> command is required for srv6 SID list validation
!
segment-list srv6-PE2-to-PE3
srv6
index 10 sid ce00:1:2::
index 20 sid ce00:1:11::
index 30 sid ce00:1:1::
!
!
!
policy SRV6Policy-PE2-toPE3
srv6
locator corelocator binding-sid dynamic behavior ub6-insert-reduced
!
color 2000 end-point ipv6 ce00:1:33::
candidate-paths
preference 100
explicit segment-list srv6-PE2-to-PE3
RP/0/RSP1/CPU0:ASR-9904-5-PE2-PCC#show segment-routing traffic-eng policy name srte_c_2000_ep_ce00:1:33::
SR-TE policy database
---------------------
Color: 2000, End-point: ce00:1:33::
Name: srte_c_2000_ep_ce00:1:33::
Status:
Admin: up Operational: up for 00:30:35 (since Apr 27 08:31:30.516)
Candidate-paths:
Preference: 100 (configuration) (active)
Name: SRV6Policy-PE2-toPE3
Requested BSID: dynamic
Constraints:
Protection Type: protected-preferred
Maximum SID Depth: 13
Explicit: segment-list srv6-PE2-to-PE3 (valid)
Weight: 1, Metric Type: TE
SID[0]: ce00:1:2::/48
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
SID[1]: ce00:1:11::/48
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
SID[2]: ce00:1:1::/48
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
SRv6 Information:
Locator: corelocator
Binding SID requested: Dynamic
Binding SID behavior: uB6 (Insert.Red)
Attributes:
Binding SID: ce00:1:22:e004::
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
RP/0/RSP1/CPU0:ASR-9904-5-PE2-PCC#show segment-routing traffic-eng forwarding policy name srte_c_2000_ep_ce00:1:33::
SR-TE Policy Forwarding database
--------------------------------
Color: 2000, End-point: ce00:1:33::
Name: srte_c_2000_ep_ce00:1:33::
Binding SID: ce00:1:22:e004::
Active LSP:
Candidate path:
Preference: 100 (configuration)
Name: SRV6Policy-PE2-toPE3
Segment lists:
SL[0]:
Name: srv6-PE2-to-PE3
SL ID: 0xf
Switched Packets/Bytes: ?/?
Paths:
Path[0]:
Outgoing Interfaces: HundredGigE0/1/0/7
Next Hop: fe80::bee7:12ff:fea3:b70c
FRR Pure Backup: No
ECMP/LFA Backup: No
SID stack (Top -> Bottom): {ce00:1:2::/48, ce00:1:11::/48, ce00:1:1::/48}
Path[1]: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> backup SRV6 path
Outgoing Interfaces: HundredGigE0/1/0/0
Next Hop: fe80::bee7:12ff:fea3:b874
FRR Pure Backup: Yes
ECMP/LFA Backup: Yes
SID stack (Top -> Bottom): {ce00:1:1::/48, ce00:1:2::/48, ce00:1:11::/48,
ce00:1:1::/48}

圖6:策略SRV6Policy-PE2-toPE3靜態SID-List採用的路徑
驗證
當PE1超載時:
RP/0/RSP1/CPU0:ASR-9904-5-PE2-PCC#show segment-routing traffic-eng policy name srte_c_2000_ep_ce00:1:33::
SR-TE policy database
---------------------
Color: 2000, End-point: ce00:1:33::
Name: srte_c_2000_ep_ce00:1:33::
Status:
Admin: up Operational: down for 00:00:06 (since Apr 27 09:08:32.012)
Candidate-paths:
Preference: 100 (configuration) (inactive)
Name: SRV6Policy-PE2-toPE3
Last error: SRv6 SIDs failed verification
Requested BSID: dynamic
Constraints:
Protection Type: protected-preferred
Maximum SID Depth: 13
Explicit: segment-list srv6-PE2-to-PE3 (inactive)
Last error: Topology check failed for SID: ce00:1:11::
Weight: 1, Metric Type: TE
SID[0]: ce00:1:2::/48
SID[1]: ce00:1:11::/48
SID[2]: ce00:1:1::/48
SRv6 Information:
Locator: corelocator
Binding SID requested: Dynamic
Binding SID behavior: uB6 (Insert.Red)
Attributes:
Forward Class: 0
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
RP/0/RSP1/CPU0:ASR-9904-5-PE2-PCC#show segment-routing traffic-eng forwarding policy name srte_c_2000_ep_ce00:1:33::
Sun Apr 27 09:08:49.239 UTC
SR-TE Policy Forwarding database
--------------------------------
Color: 2000, End-point: ce00:1:33::
Name: srte_c_2000_ep_ce00:1:33::
Policy Packets/Bytes Switched: ?/?
觀察
- 當路由器上設定了過載位(P2、PE1或P1)時
- 在SRV6中,當SID清單中的任何路由器(P2、PE1或P1)超載時,SRV6 TE關閉,路徑失效,最後一個錯誤表示無法訪問的路由器的SRV6 SID
附註:在PE3上設定Overload位時,SRV6 SRTE策略保持啟用並有效。
結論
本文檔概述了分段路由流量工程(SR-TE)路徑的驗證行為,著重說明了如何根據SID解析標準安裝和評估策略。它突出顯示,只有首端路由器嚴格驗證SID清單中的第一個SID,從而在域間或受限可見性場景中實現了靈活性。在網路維護期間,瞭解這些驗證機制至關重要,因為運營商可以利用此行為預先安裝SR-TE策略,這些策略不會在網路中傳輸過載或維護不足節點,同時保持轉發連續性。
指令
- show segment-routing traffic-eng policy name <>
- show segment-routing traffic-eng forwarding policy name <>
- show segment-routing traffic-eng ipv4 topology isis hostname <> private