示例:在 IS-IS 网络中通过 LDP 隧道配置远程 LFA
此示例说明如何在 IS-IS 网络中为 LDP 隧道配置远程 LFA,以扩展备份保护。
要求
此示例使用以下硬件和软件组件:
-
连接的接口上支持 IS-IS 协议和 LDP 的 6 个 MX 系列路由器。
-
在所有设备上运行的 Junos OS 14.2 或更高版本。
在 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 标签交换路径计算备份下一跃点。
(可选)包括节点链路降级语句时,即使未为给定目标配置节点保护 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
意义
输出指示特定接口或节点是否已被指定为远程备份路径,以及原因。