示例:在 IS-IS 网络中配置基于 LDP 隧道的远程 LFA
此示例说明如何为 IS-IS 网络中的 LDP 隧道配置远程 LFA,以扩展备份保护。
要求
此示例使用以下硬件和软件组件:
-
六台路由器在连接的接口上启用了 IS-IS 协议和 LDP。
-
在所有设备上运行 Junos OS。
在 IS-IS 网络中配置通过 LDP 隧道的远程 LFA 之前,请确保满足以下条件:
-
LDP 在环路接口上启用。如果没有环路接口,则无法形成 LDP 目标邻接。如果没有 LDP 目标邻接,就无法配置远程 LFA。
-
远程 LFA 必须允许非对称远程邻接方发现,也就是说,它必须定期向启动远程邻接方的路由器发送定向查询,以实现 LDP 自动定向邻接。
-
必须在本地修复点 (PLR) 上配置链路保护或节点链路保护。
概述
此示例在环形拓扑中包含六台路由器。在直连接口上配置 IS-IS 协议。设备 R1 是 PLR。此示例验证 Junos OS 是否使用 LDP 下一跃点路由作为备用路由更新设备 R1 的路由表。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层次结构级别的 [edit] CLI 中,然后从配置模式进入。commit
路由器 R1
set interfaces ge-1/0/0 unit 1 description R1->R2 set interfaces ge-1/0/0 unit 1 family inet address 10.1.1.1/24 set interfaces ge-1/0/0 unit 1 family iso set interfaces ge-1/0/0 unit 1 family mpls set interfaces ge-1/5/0 unit 12 description R1->R6 set interfaces ge-1/5/0 unit 12 family inet address 10.1.6.12/24 set interfaces ge-1/5/0 unit 12 family iso set interfaces ge-1/5/0 unit 12 family mpls set interfaces lo0 unit 3 family inet address 10.255.102.128/32 set interfaces lo0 unit 3 family iso address 49.0001.1720.1600.1030.00 set protocols isis interface ge-1/0/0.1 set protocols isis interface ge-1/5/0.12 link-protection set protocols isis interface lo0.12 passive set protocols isis interface all level 2 metric 10 set protocols isis interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols isis interface all node-link-protection set protocols isis backup-spf-options remote-backup-calculation set protocols isis backup-spf-options node-link-degradation set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp auto-targeted-session set protocols ldp auto-targeted-session teardown-delay 60 set protocols ldp auto-targeted-session maximum-sessions 20 set protocols ldp deaggregate set policy-options policy-statement ecmp term 1 then load-balance per-packet set routing-options forwarding-table export ecmp
路由器 R2
set interfaces ge-1/0/1 unit 2 description R2>R1 set interfaces ge-1/0/1 unit 2 family inet address 10.1.1.2/24 set interfaces ge-1/0/1 unit 2 family iso set interfaces ge-1/0/1 unit 2 family mpls set interfaces ge-1/1/0 unit 3 description R2->R3 set interfaces ge-1/1/0 unit 3 family inet address 10.1.2.3/24 set interfaces ge-1/1/0 unit 3 family iso set interfaces ge-1/1/0 unit 3 family mpls set interfaces lo0 unit 5 family inet address 10.255.102.178/32 set interfaces lo0 unit 5 family iso address 49.0001.1720.1600.1050.00 set protocols isis interface ge-1/0/1.2 set protocols isis interface ge-1/1/0.3 set protocols isis interface lo0.3 passive set protocols isis interface all level 2 metric 10 set protocols isis interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp auto-targeted-session set protocols ldp auto-targeted-session teardown-delay 60 set protocols ldp auto-targeted-session maximum-sessions 20 set protocols ldp deaggregate
路由器 R3
set interfaces ge-1/1/1 unit 4 description R3->R2 set interfaces ge-1/1/1 unit 4 family inet address 10.1.2.4/24 set interfaces ge-1/1/1 unit 4 family iso set interfaces ge-1/1/1 unit 4 family mpls set interfaces ge-1/2/0 unit 5 description R3->R4 set interfaces ge-1/2/0 unit 5 family inet address 10.1.3.5/24 set interfaces ge-1/2/0 unit 5 family iso set interfaces ge-1/2/0 unit 5 family mpls set interfaces lo0 unit 7 family inet address 10.255.102.146/32 set interfaces lo0 unit 7 family iso address 49.0001.1720.1600.1070.00 set protocols isis interface ge-1/1/1.4 set protocols isis interface ge-1/2/0.5 set protocols isis interface lo0.5 passive set protocols isis interface all level 2 metric 10 set protocols isis interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp auto-targeted-session set protocols ldp auto-targeted-session teardown-delay 60 set protocols ldp auto-targeted-session maximum-sessions 20 set protocols ldp deaggregate
路由器 R4
set interfaces ge-1/2/1 unit 6 description R4->R3 set interfaces ge-1/2/1 unit 6 family inet address 10.1.3.6/24 set interfaces ge-1/2/1 unit 6 family iso set interfaces ge-1/2/1 unit 6 family mpls set interfaces ge-1/3/0 unit 7 description R4->R5 set interfaces ge-1/3/0 unit 7 family inet address 10.1.4.7/24 set interfaces ge-1/3/0 unit 7 family iso set interfaces ge-1/3/0 unit 7 family mpls set interfaces lo0 unit 10 family inet address 10.255.102.156/32 set interfaces lo0 unit 10 family iso address 49.0001.1720.1600.1010.00 set protocols isis interface ge-1/2/1.6 set protocols isis interface ge-1/3/0.7 set protocols isis interface lo0.7 passive set protocols isis interface all level 2 metric 10 set protocols isis interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp auto-targeted-session set protocols ldp auto-targeted-session teardown-delay 60 set protocols ldp auto-targeted-session maximum-sessions 20 set protocols ldp deaggregate
路由器 R5
set interfaces ge-1/3/1 unit 8 description R5->R4 set interfaces ge-1/3/1 unit 8 family inet address 10.1.4.8/24 set interfaces ge-1/3/1 unit 8 family iso set interfaces ge-1/3/1 unit 8 family mpls set interfaces ge-1/4/0 unit 9 description R5->R6 set interfaces ge-1/4/0 unit 9 family inet address 10.1.5.9/24 set interfaces ge-1/4/0 unit 9 family iso set interfaces ge-1/4/0 unit 9 family mpls set interfaces lo0 unit 90 family inet address 10.255.102.166/32 set interfaces lo0 unit 90 family iso address 49.0001.1720.1600.1090.00 set protocols isis interface ge-1/3/1.8 set protocols isis interface ge-1/4/0.9 set protocols isis interface lo0.9 passive set protocols isis interface all level 2 metric 10 set protocols isis interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set ldp auto-targeted-session set ldp auto-targeted-session teardown-delay 60 set ldp auto-targeted-session maximum-sessions 20 set protocols ldp deaggregate
路由器 R6
set interfaces ge-1/4/1 unit 10 description R6->R5 set interfaces ge-1/4/1 unit 10 family inet address 10.1.5.10/24 set interfaces ge-1/4/1 unit 10 family iso set interfaces ge-1/4/1 unit 10 family mpls set interfaces ge-1/5/0 unit 11 description R6->R1 set interfaces ge-1/5/0 unit 11 family inet address 10.1.6.11/24 set interfaces ge-1/5/0 unit 11 family iso set interfaces ge-1/5/0 unit 11 family mpls set interfaces lo0 unit 110 family inet address 10.255.102.136/32 set interfaces lo0 unit 110 family iso address 49.0001.1720.1600.1110.00 set protocols isis interface ge-1/4/1.10 set protocols isis interface ge-1/5/0.11 set protocols isis interface lo0.11 passive set protocols isis interface all level 2 metric 10 set protocols isis interface fxp0.0 disable set protocols isis spf-options delay 1000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp auto-targeted-session teardown-delay 60 set protocols ldp auto-targeted-session maximum-sessions 20 set protocols ldp deaggregate
配置设备 R1
分步程序
下面的示例要求您在各个配置层级中进行导航。有关导航 CLI 的信息,请参阅 《CLI 用户指南》中的在配置模式下使用 CLI 编辑器。
对 IGP 域中的每台瞻博网络路由器重复此过程,除步骤 4 和 5 外,修改相应的接口名称、地址和任何其他参数。
要配置设备 R1:
-
配置接口。
[edit interfaces] user@R1# set ge-1/0/0 unit 1 description R1->R2 user@R1# set ge-1/0/0 unit 1 family inet address 10.1.1.1/24 user@R1# set ge-1/0/0 unit 1 family iso user@R1# set ge-1/0/0 unit 1 family mpls user@R1# set ge-1/5/0 unit 12 description R1->R6 user@R1# set ge-1/5/0 unit 12 family inet address 10.1.6.12/24 user@R1# set ge-1/5/0 unit 12 family iso user@R1# set ge-1/5/0 unit 12 family mpls
-
为设备分配环路地址。
[edit interfaces lo0 unit 3] user@R1# set family inet address 10.255.102.128/32 user@R1# set family iso address 49.0001.1720.1600.1030.00
-
在所有接口上配置级别 2 的 IS-IS 接口和度量值,并在受保护的接口上启用链路保护。
[edit protocols isis] user@R1# set interface all level 2 metric 10 user@R1# set interface lo0.12 passive user@R1# set interface fxp0.0 disable user@R1# set interface ge-1/0/0.1 user@R1# set interface ge-1/5/0.12 link-protection
-
启用 IS-IS 节点链路保护,这也会自动将备份覆盖范围扩展到所有 LDP 标签交换路径。
[edit protocols isis] user@R1# set spf-options delay 1000 user@R1# set interface all node-link-protection
-
启用远程 LFA 备份,使用动态 LDP 标签交换路径计算备份下一跃点。
(选答)包含 node link degradation 语句时,即使未为给定目标配置节点保护 LFA,设备也会使用配置的链路保护 LFA 作为主链路的备份。
[edit protocols isis] user@R1# set backup-spf-options remote-backup-calculation user@R1# set backup-spf-options node-link-degradation
-
将 MPLS 配置为对设备上的所有接口使用 LDP 标签交换路径。
[edit protocols] user@R1# set mpls interface all user@R1# set mpls interface fxp0.0 disable user@R1# set ldp interface all user@R1# set ldp interface fxp0.0 disable
-
指定在远程 LFA 关闭时保持目标 LDP 会话运行的时间间隔,并指定自动定向 LDP 会话数的最大数量,以优化内存的使用。
[edit protocols ldp] user@R1# set auto-targeted-session user@R1# set auto-targeted-session teardown-delay 60 user@R1# set auto-targeted-session maximum-sessions 20
-
(选答)启用转发同等类 (FEC) 解聚,从而实现更快的全局融合。
[edit protocols ldp] user@R1# set deaggregate
-
要启用数据包转发引擎本地修复,请建立一个策略,强制路由协议进程为给定路由安装所有下一跃点。
此策略可确保将备份路由安装在数据包转发引擎用来将流量转发到给定目标的转发表中。
[edit policy-options] user@R1# set policy-options policy-statement ecmp term 1 user@R1# set then load-balance per-packet
-
使用导出语句将策略应用到本地路由器的转发表。
[edit routing-options forwarding-table] user@R1# set export ecmp
结果
在配置模式下,输入 show interfaces、 show protocols、 show policy-options和 show routing-options 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@R1# show interfaces
ge-1/0/0 {
unit 1 {
description R1->R2;
family inet {
address 10.1.1.1/24;
}
family iso;
family mpls;
}
}
ge-1/5/0 {
unit 12 {
description R1->R6;
family inet {
address 10.1.6.12/24;
}
family iso;
family mpls;
}
}
lo0 {
unit 10 {
family inet {
address 10.255.102.128/32;
}
family iso {
address 49.0001.1720.1600.1030.00;
}
}
}
user@R1# show protocols
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
isis {
spf-options delay 1000;
backup-spf-options {
remote-backup-calculation;
node-link-degradation;
}
interface ge-1/0/0.1;
interface ge-1/5/0.12; {
link-protection;
}
interface all {
node-link-protection;
level 2 metric 10;
}
interface fxp0.0 {
disable;
}
interface lo0.12 {
passive;
}
}
ldp {
auto-targeted-session {
teardown-delay 60;
maximum-sessions 20;
}
deaggregate;
interface all;
interface fxp0.0 {
disable;
}
}
user@R1# show policy-options
policy-options {
policy-statement ecmp {
term 1 {
then {
load-balance per-packet;
}
}
}
}
user@R1# show routing-options
forwarding-table {
export ecmp;
}
如果完成设备配置,请从配置模式进入 commit 。
验证
确认配置工作正常。
验证路由
目的
验证是否已学习预期路由。
行动
在设备 R1 上,在作模式下,运行命令 show route 以显示路由表中的路由。
user@R1> show route 10.1.4/24
inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.4.0/24 *[IS-IS/15] 11:37:58, metric 30
> to 10.1.6.11 via ge-1/5/0
to 10.1.1.2 via ge-1/0/0, Push 299824
user@R1> show route 10.1.4/24 detail
inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
10.1.4.0/24 (1 entry, 1 announced)
State: <FlashAll>
*IS-IS Preference: 15
Level: 1
Next hop type: Router, Next hop index: 262154
Address: 0x98047cc
Next-hop reference count: 8
Next hop: 10.1.6.11 via ge-1/5/0 weight 0x1, selected
Session Id: 0x14b
Next hop: 10.1.1.2 via ge-1/0/0 weight 0x101 uflags Remote neighbor path
Label operation: Push 299824
Label TTL action: prop-ttl
Load balance label: Label 299824: None;
Session Id: 0x142
State:<Active Int>
Age: 11:38:00
Metric: 30
Validation State: unverified
Task: IS-IS
Announcement bits (3): 0-LDP 1-IS-IS 3-KRT
AS path: I
意义
输出显示设备 R1 路由表中的所有路由。
验证 IS-IS 路由
目的
显示设备 R1 的 IS-IS 路由表中的所有 LDP 备份路由。
行动
在设备 R1 上,在作模式下,运行 show isis route 命令以显示 IS-IS 路由表中的路由。
user@R1> show isis route
IS-IS routing table Current version: L1: 558 L2: 564
IPv4/IPv6 Routes
----------------
Prefix L Version Metric Type Interface NH Via Backup Score
10.1.2.0/24 1 558 20 int lt-1/2/0.1 IPV4 tp3-R2
10.1.3.0/24 1 558 30 int lt-1/2/0.1 IPV4 tp3-R2
10.1.4.0/24 1 558 30 int lt-1/2/0.12 IPV4 tp3-R6
lt-1/2/0.1 LSP LDP->tp3-R4(10.255.102.156)
10.1.5.0/24 1 558 20 int lt-1/2/0.12 IPV4 tp3-R6
lt-1/2/0.1 LSP LDP->tp3-R4(10.255.102.156)
10.255.102.136/32 1 558 10 int lt-1/2/0.12 IPV4 tp3-R6
lt-1/2/0.1 LSP LDP->tp3-R4(10.255.102.156)
10.255.102.146/32 1 558 20 int lt-1/2/0.1 IPV4 tp3-R2
10.255.102.156/32 1 558 30 int lt-1/2/0.1 IPV4 tp3-R2
lt-1/2/0.12 IPV4 tp3-R6
10.255.102.166/32 1 558 20 int lt-1/2/0.12 IPV4 tp3-R6
lt-1/2/0.1 LSP LDP->tp3-R4(10.255.102.156)
10.255.102.178/32 1 558 10 int lt-1/2/0.1 IPV4 tp3-R2
意义
输出显示设备 R1 的 IS-IS 路由表中的所有 LDP 备份路由。
验证 LDP 路由
目的
验证自动定位的 LDP 路由。
行动
在作模式下,输入命令 show ldp session auto-targeted detail 。
user@R1> show ldp session auto-targeted detail
Address: 10.255.102.156, State: Operational, Connection: Open, Hold time: 21
Session ID: 10.255.102.128:0--10.255.102.156:0
Next keepalive in 1 seconds
Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
Neighbor types: auto-targeted
Keepalive interval: 10, Connect retry interval: 1
Local address: 10.255.102.128, Remote address: 10.255.102.156
Up for 11:38:23
Capabilities advertised: none
Capabilities received: none
Protection: disabled
Session flags: none
Local - Restart: disabled, Helper mode: enabled
Remote - Restart: disabled, Helper mode: enabled
Local maximum neighbor reconnect time: 120000 msec
Local maximum neighbor recovery time: 240000 msec
Local Label Advertisement mode: Downstream unsolicited
Remote Label Advertisement mode: Downstream unsolicited
Negotiated Label Advertisement mode: Downstream unsolicited
MTU discovery: disabled
Nonstop routing state: Not in sync
Next-hop addresses received:
10.1.3.6
10.1.4.7
10.255.102.156
意义
输出显示自动定位的 LDP 下一跃点。
验证指定的备份路径节点
目的
显示为给定目标确定的远程 LFA 下一跃点。
行动
在作模式下,输入命令 show isis backup spf results 。
user@R1> show isis backup spf results R6
IS-IS level 1 SPF results:
R6.00
Primary next-hop: ge-1/5/0, IPV4, R6, SNPA: 0:5:85:88:f0:bc
Root: R6, Root Metric: 10, Metric: 0, Root Preference: 0x0
Not eligible, IPV4, Reason: Primary next-hop link fate sharing
Root: R2, Root Metric: 10, Metric: 20, Root Preference: 0x0
track-item: R6.00-00
track-item: R1.00-00
Not eligible, IPV4, Reason: Path loops
Root: R4, Root Metric: 30, Metric: 20, Root Preference: 0x0
track-item: R6.00-00
track-item: R4.00-00
Eligible, Backup next-hop: ge-1/0/0, LSP, LDP->R4(10.255.102.156), Prefixes: 2
1 nodes
IS-IS level 2 SPF results:
R6.00
Primary next-hop: ge-1/5/0, IPV4, R6, SNPA: 0:5:85:88:f0:bc
Root: R6, Root Metric: 10, Metric: 0, Root Preference: 0x0
Not eligible, IPV4, Reason: Primary next-hop link fate sharing
Root: R2, Root Metric: 10, Metric: 20, Root Preference: 0x0
track-item: R6.00-00
track-item: R1.00-00
Not eligible, IPV4, Reason: Path loops
Root: R4, Root Metric: 30, Metric: 20, Root Preference: 0x0
track-item: R6.00-00
track-item: R4.00-00
Eligible, Backup next-hop: ge-1/0/0, LSP, LDP->R4(10.255.102.156), Prefixes: 0
1 nodes
意义
输出将指示是否将特定接口或节点指定为远程备份路径及原因。
