用于 IS-IS 和 OSPF 的静态邻接分段标识符
邻接分段是严格转发的单跳隧道,通过两个节点之间的特定链路传输数据包,与链路成本无关。您可以为接口或接口组配置静态邻接分段标识符 (SID) 标签。
在接口上配置静态邻接 SID 会导致现有动态分配的邻接 SID 连同其传输路由一起被移除。
对于静态邻接 SID,从静态保留标签池或分段路由全局块 (SRGB) 中拾取标签。
您可以使用以下配置保留用于静态分配标签的标签范围:
user@host# set protocols mpls label-range static-label-range start-value end-value
任何协议都可以使用静态池来分配此范围内的标签。您需要确保没有两个协议使用相同的静态标签。可以通过配置 using 关键字 label从此标签块分配邻接 SID。 label 需要显式配置特定邻接 SID 的值。特定标签将播发为特定级别和地址家族的该接口的邻接 SID。
以下是 IS-IS 的配置示例:
user@host# set protocols mpls label-range static-label-range 700000 799999;user@host# set protocols isis source-packet-routing srgb start-label 800000 index-range 4000;user@host# set protocols isis interface ge-0/0/0.1 level 1 ipv4-adjacency-segment unprotected label 700001;
以下是 OSPF 的配置示例:
user@host# set protocols mpls label-range static-label-range 700000 799999;user@host# set protocols ospf source-packet-routing srgb start-label 800000 index-range 4000;user@host# set protocols ospf area 0.0.0.0 interface ge-0/0/0.1 ipv4-adjacency-segment unprotected label 700001;
使用 ipv4-adjacency-segment 命令时,底层接口必须是点对点的。
SRGB 是根据配置为协议分配的全局标签空间。整个 SRGB 中的标签可供 ISIS 使用,不会分配给其他应用程序/协议。前缀 SID(和节点 SID)从此 SRGB 编制索引。
可以在配置中使用关键字“index”从 SRGB 分配 Adj-SID。在这种情况下,应确保 Adj-SID 索引不会与域中的任何其他前缀 SID 冲突。与前缀 SID 一样,调整 SID 也将通过提及与 SRGB 相关的索引来配置。但是,Adj-SID subtlv 仍将 SID 作为值,并设置 L 和 V 标志。
以下是 IS-IS 的配置示例:
user@host# set protocols isis source-packet-routing srgb start-label 800000 index-range 4000;user@host# set protocols isis interface ge-0/0/0.1 level 1 ipv4-adjacency-segment unprotected index 1;
静态邻接 SID 可以按地址族配置,也可以根据是否需要保护进行配置。应在 [edit protocols isis interface interface-name level level-num] 层次结构级别上按每个接口级别配置邻接 SID。
以下是 OSPF 的配置示例:
user@host# set protocols ospf source-packet-routing srgb start-label 800000 index-range 4000;user@host# set protocols ospf area 0.0.0.0 interface ge-0/0/0.1 ipv4-adjacency-segment unprotected index 1;
静态邻接 SID 可以按区域进行配置,也可以根据是否需要保护进行配置。邻接 SID 应在 [edit protocols ospf area area interface interface-name] 层次结构级别为每个接口配置。
-
受保护 — 确保邻接 SID 有资格拥有备份路径,并在邻接 SID 播发中设置 B 标志。
-
未受保护 — 确保未为特定邻接 SID 计算任何备份路径,并且未在邻接 SID 播发中设置 B 标志。
以下是 IS-IS 的配置示例:
user@host# set protocols isis interface ge-0/0/0.1 level 1 ipv4-adjacency-segment unprotected index 1;user@host# set protocols isis interface ge-0/0/1.1 level 1 ipv4-adjacency-segment protected index 2;
以下是 OSPF 的配置示例:
user@host# set protocols ospf area 0.0.0.0 interface ge-0/0/0.1 ipv4-adjacency-segment unprotected index 1;user@host# set protocols ospf area 0.0.0.0 interface ge-0/0/1.1 ipv4-adjacency-segment protected index 2;
您可以将一组接口分组到一个接口组下,并为该接口组配置邻接 SID,并且可以使用权重在接口组下的接口之间均衡流量,从而对多个接口使用相同的相邻 SID。这可以在 [edit protocols isis interface-group interface_group_name] 层级下配置。
在 LAN 子网中使用分段路由时,LAN 中的每个路由器都可以通告其每个邻接方的邻接 SID。要为特定邻接方的 LAN 接口配置邻接 SID,请在 IS-IS 的层次结构级别和 OSPF 的 [[edit protocols ospf area 0.0.0.0 interface interface_name lan-neighbor neighbor-routerid]] 层次结构级别的 [edit protocols isis interface interface_name level level_num lan-neighbor neighbor-sysid] LAN 邻接方配置下配置邻接 SID。以下是 IS-IS 的配置示例:
user@host# set protocols mpls label-range static-label-range 700000 799999;user@host# set protocols isis source-packet-routing srgb start-label 800000 index-range 4000;user@host# set protocols isis interface ge-0/0/0.1 level 1 lan-neighbor 1234.1234.1234 ipv4-adjacency-segment unprotected label 700001;
以下是 OSPF 的配置示例:
user@host# set protocols mpls label-range static-label-range 700000 799999;user@host# set protocols ospf source-packet-routing srgb start-label 800000 index-range 4000;user@host# set protocols ospf area 0.0.0.0 interface ge-1/0/0.1 lan-neighbor 11.12.1.2 ipv4-adjacency-segment unprotected label 700001;
可以通过在接口组下声明一组接口并为该接口组配置邻接分段来配置邻接集。可以从保留的静态标签池或 ISIS SRGB 中选择邻接 SID。与普通接口不同,默认情况下不会在接口组下分配动态邻接 SID,在这种情况下 dynamic ,将配置 CLI 语句。只要未配置链路组保护,在接口组下配置的接口也可以单独配置为独立接口。以下是配置示例:
user@host# set protocols mpls label-range static-label-range 700000 799999;user@host# set protocols isis source-packet-routing srgb start-label 800000 index-range 4000;user@host# set protocols isis interface-group group1 interface ge-0/0/0.1 weight 1;user@host# set protocols isis interface-group group1 interface ge-0/0/1.1 weight 2;user@host# set protocols isis interface-group group1 ipv4-adjacency-segment unprotected label 700001;
使用以下 CLI 层次结构为 IS-IS 配置邻接 SID:
[edit ]
protocols {
isis {
interface <interface_name> {
level <level_num> {
ipv4-adjacency-segment {
protected {
dynamic;
label <value>
index <index>
}
unprotected {
dynamic;
label <value>
index <index>
}
}
ipv6-adjacency-segment {
protected {
dynamic;
label <value>
index <index>
}
unprotected {
dynamic;
label <value>
index <index>
}
}
}
}
interface <interface_name> {
level <level_num> {
lan-neighbor <neighbor-sysid>{
ipv4-adjacency-segment {
protected {
dynamic;
label <value>
index <index>
}
unprotected {
dynamic;
label <value>
index <index>
}
}
ipv6-adjacency-segment {
protected {
dynamic;
label <value>
index <index>
}
unprotected {
dynamic;
label <value>
index <index>
}
}
}
}
}
interface-group <interface_group_name> {
interface <interface_1> weight <weight>
...
interface <interface_n> weight <weight>
level <level_num> {
ipv4-adjacency-segment {
protected {
dynamic;
label <value>
index <index>
}
unprotected {
dynamic;
label <value>
index <index>
}
}
ipv6-adjacency-segment {
protected {
dynamic;
label <value>
index <index>
}
unprotected {
dynamic;
label <value>
index <index>
}
}
}
}
}
}
使用以下 CLI 层次结构为 OSPF 配置邻接 SID:
[edit ]
protocols {
ospf {
area 0.0.0.0 {
interface <interface_name> {
ipv4-adjacency-segment {
protected {
dynamic;
label <value>
index <index>
}
unprotected {
dynamic;
label <value>
index <index>
}
}
}
interface <interface_name> {
lan-neighbor <neighbor-routerid>{
ipv4-adjacency-segment {
protected {
dynamic;
label <value>
index <index>
}
unprotected {
dynamic;
label <value>
index <index>
}
}
}
}
}
}
}
使用以下作 CLI 命令验证配置:
显示 ISIS 邻接详细信息
以下示例输出显示已配置和动态邻接 SID 的详细信息。
user@host> show isis adjacency r1 detail r1 Interface: ge-0/0/2.1, Level: 1, State: Up, Expires in 19 secs Priority: 64, Up/Down transitions: 1, Last transition: 01:23:38 ago Circuit type: 3, Speaks: IP, IPv6, MAC address: 0:5:86:48:49:0 Topologies: Unicast Restart capable: Yes, Adjacency advertisement: Advertise LAN id: r0.03, IP addresses: 11.1.1.2 IPv6 addresses: fe80::205:8600:148:4900 Level 1 IPv4 protected Adj-SID: 4138, Flags: BVL Level 1 IPv6 unprotected Adj-SID: 4139, Flags: FVL
显示 OSPF 邻接方详细信息
以下示例输出显示已配置和动态邻接 SID 的详细信息。
user@host> show ospf neighbor detail
Address Interface State ID Pri Dead
11.12.1.2 ge-1/0/0.0 Full 12.1.1.1 128 34
Area 0.0.0.0, opt 0x52, DR 0.0.0.0, BDR 0.0.0.0
Up 00:06:27, adjacent 00:06:27
SPRING Adjacency Labels:
Label Flags Adj-Sid-Type
90010 BVLP Protected
1212 VLP UnProtected
regress@10.49.129.231# run show route label 90010
mpls.0: 19 destinations, 19 routes (19 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
90010 *[L-OSPF/10/5] 00:00:21, metric 0
> to 11.12.1.2 via ge-1/0/0.0, Pop
to 11.12.2.2 via ge-1/0/2.0, Swap 16021
to 11.12.3.2 via ge-1/0/3.0, Swap 16021
显示 ISIS 数据库扩展
以下示例输出显示 LAN/PTP 邻接 SID 的详细信息。
user@host> show isis database extensive
r0.00-00 Sequence: 0x16, Checksum: 0xf156, Lifetime: 960 secs
IPV4 Index: 1000, IPV6 Index: 2000
Node Segment Blocks Advertised:
Start Index : 0, Size : 4096, Label-Range: [ 16, 4111 ]
IS neighbor: r4.00 Metric: 10
Two-way fragment: r4.00-00, Two-way first fragment: r4.00-00
IS neighbor: r0.03 Metric: 10
Two-way fragment: r0.03-00, Two-way first fragment: r0.03-00
IP prefix: 10.10.10.10/32 Metric: 0 Internal Up
IP prefix: 11.1.1.0/24 Metric: 10 Internal Up
IP prefix: 21.1.1.0/24 Metric: 10 Internal Up
V6 prefix: 1001::/64 Metric: 10 Internal Up
V6 prefix: 2001::/64 Metric: 10 Internal Up
V6 prefix: abcd::10:10:10:10/128 Metric: 0 Internal Up
…
TLVs:
Area address: 49.00 (2)
LSP Buffer Size: 1492
Speaks: IP
Speaks: IPV6
IP router id: 10.10.10.10
IP address: 10.10.10.10
Hostname: r0
IS neighbor: r0.03, Internal, Metric: default 10
IS neighbor: r4.00, Internal, Metric: default 10
IS extended neighbor: r0.03, Metric: default 10
IP address: 11.1.1.1
Local interface index: 342, Remote interface index: 0
Current reservable bandwidth:
Priority 0 : 1000Mbps
Priority 1 : 1000Mbps
Priority 2 : 1000Mbps
Priority 3 : 1000Mbps
Priority 4 : 1000Mbps
Priority 5 : 1000Mbps
Priority 6 : 1000Mbps
Priority 7 : 1000Mbps
Maximum reservable bandwidth: 1000Mbps
Maximum bandwidth: 1000Mbps
Administrative groups: 0 <none>
LAN IPV4 Adj-SID: 4138, Weight:0, Neighbor:r1, Flags: BVL
LAN IPV6 Adj-SID: 4139, Weight:0, Neighbor:r1, Flags: FBVL
IS extended neighbor: r4.00, Metric: default 10
IP address: 21.1.1.1
Neighbor's IP address: 21.1.1.2
Local interface index: 334, Remote interface index: 335
Current reservable bandwidth:
Priority 0 : 1000Mbps
Priority 1 : 1000Mbps
Priority 2 : 1000Mbps
Priority 3 : 1000Mbps
Priority 4 : 1000Mbps
Priority 5 : 1000Mbps
Priority 6 : 1000Mbps
Priority 7 : 1000Mbps
Maximum reservable bandwidth: 1000Mbps
Maximum bandwidth: 1000Mbps
Administrative groups: 0 <none>
P2P IPV4 Adj-SID - Flags: BVL, Weight:0, Label: 4125
P2P IPV6 Adj-SID - Flags: FBVL, Weight:0, Label: 4126
显示 isis 接口组
以下示例输出显示有关指定接口组的状态信息。
user@host> show isis interface-group Interface-group: r1r2ig ge-0/0/1.1, 1000Mbps, Up, Non-Degraded, Weight: 1 ge-0/0/1.3, 1000Mbps, Up, Non-Degraded, Weight: 1 ge-0/0/1.5, 1000Mbps, Up, Non-Degraded, Weight: 1 Total Nominal Bandwidth: 3Gbps, Total Actual Bandwidth: 3Gbps Level 1 IPv4 protected Adj-SID: Label 4138 Level 1 IPv6 unprotected Adj-SID: Label 4139