简介
本文描述当路由器设置过载(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列表,其中仅验证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,且关联的显式路径被置于inactive状态,从而阻止将其用于流量引导。
注意:
当在末端路由器(PE1)上设置过载位时,其SID仍是已配置的SID列表的一部分,但在验证期间会从封装标签堆栈中删除。因此,SR-TE策略保持启用并有效,因为它符合最低要求:第一个SID解析为传出接口(例如,HundredGigE0/1/0/2),并具有解析的SID描述符。但是,流量不会到达PE1,因为其标签不存在于转发堆栈中。要确保SR-TE中静态SID列表的完全端到端验证,请使用最后一跳的SID描述符验证整个LSP路径。
使SID列表无效的条件
- 当它是空的。
- 当头端无法将第一个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位时,绕过P1时,策略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