3. IS-IS Segment Routing over MPLS YANG 模块
中文导读: 本节对应 RFC 9902 的 3. IS-IS Segment Routing over MPLS YANG 模块 部分, 对应文档标题为 3. IS-IS Segment Routing over MPLS YANG 模块. 下方若包含英文 RFC 原文, 注册表名称, 字段名, 算法名, 对象标识符, 媒体类型, 邮箱地址, URL, 代码, ABNF, ASN.1, YANG, JSON, XML, 测试向量或参考文献条目, 均按规范原样保留, 因为这些内容需要与 RFC 文本, IANA 注册表, 实现代码或验证工具逐字一致. 中文段落用于说明本节的作用, 阅读重点和实现含义, 不改变任何协议语义或注册值.
本页包含机器可读或接近机器可读的规范材料. 对 ASN.1, YANG, JSON Schema, XML Schema, 伪代码, 注册模板, 常量表和算法标识符, 翻译时必须保留关键字, 类型名, OID, namespace, 枚举值, 字段名和语法结构. 实现者应把这些块视为生成代码, 配置模型, 验证输入或一致性测试的依据.
本节给出 MPLS 数据平面上 IS-IS 段路由扩展的完整 YANG 模块.
模块结构 (Module Structure)
ietf-isis-sr-mpls YANG 模块扩展 IS-IS 基础 YANG 模型 [RFC9130], 并与段路由基础模块 [RFC9020] 集成.
模块头部 (Module Header)
module ietf-isis-sr-mpls {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-isis-sr-mpls";
prefix isis-sr-mpls;
import ietf-routing {
prefix rt;
reference
"RFC 8349: A YANG Data Model for Routing Management
(NMDA Version)";
}
import ietf-segment-routing-mpls {
prefix sr-mpls;
reference
"RFC 9020: YANG Data Model for Segment Routing";
}
import ietf-isis {
prefix isis;
reference
"RFC 9130: YANG Data Model for the IS-IS Protocol";
}
organization
"IETF LSR - Link State Routing Working Group";
contact
"WG Web: `https://datatracker.ietf.org/wg/lsr/`
WG List: <mailto:[email protected]>
Editor: Stephane Litkowski
<mailto:[email protected]>
Editor: Yingzhen Qu
<mailto:[email protected]>
Editor: Acee Lindem
<mailto:[email protected]>
Editor: Ing-Wher Chen
<mailto:[email protected]>
Editor: Jeff Tantsura
<mailto:[email protected]>";
description
"This YANG module defines the configuration and operational
state for IS-IS extensions for Segment Routing (SR) over the
MPLS data plane.
This YANG module conforms to the Network Management
Datastore Architecture (NMDA) as described in RFC 8342.
Copyright (c) 2025 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Revised BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9902;
see the RFC itself for full legal notices.";
revision 2025-12 {
description
"Initial revision.";
reference
"RFC 9902: A YANG Data Model for IS-IS Segment Routing
over the MPLS Data Plane";
}
}
关键数据节点 (Key Data Nodes)
段路由激活 (Segment Routing Activation)
该模块提供 enable 叶子节点, 用于激活 IS-IS SR MPLS 功能:
Path: /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/isis:isis/segment-routing/enabled
Type: boolean
Default: false
启用后, 路由器会根据基础 SR 模块中的 SRGB/SRLB 配置通告 SR 能力.
映射服务器配置 (Mapping Server Configuration)
通告策略 (Advertise Policies):
- Path:
/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/isis:isis/segment-routing/bindings/advertise/policies - Type: 指向映射服务器策略名称的 leafref
- Description: 控制哪些映射服务器策略会在 IS-IS 中通告
接收绑定 (Receive Bindings):
- Path:
/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/isis:isis/segment-routing/bindings/receive - Type: boolean
- Description: 控制是否接收和处理映射服务器条目
TI-LFA 配置 (TI-LFA Configuration)
该模块扩展 IS-IS 接口快速重路由配置, 以支持拓扑无关无环备用路径 (Topology Independent Loop-Free Alternate, TI-LFA):
Path: /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/isis:isis/interfaces/interface/fast-reroute/ti-lfa
配置选项 (Configuration Options):
- enable: 启用/禁用 TI-LFA
- level: 应用于 level-1, level-2 或二者
- node-protection: 启用节点保护
运行状态数据 (Operational State Data)
路由器能力 (Router Capabilities)
该模块扩展 IS-IS 路由器能力, 以包含:
SR 能力 (SR Capability):
- Path:
/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/isis:isis/router-capabilities/sr-capability - Contents:
- SRGB ranges
- SR algorithms supported
- MPLS encapsulation capability
SR 算法 (SR Algorithms):
- Path:
/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/isis:isis/router-capabilities/sr-algorithms - Type: 算法标识符列表
- Common Values:
- 0: 最短路径优先 (Shortest Path First, SPF)
- 1: 严格最短路径优先 (Strict Shortest Path First)
本地块 (Local Blocks):
- Path:
/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/isis:isis/router-capabilities/local-blocks - Contents: SRLB 范围信息
LSP 数据库扩展 (LSP Database Augmentations)
该模块向 IS-IS LSP 数据库条目添加 SR 专用 TLV:
Prefix-SID Sub-TLV:
- 算法标识符
- SID/Index/Label 值
- 标志 (R-flag, N-flag, P-flag, E-flag, V-flag, L-flag)
Adjacency-SID Sub-TLV:
- 标志 (F-flag, B-flag, V-flag, L-flag, S-flag, P-flag)
- 权重
- SID/Label/Index
SID/Label Binding TLV:
- 前缀
- 范围
- SID/Label 映射
使用示例 (Usage Example)
完整配置示例见 Appendix A.
完整模块定义 (Complete Module Definition)
有关包含所有数据节点, 扩展和通知的完整 YANG 模块定义, 请参见:
- 正式 RFC 文本 (Official RFC Text): RFC 9902
- YANG 模块仓库 (YANG Module Repository): IANA YANG Parameters
注意: 完整 YANG 模块代码 (约 500 多行) 包含每个数据节点的详细描述, 约束和引用. 网络运营者应使用 YANG 验证工具, 确保配置符合该模块的约束.