示例:为第 3 层 VPN 中的 IS-IS 路由配置节点链路保护
节点链路保护通过不同的路由设备建立备用路径。如果某个链路不再可用,假设对某个节点的访问将丢失,请使用节点链路保护。Junos OS 会计算可避开主下一跃点路由设备的备份路径。
要求
此示例要求 Junos OS 9.5 或更高版本。
配置此示例之前,不需要除设备初始化之外的特殊配置。
概述
在此示例中,为 IS-IS 级别 2、LDP 和 RSVP 启用了面向核心的接口。所有面向核心的接口上都启用了节点链路保护,这意味着,如果遍历接口的任何目标的主下一跃点不可用,Junos OS 将在必要时完全避开下一跃点路由器的备份链路。
您还需要配置一个路由策略,要求所有流量都使用按数据包负载均衡,以便启用数据包转发引擎本地修复。通过本地修复,数据包转发引擎可以在从路由引擎接收重新计算的路径之前纠正路径故障并实施备份无环路替代路由。
图 1 显示了此示例中使用的拓扑。
在设备 PE1 上,RSVP LSP 配置为 IS-IS 的备份路径。如果对单跳邻接方而言,依靠最短路径优先 (SPF) 的备份路径计算,可能会使特定网络拓扑的备份覆盖范围不到 100%。您可以将 RSVP LSP 配置为备用路径,从而扩大 IS-IS 和 LDP LSP 的覆盖范围。要将特定 RSVP LSP 配置为备份路径,请在 backup
层次结构级别添加语句 [edit protocols mpls label-switched-path lsp-name]
。
CLI 快速配置 显示了 图 1 中所有设备的配置。 #configuration364__isis-node-link-protection-分步 说明设备 P1 上的步骤。
拓扑
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层级的 [edit]
CLI 中。
设备 CE1
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces lo0 unit 0 family inet address 10.255.1.1/32
设备 PE1
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.2/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.5/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/1 unit 0 family mpls set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.21/30 set interfaces fe-1/2/2 unit 0 family iso set interfaces fe-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.2.2/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0202.00 set protocols rsvp interface fe-1/2/2.0 set protocols rsvp interface fe-1/2/1.0 set protocols rsvp interface lo0.0 set protocols rsvp interface fxp0.0 disable set protocols mpls label-switched-path to-p2 backup set protocols mpls label-switched-path to-p2 to 10.255.4.4 set protocols mpls label-switched-path to-p2 ldp-tunneling set protocols mpls interface fe-1/2/2.0 set protocols mpls interface fe-1/2/1.0 set protocols mpls interface lo0.0 set protocols mpls interface fxp0.0 disable set protocols bgp group l3vpn type internal set protocols bgp group l3vpn local-address 10.255.2.2 set protocols bgp group l3vpn family inet-vpn unicast set protocols bgp group l3vpn peer-as 65534 set protocols bgp group l3vpn local-as 65534 set protocols bgp group l3vpn neighbor 10.255.5.5 set protocols isis spf-options delay 1000 set protocols isis interface all node-link-protection set protocols isis interface all level 2 metric 10 set protocols isis interface all level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface fe-1/2/1.0 set protocols ldp interface fe-1/2/2.0 set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set policy-options policy-statement ecmp term 1 then load-balance per-packet set routing-instances VPN-A instance-type vrf set routing-instances VPN-A interface fe-1/2/0.0 set routing-instances VPN-A route-distinguisher 65534:1234 set routing-instances VPN-A vrf-target target:65534:1234 set routing-instances VPN-A routing-options static route 10.255.1.1/32 next-hop 10.0.0.1 set routing-options autonomous-system 65534 set routing-options forwarding-table export ecmp
设备 P1
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.6/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.9/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/1 unit 0 family mpls set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.25/30 set interfaces fe-1/2/2 unit 0 family iso set interfaces fe-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.3.3/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0303.00 set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols isis interface all node-link-protection set protocols isis interface all level 2 metric 10 set protocols isis interface all level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement ecmp term 1 then load-balance per-packet set routing-options forwarding-table export ecmp
设备 P2
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.10/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.13/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.4.4/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0404.00 set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols isis interface all node-link-protection set protocols isis interface all level 2 metric 10 set protocols isis interface all level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement ecmp term 1 then load-balance per-packet set routing-options forwarding-table export ecmp
设备 P3
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.22/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.26/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/1 unit 0 family mpls set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.30/30 set interfaces fe-1/2/2 unit 0 family iso set interfaces fe-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.7.7/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0707.00 set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols isis interface all node-link-protection set protocols isis interface all level 2 metric 10 set protocols isis interface all level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement ecmp term 1 then load-balance per-packet set routing-options forwarding-table export ecmp
设备 PE2
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.14/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.17/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.29/30 set interfaces fe-1/2/2 unit 0 family iso set interfaces fe-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.5.5/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0505.00 set protocols rsvp interface fe-1/2/0.0 set protocols rsvp interface fe-1/2/2.0 set protocols rsvp interface lo0.0 set protocols rsvp interface fxp0.0 disable set protocols mpls interface fe-1/2/0.0 set protocols mpls interface fe-1/2/2.0 set protocols mpls interface lo0.0 set protocols mpls interface fxp0.0 disable set protocols bgp group l3vpn type internal set protocols bgp group l3vpn local-address 10.255.5.5 set protocols bgp group l3vpn family inet-vpn unicast set protocols bgp group l3vpn peer-as 65534 set protocols bgp group l3vpn local-as 65534 set protocols bgp group l3vpn neighbor 10.255.2.2 set protocols isis spf-options delay 1000 set protocols isis interface all node-link-protection set protocols isis interface all level 2 metric 10 set protocols isis interface all level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface fe-1/2/0.0 set protocols ldp interface fe-1/2/2.0 set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set policy-options policy-statement ecmp term 1 then load-balance per-packet set routing-instances VPN-A instance-type vrf set routing-instances VPN-A interface fe-1/2/1.0 set routing-instances VPN-A route-distinguisher 65534:1234 set routing-instances VPN-A vrf-target target:65534:1234 set routing-instances VPN-A routing-options static route 10.255.1.1/32 next-hop 10.0.0.18 set routing-options autonomous-system 65534 set routing-options forwarding-table export ecmp
设备 CE2
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.18/30 set interfaces lo0 unit 0 family inet address 10.255.6.6/32
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置多级别 IS-IS:
配置接口。
启用 IS-IS 和 MPLS。
[edit interfaces] user@P1# set fe-1/2/0 unit 0 family inet address 10.0.0.6/30 user@P1# set fe-1/2/0 unit 0 family iso user@P1# set fe-1/2/0 unit 0 family mpls user@P1# set fe-1/2/1 unit 0 family inet address 10.0.0.9/30 user@P1# set fe-1/2/1 unit 0 family iso user@P1# set fe-1/2/1 unit 0 family mpls user@P1# set fe-1/2/2 unit 0 family inet address 10.0.0.25/30 user@P1# set fe-1/2/2 unit 0 family iso user@P1# set fe-1/2/2 unit 0 family mpls user@P1# set lo0 unit 0 family inet address 10.255.3.3/32 user@P1# set lo0 unit 0 family iso address 49.0001.0010.0000.0303.00
为级别 2 配置 IS-IS 接口。
[edit protocols] user@P1# set isis interface all level 2 metric 10 user@P1# set isis interface all level 1 disable user@P1# set isis interface fxp0.0 disable user@P1# set isis interface lo0.0 level 2 metric 0
启用 IS-IS 节点链路保护,同时会自动将备份覆盖范围扩展到所有 LDP LSP。
[edit protocols] user@P1# set isis interface all node-link-protection
(可选)在检测拓扑更改与 SPF 算法运行时之间配置 1000 毫秒的时间间隔。
[edit protocols] user@P1# set isis spf-options delay 1000
配置 MPLS 以同时使用 RSVP 和 LDP 标签交换路径 (LSP)。
[edit protocols] user@P1# set mpls interface all user@P1# set mpls interface fxp0.0 disable user@P1# set rsvp interface all user@P1# set rsvp interface fxp0.0 disable user@P1# set ldp interface all user@P1# set ldp interface fxp0.0 disable
(可选)对于 LDP,启用转发等效类 (FEC) 分解,从而加快全局融合速度。
[edit protocols] user@P1# set ldp deaggregate
要启用数据包转发引擎本地修复,请建立一个策略,强制路由协议进程为给定路由安装所有下一跃点。
此策略可确保备份路由安装在数据包转发引擎用于将流量转发至给定目标的转发表表中。
[edit policy-options policy-statement ecmp term 1] user@P1# set then load-balance per-packet
使用
export
语句将策略应用于本地路由器的转发表。[edit routing-options forwarding-table] user@P1# set export ecmp
结果
在配置模式下,输入 show interfaces
、 show protocols
、 show policy-options
和 show routing-options
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@P1# show interfaces
fe-1/2/0 {
unit 0 {
family inet {
address 10.0.0.6/30;
}
family iso;
family mpls;
}
}
fe-1/2/1 {
unit 0 {
family inet {
address 10.0.0.9/30;
}
family iso;
family mpls;
}
}
fe-1/2/2 {
unit 0 {
family inet {
address 10.0.0.25/30;
}
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.3.3/32;
}
family iso {
address 49.0001.0010.0000.0303.00;
}
}
}
user@P1# show protocols
rsvp {
interface all;
interface fxp0.0 {
disable;
}
}
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
isis {
spf-options delay 1000;
interface all {
node-link-protection;
level 2 metric 10;
level 1 disable;
}
interface fxp0.0 {
disable;
}
interface lo0.0 {
level 2 metric 0;
}
}
ldp {
deaggregate;
interface all;
interface fxp0.0 {
disable;
}
}
user@P1# show policy-options
policy-statement ecmp {
term 1 {
then {
load-balance per-packet;
}
}
}
user@P1# show routing-options
forwarding-table {
export ecmp;
}
完成设备配置后,请从配置模式进入 commit
。
验证
确认配置工作正常。
检查 MPLS LSP 备份路径
目的
显示有关指定为 IS-IS 路由备份路由的 MPLS 标签交换路径 (LSP) 的信息。
行动
在设备 PE1 上,从操作模式输入 show isis backup label-switched-path
命令。
user@PE1> show isis backup label-switched-path Backup MPLS LSPs: to-p2, Egress: 10.255.4.4, Status: up, Last change: 01:17:45 TE-metric: 19, Metric: 0, Refcount: 1
意义
输出显示备份路径已启动并正常运行。
检查哪些下一跃点邻接方被指定为指向目标节点的备份路径
目的
显示给定目标的每个邻接方 SPF 计算。
行动
在设备 PE1 上,从操作模式输入 show isis backup spf results
命令。
user@PE1> show isis backup spf results IS-IS level 1 SPF results: 0 nodes IS-IS level 2 SPF results: PE2.00 Primary next-hop: fe-1/2/2.0, IPV4, P3, SNPA: 0:5:85:8f:c8:bd Root: P2, Root Metric: 20, Metric: 10, Root Preference: 0x0 track-item: P2.00-00 Eligible, Backup next-hop: fe-1/2/1.0, LSP, to-p2 Root: P3, Root Metric: 10, Metric: 10, Root Preference: 0x0 Not eligible, Reason: Interface is already covered Root: P1, Root Metric: 10, Metric: 20, Root Preference: 0x0 track-item: P3.00-00 Not eligible, Reason: Interface is already covered P2.00 Primary next-hop: fe-1/2/1.0, IPV4, P1, SNPA: 0:5:85:8f:c8:bd Root: P2, Root Metric: 20, Metric: 0, Root Preference: 0x0 track-item: P2.00-00 Not eligible, Reason: Primary next-hop link fate sharing Root: P1, Root Metric: 10, Metric: 10, Root Preference: 0x0 Not eligible, Reason: Primary next-hop link fate sharing Root: P3, Root Metric: 10, Metric: 20, Root Preference: 0x0 track-item: P1.00-00 Not eligible, Reason: Primary next-hop node fate sharing P3.00 Primary next-hop: fe-1/2/2.0, IPV4, P3, SNPA: 0:5:85:8f:c8:bd Root: P2, Root Metric: 20, Metric: 20, Root Preference: 0x0 track-item: P3.00-00 track-item: P2.00-00 track-item: P1.00-00 Eligible, Backup next-hop: fe-1/2/1.0, LSP, to-p2 Root: P3, Root Metric: 10, Metric: 0, Root Preference: 0x0 Not eligible, Reason: Interface is already covered Root: P1, Root Metric: 10, Metric: 10, Root Preference: 0x0 track-item: P3.00-00 Not eligible, Reason: Interface is already covered P1.00 Primary next-hop: fe-1/2/1.0, IPV4, P1, SNPA: 0:5:85:8f:c8:bd Root: P2, Root Metric: 20, Metric: 10, Root Preference: 0x0 track-item: P2.00-00 track-item: P1.00-00 Not eligible, Reason: Primary next-hop link fate sharing Root: P1, Root Metric: 10, Metric: 0, Root Preference: 0x0 Not eligible, Reason: Primary next-hop link fate sharing Root: P3, Root Metric: 10, Metric: 10, Root Preference: 0x0 track-item: P1.00-00 Eligible, Backup next-hop: fe-1/2/2.0, IPV4, P3, SNPA: 0:5:85:8f:c8:bd 4 nodes
意义
输出指示特定接口或节点是否已被指定为备份路径以及原因。
检查备份覆盖范围
目的
检查受保护节点和前缀的百分比。
行动
在操作模式下,输入 show isis backup coverage
命令。
user@PE1> show isis backup coverage Backup Coverage: Topology Level Node IPv4 IPv6 CLNS IPV4 Unicast 1 0.00% 0.00% 0.00% 0.00% IPV4 Unicast 2 75.00% 87.50% 0.00% 0.00%
user@P1> show isis backup coverage Backup Coverage: Topology Level Node IPv4 IPv6 CLNS IPV4 Unicast 1 0.00% 0.00% 0.00% 0.00% IPV4 Unicast 2 75.00% 71.43% 0.00% 0.00%
user@P2> show isis backup coverage Backup Coverage: Topology Level Node IPv4 IPv6 CLNS IPV4 Unicast 1 0.00% 0.00% 0.00% 0.00% IPV4 Unicast 2 50.00% 37.50% 0.00% 0.00%
user@P3> show isis backup coverage Backup Coverage: Topology Level Node IPv4 IPv6 CLNS IPV4 Unicast 1 0.00% 0.00% 0.00% 0.00% IPV4 Unicast 2 75.00% 71.43% 0.00% 0.00%
user@PE2> show isis backup coverage Backup Coverage: Topology Level Node IPv4 IPv6 CLNS IPV4 Unicast 1 0.00% 0.00% 0.00% 0.00% IPV4 Unicast 2 50.00% 37.50% 0.00% 0.00%
意义
通过 IS-IS 路由提供的备份覆盖范围级别取决于实际的网络拓扑结构,对于任何给定路由设备上的所有目标,通常不到 100%。您可以扩展备份覆盖范围,以包括 RSVP LSP。
检查配置的保护类型
目的
在 IS-IS 域中的所有节点上,检查受保护节点和前缀的类型和百分比。
行动
在操作模式下,输入 show isis interface detail
命令。
user@PE1> show isis interface detail IS-IS interface database: lo0.0 Index: 76, State: 0x6, Circuit id: 0x1, Circuit type: 0 LSP interval: 100 ms, CSNP interval: disabled Adjacency advertisement: Advertise Level Adjacencies Priority Metric Hello (s) Hold (s) Designated Router 1 0 64 0 Passive 2 0 64 0 Passive fe-1/2/2.0 Index: 79, State: 0x6, Circuit id: 0x1, Circuit type: 2 LSP interval: 100 ms, CSNP interval: 10 s Adjacency advertisement: Advertise Protection Type: Node Link Level Adjacencies Priority Metric Hello (s) Hold (s) Designated Router 2 1 64 10 9.000 27 P3.03 (not us) fe-1/2/1.0 Index: 77, State: 0x6, Circuit id: 0x1, Circuit type: 2 LSP interval: 100 ms, CSNP interval: 10 s Adjacency advertisement: Advertise Protection Type: Node Link Level Adjacencies Priority Metric Hello (s) Hold (s) Designated Router 2 1 64 10 9.000 27 P1.02 (not us)
意义
输出显示接口上配置了节点链路保护。