使用路径计算配置文件在网络切片中配置 LSP 路由
路径计算配置文件定义了 Paragon Pathfinder 用于计算标签交换路径 (LSP) 的流量工程 (流量工程) 约束条件(例如,管理员颜色、成本和延迟)集。
注意:
要使用计算配置文件在网络切片中配置 LSP 路由,您必须事先了解以下内容:
- 一般流量工程概念
- RFC7950, The YANG 1.1 Data Modeling Language
- RFC7951, JSON Encoding of Data Modeled with YANG
- RFC8040, Internet Web Replication and Caching Taxonomy
- RESTCONF 协议
您可以使用路径计算配置文件来决定网络切片内 LSP 的路由。例如,您可以定义一个配置文件,用于通过切片 ID 为 100 的切片路由管理颜色为 150 的 LSP,或者,您还可以定义一个配置文件来路由切片 ID 为 100 的 LSP,延迟为 10 毫秒。
注意:
您可以使用路径计算配置文件路由 PCC 委托和 PCC 控制的 LSP。您无法使用计算配置文件路由 RSVP LSP 和 PCE 启动的 LSP。
在创建配置文件之前,请确保您有权访问并了解以下内容:
-
juniper-pathfinder-lsp-policy.yang
-
juniper-pathfinder-profile.yang
-
lsp.json(REST LSP 模型)
要使用路径计算配置文件配置网络切片,您必须:
- 在 RESTCONF 接口中创建配置文件(由 juniper-pathfinder-profile YANG 模型定义)。
- 配置策略(由 juniper-pathfinder-lsp-policy YANG 模型定义),以使用 RESCONF 接口将 LSP 映射到配置文件。
以下示例配置文件在延迟较低的链路上路由 LSP。
{
"juniper-pathfinder-profile:computation-profiles": [
{
"comment": "Profile low-delay in use",
"id": "low-delay",
"path-affinities-values": {
"path-affinities-value": [
{
"usage": "resource-aff-include-any",
"value": "02"
}
]
}
}
]
}
以下策略示例在具有以下特性的 LSP 上使用低延迟计算配置文件
- 字符串 DEMO,或者
- 使用 admin 颜色或介于 100 到 200 之间的 SR-流量工程颜色定义的 SR-流量工程策略
您可以使用
grule 解释策略条件。LSP 数据遵循 Paragon Pathfinder REST API 模型。
{
"juniper-pathfinder-lsp-policy:lsp-policy": {
"policy-definitions": {
"policy-definition": [{
"actions": {
"path-computation-profiles": [
"low-delay",
"prio-5"
]
},
"comment": "Use low delay for some LSPs(testMe)",
"conditions": {
"condition": "( (LSP.liveProperties != nil) && (LSP.liveProperties.srPolicy != nil) && ((LSP.liveProperties.srPolicy.color >= 100 || LSP.liveProperties.srPolicy.color <= 200 ))) || LSP.name.Contains(\"DEMO\")"
},
"name": "UseLowDelay",
"priority": 20,
"terminal": true
}]
}
}
}