网络中的分段路由 (SR) 或源数据包路由 (SPRING) 是一种控制平面架构,可使入口路由器引导数据包通过一组特定的节点和链路,而无需依赖网络中的中间节点来确定应采用的实际路径。分段路由全局块 (SRGB) 是分段路由中使用的标签值范围。Junos OS 允许您将前缀分段标识符 (SID) 和节点 SID 配置为通过策略配置在 IS-IS 中播发的前缀。
在为 IS-IS 协议配置 SPRING SRGB、前缀 SID 和任播 SID 之前,必须:
配置路由器接口。
配置路由器 ID。
配置 IS-IS。
要使用 SPRING SRGB、前缀 SID 和 IS-IS 协议的任播 SID 配置设备 R1,请执行以下作:
- 配置 SRGB 的起始标签和索引范围。
[edit protocols isis source-packet-routing]
user@host# set srgb start-label start-label-value
user@host# set srgb index-range index-range-value
例如,将 SRGB 配置为 start-label 800000 和 index-range 40000 。
[edit protocols isis source-packet-routing]
user@host# set srgb start-label 800000
user@host# set srgb index-range 40000
- 将路由策略配置为与路由(IPv4 或 IPv6)完全匹配。为给定术语配置前缀分段的索引和节点分段,并接受路由策略。
[edit policy-options policy-statement policy-name term term-value]
user@host# set from route-filter IP address exact
user@host# set then prefix-segment index index-value
user@host# set then prefix-segment node-segment
user@host# set accept
注意:
在环路接口 (lo0.0) 或有效的短接口上将节点分段配置为 /32 前缀。
例如,将路由策略配置为与 IPv4 路由完全匹配。为给定术语配置前缀分段的索引和节点分段,并接受路由策略。
[edit policy-options policy-statement policy-name term term-value]
user@host# set from route-filter 198.51.100.1/32 exact
user@host# set then prefix-segment index index-value
user@host# set then prefix-segment node-segment
user@host# set accept
例如,将路由策略配置为与 IPv6 路由完全匹配。为给定术语配置前缀分段的索引和节点分段,并接受路由策略。
[edit policy-options policy-statement policy-name term term-value]
user@host# set from route-filter 2001:db8::/32 exact
user@host# set then prefix-segment index index-value
user@host# set then prefix-segment node-segment
user@host# set accept
- 为给定术语配置前缀分段的索引和节点分段,并接受路由策略。
[edit policy-options policy-statement policy-name term term-value then]
user@host# set prefix-segment index index-value
user@host# set prefix-segment node-segment
user@host# set accept
例如,将前缀分段配置为索引 1004,将节点分段配置为策略语句前缀 SID 的术语 1,并接受路由策略。
[edit policy-options policy-statement prefix-sid term 1 then]
user@host# set prefix-segment index 1004
user@host# set prefix-segment node-segment
user@host# set accept
- 在多个路由器上为任播 SID 配置具有相同前缀(IPv4 或 IPv6)和相同前缀分段的路由策略。
注意:
对于任播前缀 SID,在环路接口 ( lo0.0) 上配置前缀 SID。
[edit policy-options policy-statement prefix-sid term 1 ]
user@host# set from route-filter IP address exact
user@host# set then prefix-segment index index-value
user@host# set then accept
例如,在两台路由器 R0 和 R1 上为任播 SID 配置 IPv4 前缀 198.51.100.1/32,前缀为 1000。
[edit policy-options policy-statement prefix-sid term 1 ]
user@host# set from route-filter 198.51.100.1/32 exact
user@host# set then prefix-segment index 1000
user@host# set then accept
例如,在两台路由器 R0 和 R1 上为任播 SID 配置前缀 2001:db8::/32 和前缀段 1000。
[edit policy-options policy-statement prefix-sid term 1 ]
user@host# set from route-filter 2001:db8::/32 exact
user@host# set then prefix-segment index 2000
user@host# set then accept
- 在 IS-IS 协议上配置导出策略。
[edit protocols isis]
user@host# export prefix-sid
- 为 IPv4-MPLS 家族流量配置流量工程快捷方式。
[edit protocols isis traffic-engineering]
user@host# set family inet-mpls shortcuts
- 为 IPv6-MPLS 家族流量配置流量工程快捷方式。
[edit protocols isis traffic-engineering]
user@host# set family inet6-mpls shortcuts
- 配置显式 NULL 以在所有前缀 SID 播发中启用 E 位和 P 位。
[edit protocol isis source-packet-routing]
user@host# set explicit-null
- 配置邻接分段保留时间以保留分段邻接。
[edit protocol isis source-packet-routing]
user@host# set adjacency-segment hold-time hold-time
例如,配置等待时间为 240,000 毫秒的邻接分段。
[edit protocol isis source-packet-routing]
user@host# set adjacency-segment hold-time 240000