为 IS-IS 协议配置备份选择策略
对 IS-IS 无环路备用 (LFA) 路由的支持实质上增加了 IS-IS 的 IP 快速重新路由功能。Junos OS 会为所有 IS-IS 路由预计算多个无环路备份路由。这些备份路由预安装在 数据包转发引擎 中,当特定路由的下一跃点主链路不再可用时,该执行本地修复并实施备用路径。LFA 的选择是通过选择任何匹配的 LFA 来随机完成的,以前进到给定的目的地。这并不能确保网络的最佳备份覆盖率。为了选择最佳的 LFA,Junos OS 允许您为每个目标(IPv4 和 IPv6)和一个主下一跃点接口配置网络范围的备份选择策略。这些策略根据管理员组、srlg、带宽、保护类型、指标和邻居信息进行评估。
开始为 IS-IS 协议配置备份选择策略之前:
配置路由器接口。请参阅 《Junos OS 网络管理路由设备管理指南
配置内部网关协议或静态路由。请参阅 适用于路由设备的 Junos OS 路由协议库
要为 IS-IS 协议配置备份选择策略,请执行以下作:
- 配置按数据包的负载平衡。
[edit policy-options] user@host# set policy-statement ecmp term 1 then load-balance per-packet
- 在所有接口上启用 RSVP。
[edit protocols] user@host# set rsvp interface all
- 配置管理组。
[edit protocols mpls] user@host# set admin-groups group-name
- 配置 srlg 值。
[edit routing-options] user@host# set srlg srlg-name srlg-value srlg-value
- 在所有接口上启用 MPLS。
[edit protocols mpls] user@host# set interface all
- 在接口上配置 srlg。
[edit protocols mpls] user@host# set interface interface-name srlg srlg-name
- 在接口上配置管理组。
[edit protocols mpls] user@host# set interface interface-name admin-group group-name
- 启用链路保护并在所有接口上配置指标值。
[edit protocols] user@host# set isis interface all level 2 metric 10
- 将路由策略应用于从路由表导出到转转发表的所有等价多路径。
[edit routing-options] user@host# set forwarding-table export ecmp
- 为 IP 地址配置备份选择策略的管理组。您可以选择排除、全部包括、包括任何管理组,或者优先选择备份路径中的管理组。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name admin-group
指定要排除的管理组。
[edit routing-options backup-selection destination ip-address interface interface-name admin-group] user@host# set exclude group-name
如果路径中的任何链路具有列出的任何一个管理组,则不会将备份路径选为无环路备用 (LFA) 或备份下一跃点。
例如,要从管理组中排除组 c1:
[edit routing-options backup-selection destination 0.0.0.0/0 interface all admin-group] user@host# set exclude c1
如果备份路径中的每个链路都需要列出的所有管理组才能接受路径,则配置所有管理组。
[edit routing-options backup-selection destination ip-address interface interface-name admin-group] user@host# set include-all group-name
例如,如果每个链接都需要列出的所有管理组才能接受路径,则要设置所有管理组:
[edit routing-options backup-selection destination 0.0.0.0/0 interface all admin-group] user@host# set include-all c2
如果备份路径中的每个链路至少需要一个列出的管理组才能选择路径,则配置任何管理组。
[edit routing-options backup-selection destination ip-address interface interface-name admin-group] user@host# set include-any group-name
例如,如果备份路径中的每个链路都需要至少一个列出的管理组才能选择路径,则要设置任何管理组:
[edit routing-options backup-selection destination 0.0.0.0/0 interface all admin-group] user@host# set include-any c3
定义一组有序的管理组,用于指定备份路径的首选项。集合中最左边的元素具有最高的优先级。
[edit routing-options backup-selection destination ip-address interface interface-name admin-group] user@host# set preference group-name
例如,要设置一组有序的管理组,以指定备份路径的首选项:
[edit routing-options backup-selection destination 0.0.0.0/0 interface all admin-group] user@host# set preference c4
- 将备份路径配置为仅当带宽大于或等于主下一跃点的带宽时,才允许选择备份下一跃点。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name bandwidth-greater-equal-primary
- 配置备份路径以指定从单跳邻接方或远程路由器(例如 RSVP 备份标签交换路径 (LSP) 尾端路由器)到最终目标的指标。目标指标可以是最高或最低。
配置目标指标最高的备份路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name dest-metric highest
配置目标指标最低的备份路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name dest-metric lowest
- 配置备份路径,该路径是到目标的下游路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name downstream-paths-only
- 在备份路径选择过程中设置根指标和目标指标的优先级。优先顺序可以是:
[root dest] — 备份路径选择或首选项首先基于根指标标准。如果所有根指标的条件相同,则选择或首选项基于 dest-metric。
[dest root] — 备份路径选择或首选项首先基于 dest-metric 标准。如果所有 dest-metric 的条件都相同,则选择基于根指标。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name metric-order root user@host# set backup-selection destination ip-address interface interface-name metric-order dest
- 配置备份路径以定义相邻邻接方的环路 IP 地址列表,以便在备份路径选择中排除或首选。邻接方可以是本地(相邻路由器)邻接方、远程邻接方或备份路径中的任何其他路由器。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name neighbor
配置要排除的邻接方列表。
[edit routing-options backup-selection destination ip-address interface interface-name neighbor] user@host# set exclude neighbor-address
列表中有路由器的备份路径不会被选为无环路备用路径或备份下一跃点。
配置一组有序的邻居作为首选。
[edit routing-options backup-selection destination ip-address interface interface-name neighbor] user@host# set preference neighbor-address
选择具有最左侧邻接方的备份路径。
- 定义每个邻接方策略的备份路径,以排除或首选备份路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface all neighbor-tag
配置为,如果路径中存在任何带有路由标记的节点或路由器,则不选择备份路径作为无环路备用跃点或备份下一跃点。
[edit routing-options backup-selection destination ip-address interface interface-name neighbor-tag] user@host# set exclude route-tag
例如,如果路径中存在任何带有 1004 路由标记的节点或路由器,则不选择备份路径作为无环路备用跃点或下一跃点:
[edit routing-options backup-selection destination 0.0.0.0/0 interface all neighbor-tag] user@host# set exclude 1004
按优先级降序配置路由标记集。
[edit routing-options backup-selection destination ip-address interface interface-name neighbor-tag] user@host# set preference route-tag
例如,要按优先级降序配置路由标记集:
[edit routing-options backup-selection destination 0.0.0.0/0 interface all neighbor-tag] user@host# set preference 1006
- 配置备份路径,将备份路径所需的保护类型指定为链路、节点或节点链路。
选择提供链路保护的备份路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name protection-type link
选择提供节点保护的备份路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name protection-type node
选择允许节点或链路保护 LFA 的备份路径,其中节点保护 LFA 优先于链路保护 LFA。
[edit routing-options] user@host# set backup-selection destination ip-address interface interface-name protection-type node-link
- 指定单跃点邻接方或远程路由器(如 RSVP 备份标签交换路径 (LSP) 尾端路由器)的指标。
选择具有最高根指标的路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface all root-metric highest
选择根指标最低的路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface all root-metric lowest
- 将备份选择路径配置为允许或拒绝主链路与备份路径中每个链路之间的公共共享风险链路组 (SRLG)。
配置备份路径,以允许在主链路和备份路径中的每个链路之间使用公共 srlg。
[edit routing-options] user@host# set backup-selection destination ip-address interface all srlg loose
srlg 冲突次数较少的备份路径是首选。
将备份路径配置为拒绝在主链路与备份路径中的每个链路之间具有公共 srlg 的备份路径。
[edit routing-options] user@host# set backup-selection destination ip-address interface all srlg strict
- 配置备份路径,以控制基于管理组、srlg、带宽、保护类型、邻居、邻居标记和指标评估备份路径的顺序和条件。默认的评估顺序为 admin-group、srlg、bandwidth、protection-type、neighbor-tag、neighbor-tag 和 metric。
[edit routing-options] user@host# set backup-selection destination ip-address interface all evaluation-order admin-group user@host# set backup-selection destination ip-address interface all evaluation-order srlg user@host# set backup-selection destination ip-address interface all evaluation-order bandwidth