示例:配置 MPLS LSP 链路保护

在图 1 中,建立了从路由器 1 到路由器 3 再到目标路由器 2 的主 MPLS LSP。要实施链路保护,请将语句link-protection
包含在入口点的主 LSP 和要保护的相应下游 RSVP 接口上。在这种情况下,路由器 1 上指定的Protected_LSP
主 LSP 需要链路保护,路由器 1 的 RSVP 接口和so-6/0/0
路由器 3 的 RSVP 接口也需要so-7/3/2
链路保护。为受保护的 LSP 启用链路保护后,将自动为路由器 1 和 3 的 LSP 遍历接口建立旁路 LSP。
在路由器 1 上,在和so-7/3/2
接口上so-0/0/0
配置内部网关协议 (IGP) 路由协议(在本例中为 IS-IS)、RSVP 和 MPLS。接下来,将路由器 1 上的主 LSP 配置为指向路由器 2 的环路地址。主 LSP 的严格路径必须通过路由器 3。
在 LSP 本身和主 LSP 遍历的传出 RSVP 接口(在本例 so-7/3/2
中为路由器 1 的 RSVP 接口)上启用链路保护。启用链路保护后,路由器会注意到主 LSP 受到保护,并准备旁路 LSP。
在路由器 1 上的 LSP 中配置静态10.31.5.1
路由。您可以将此路由用于测试目的。此外,如果要启用数据包转发引擎本地修复,请建立一个策略,要求所有流量使用每个数据包的负载平衡。配置此策略后,使用 [edit routing-options forwarding-table]
层次结构级别的语句将其export
导出到相邻路由器。
路由器 1
[edit] interfaces { so-0/0/0 { unit 0 { family inet { address 10.31.3.1/30; } family iso; family mpls; } } so-7/3/2 { unit 0 { family inet { address 10.31.1.1/30; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 10.245.71.51/32; } family iso { } } } protocols { rsvp { interface so-7/3/2.0 { link-protection; # Enable link protection on the interface carrying the main LSP. } interface so-0/0/0.0 { } mpls { label-switched-path Protected_LSP { to 10.245.71.52; install 10.31.5.1/32 active; # This route is used for testing the LSPs. link-protection; # Enable link protection on the protected LSP. primary path1; } path path1 { 10.31.1.2 strict; } interface so-0/0/0.0; interface so-7/3/2.0; } isis { level 2 wide-metrics-only; interface so-0/0/0.0 { level 1 disable; level 2 { metric 100; te-metric 100; } } interface so-7/3/2.0 { level 1 disable; level 2 { metric 10; te-metric 10; } } interface lo0.0 { passive; } } } routing-options { forwarding-table { # Apply this policy to the forwarding table only export pplb; # if Packet Forwarding Engine local repair is needed. } } policy-options { policy-statement pplb { then {# Configure this policy only if load-balance per-packet; # Packet Forwarding Engine local repair is needed. } } } } }
在路由器 2 上,不需要链路保护配置。但是,您应将 MPLS、RSVP 和 IS-IS 配置为与其他路由器通信。
路由器 2
[edit] interfaces { so-0/0/0 { unit 0 { family inet { address 10.31.3.2/30; } family iso; family mpls; } } so-7/1/0 { unit 0 { family inet { address 10.31.2.1/30; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 10.245.71.53/32; } family iso { } } } protocols { rsvp { interface so-0/0/0.0; interface so-7/1/0.0; } mpls { interface so-0/0/0.0; interface so-7/1/0.0; } isis { level 2 wide-metrics-only; interface so-0/0/0.0 { level 1 disable; level 2 { metric 100; te-metric 100; } } interface so-7/1/0.0 { level 1 disable; level 2 { metric 10; te-metric 10; } } interface lo0.0 { passive; } } } }
在路由器 3 上,在和so-6/0/0
接口上so-1/0/0
包括 IS-IS、RSVP 和 MPLS。在主 LSP 遍历的其余 RSVP 接口(在本例so-6/0/0
中为 RSVP 接口)上启用链路保护。启用链路保护后,路由器会注意到主 LSP 受到保护,并准备旁路 LSP。
要启用数据包转发引擎本地修复,请建立一个策略,要求流量使用每个数据包的负载平衡。配置此策略后,将其导出到相邻路由器。
路由器 3
[edit] interfaces { so-1/0/0 { unit 0 { family inet { address 10.31.1.2/30; } family iso; family mpls; } } so-6/0/0 { unit 0 { family inet { address 10.31.2.2/30; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 10.245.271.53/32; } family iso { } } } protocols { rsvp { interface so-1/0/0.0; interface so-6/0/0.0 { # Primary interface going to Router 2. link-protection; } } mpls { interface so-1/0/0.0; interface so-6/0/0.0; } isis { level 2 wide-metrics-only; interface so-1/0/0.0 { level 1 disable; level 2 { metric 10; te-metric 10; } } interface so-6/0/0.0 { level 1 disable; level 2 { metric 10; te-metric 10; } } interface lo0.0 { passive; } } } policy-options { policy-statement pplb { then { load-balance per-packet; # If Packet Forwarding Engine local repair is needed. } } } routing-options { forwarding-table { export pplb; # If Packet Forwarding Engine local repair is needed. } } }
验证您的工作
要验证 MPLS LSP 链路保护的正常运行,请使用以下命令:
show mpls lsp
show route
show route forwarding-table
show rsvp interface detail
show rsvp neighbor detail
show rsvp session detail
以下部分显示了与配置示例一起使用的这些命令的输出:
案例1:正常运行
在所需的 RSVP 接口和主 LSP 上启用链路保护后,即可准备好旁路 LSP。
路由器 1
user@Router1> show mpls lsp Ingress LSP: 1 sessions To From State Rt ActivePath P LSPname 10.245.71.52 10.245.71.51 Up 1 path1 * Protected_LSP
这是主要的 LSP。
Total 1 displayed, Up 1, Down 0 Egress LSP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit LSP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.245.71.52 10.245.271.53 Up 1 1 SE 100003 0 Bypass->10.31.2.1
这是从路由器 3 到路由器 2 的旁路 LSP。
Total 1 displayed, Up 1, Down 0 user@Router1> show rsvp session detail Ingress RSVP: 2 sessions 10.245.71.52 From: 10.245.71.51, LSPstate: Up, ActiveRoute: 1 LSPname: Protected_LSP
这是主 LSP。 请注意,当主 LSP 仍处于运行状态时,不会发出备用 LSP 的信号。
Resv style: 1 SE, Label in: -, Label out: 100007 Time left: -, Since: Thu Aug 8 12:13:24 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 2 receiver 33 protocol 0 Link protection desired Type: Link protected LSP PATH rcvfrom: localclient PATH sentto: 10.31.1.2 (so-7/3/2.0) 36 pkts RESV rcvfrom: 10.31.1.2 (so-7/3/2.0) 38 pkts Explct route: 10.31.1.2 10.31.2.1 Record route: <self> 10.31.1.2 10.31.2.1 10.245.271.53 From: 10.245.71.51, LSPstate: Up, ActiveRoute: 0 LSPname: Bypass->10.31.1.2
这是从路由器 1 到路由器 2 的旁路。这也出现在上面的命令输出中 show mpls lsp
。
Resv style: 1 SE, Label in: -, Label out: 100000 Time left: -, Since: Thu Aug 8 12:14:31 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 51 protocol 0 Type: Bypass LSP PATH rcvfrom: localclient PATH sentto: 10.31.3.2 (so-0/0/0.0) 32 pkts RESV rcvfrom: 10.31.3.2 (so-0/0/0.0) 32 pkts Explct route: 10.31.3.2 10.31.2.2 Record route: <self> 10.31.3.2 10.31.2.2 Total 2 displayed, Up 2, Down 0 Egress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit RSVP: 1 sessions 10.245.71.52 From: 10.245.271.53, LSPstate: Up, ActiveRoute: 1 LSPname: Bypass->10.31.2.1 Resv style: 1 SE, Label in: 100003, Label out: 0 Time left: 52, Since: Thu Aug 8 12:03:27 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 19 protocol 0 PATH rcvfrom: 10.31.1.2 (so-7/3/2.0) 76 pkts PATH sentto: 10.31.3.2 (so-0/0/0.0) 77 pkts RESV rcvfrom: 10.31.3.2 (so-0/0/0.0) 78 pkts Explct route: 10.31.3.2 Record route: 10.31.1.2 <self> 10.31.3.2 Total 1 displayed, Up 1, Down 0 user@Router1> show rsvp interface detail RSVP interface: 2 active fxp0.0 Index 1, State Dis/Up NoAuthentication, NoAggregate, NoReliable, NoLinkProtection HelloInterval 9(second) Address 192.168.71.52 PacketType Total Last 5 seconds Sent Received Sent Received Path 0 0 0 0 PathErr 0 0 0 0 PathTear 0 0 0 0 Resv 0 0 0 0 ResvErr 0 0 0 0 ResvTear 0 0 0 0 Hello 0 0 0 0 Ack 0 0 0 0 Srefresh 0 0 0 0 EndtoEnd RSVP 0 0 0 0 so-0/0/0.0 Index 8, State Ena/Up NoAuthentication, NoAggregate, NoReliable, NoLinkProtection HelloInterval 20(second) Address 10.31.3.1, 10.245.71.51 ActiveResv 2, PreemptionCnt 0, Update threshold 10% Subscription 100%, StaticBW 622.08Mbps, AvailableBW 622.08Mbps PacketType Total Last 5 seconds Sent Received Sent Received Path 441 0 0 0 PathErr 0 0 0 0 PathTear 3 0 0 0 Resv 0 431 0 0 ResvErr 0 0 0 0 ResvTear 0 0 0 0 Hello 489 487 0 0 Ack 0 0 0 0 Srefresh 0 0 0 0 EndtoEnd RSVP 0 0 0 0 so-7/3/2.0 Index 11, State Ena/Up NoAuthentication, NoAggregate, NoReliable, LinkProtection
链路保护已启用。
HelloInterval 3(second) Address 10.31.1.1, 10.245.71.51 ActiveResv 1, PreemptionCnt 0, Update threshold 10% Subscription 100%, StaticBW 2.48832Gbps, AvailableBW 2.48832Gbps PacketType Total Last 5 seconds Sent Received Sent Received Path 225 138 0 0 PathErr 12 4 0 0 PathTear 5 3 0 0 Resv 134 216 0 1 ResvErr 0 0 0 0 ResvTear 3 1 0 0 Hello 750 799 1 1 Ack 0 0 0 0 Srefresh 0 0 0 0 EndtoEnd RSVP 0 0 0 0 user@Router1> show rsvp neighbor detail RSVP neighbor: 2 learned Address: 10.31.1.2 via: so-7/3/2.0 status: Up Last changed time: 38:17, Idle: 5 sec, Up cnt: 1, Down cnt: 0 Message received: 329 Hello: sent 747, received: 747, interval: 3 sec Remote instance: 0x41b21a47, Local instance: 0x238fa919 Refresh reduction: not operational Link protection: enabled # This should be enabled LSP name: Bypass->10.31.1.2 Bypass LSP: operational, Backup routes: 2 , Backup LSPs: 0
备份路由数等于 2,因为已考虑保护主 LSP。
Bypass explicit route: 10.31.3.2 10.31.2.2 Address: 10.31.3.2 via: so-0/0/0.0 status: Up Last changed time: 17:46, Idle: 5 sec, Up cnt: 4, Down cnt: 3 Message received: 430 Hello: sent 506, received: 486, interval: 20 sec Remote instance: 0x194fa7af, Local instance: 0x507b7c2a Refresh reduction: not operational Link protection: disabled Bypass LSP: does not exist, Backup routes: 0, Backup LSPs: 0 user@Router1>show route 10.31.5.1 extensive inet.0: 24 destinations, 24 routes (22 active, 0 holddown, 2 hidden) 10.31.5.1/32 (1 entry, 1 announced) State: <FlashAll> TSI: KRT in-kernel 10.31.5.1/32 -> {0.0.0.0, 0.0.0.0} *RSVP Preference: 7 Next hop: via so-7/3/2.0 weight 1, selected
这是主要的 LSP。
Label-switched-path Protected_LSP Label operation: Push 100007 Next hop: via so-0/0/0.0 weight 20001
这是备份路由,但尚未发出备份 LSP 信号。
Label-switched-path Bypass->10.31.1.2 Label operation: Push 100007, Push 100000(top)[0] State: <Active Int> Local AS: 69 Age: 8:34 Metric: 20 Task: RSVP Announcement bits (1): 0-KRT AS path: I user@Router1> show route forwarding-table destination 10.31.5.1 extensive Routing table: inet [Index 0] Internet: Destination: 10.31.5.1/32 Route type: user Route reference: 0 Flags: sent to PFE Next-hop type: unilist Index: 39 Reference: 1 Next-hop type: Push 100007 Next-hop interface: so-7/3/2.0 Weight: 1
已启用数据包转发引擎本地修复(否则,仅显示 Next-hop
一个条目)。
Next-hop type: Push 100007, Push 100000(top)[0] Next-hop interface: so-0/0/0.0 Weight: 20001
备份的权重值从 20000 开始。
路由器 3
user@Router3> show mpls lsp Ingress LSP: 0 sessions
此处未显示到路由器 2 的入口旁路 LSP。
Total 0 displayed, Up 0, Down 0 Egress LSP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.245.271.53 10.245.71.51 Up 0 1 SE 3 - Bypass->10.31.1.2 Total 1 displayed, Up 1, Down 0 Transit LSP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.245.71.52 10.245.71.51 Up 1 1 SE 100000 0 Protected_LSP Total 1 displayed, Up 1, Down 0 user@Router3> show rsvp session detail Ingress RSVP: 1 sessions 10.245.71.52 From: 10.245.271.53, LSPstate: Up, ActiveRoute: 0 LSPname: Bypass->10.31.2.1
这是从路由器 1 到路由器 2 的入口绕过会话。
Suggested label received: -, Suggested label sent: - Recovery label received: -, Recovery label sent: 100004 Resv style: 1 SE, Label in: -, Label out: 100004 Time left: -, Since: Thu Aug 8 12:27:07 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 16 protocol 0 Type: Bypass LSP PATH rcvfrom: localclient PATH sentto: 10.31.1.1 (so-1/0/0.0) 3 pkts RESV rcvfrom: 10.31.1.1 (so-1/0/0.0) 3 pkts Explct route: 10.31.1.1 10.31.3.2 Record route: <self> 10.31.1.1 10.31.3.2 Total 1 displayed, Up 1, Down 0 Egress RSVP: 1 sessions 10.245.271.53 From: 10.245.71.51, LSPstate: Up, ActiveRoute: 0 LSPname: Bypass->10.31.1.2
这是从路由器 1 到路由器 3 的旁路,通过路由器 2 到达。
Suggested label received: -, Suggested label sent: - Recovery label received: -, Recovery label sent: - Resv style: 1 SE, Label in: 3, Label out: - Time left: 54, Since: Thu Aug 8 12:26:48 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 52 protocol 0 PATH rcvfrom: 10.31.2.1 (so-6/0/0.0) 5 pkts PATH sentto: localclient RESV rcvfrom: localclient Record route: 10.31.3.1 10.31.2.1 <self> Total 1 displayed, Up 1, Down 0 Transit RSVP: 1 sessions 10.245.71.52 From: 10.245.71.51, LSPstate: Up, ActiveRoute: 1 LSPname: Protected_LSP
这是主要的 LSP。
Suggested label received: -, Suggested label sent: - Recovery label received: -, Recovery label sent: 0 Resv style: 1 SE, Label in: 100000, Label out: 0 Time left: 41, Since: Thu Aug 8 12:26:39 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 2 receiver 33 protocol 0 Link protection desired Type: Link protected LSP PATH rcvfrom: 10.31.1.1 (so-1/0/0.0) 9 pkts PATH sentto: 10.31.2.1 (so-6/0/0.0) 11 pkts RESV rcvfrom: 10.31.2.1 (so-6/0/0.0) 10 pkts Explct route: 10.31.2.1 Record route: 10.31.1.1 <self> 10.31.2.1 Total 1 displayed, Up 1, Down 0 user@Router3> show rsvp neighbor detail RSVP neighbor: 2 learned Address: 10.31.2.1 via: so-6/0/0.0 status: Up Last changed time: 27, Idle: 0 sec, Up cnt: 1, Down cnt: 0 Message received: 19 Hello: sent 6, received: 6, interval: 9 sec Remote instance: 0x625d2852, Local instance: 0x327317df Refresh reduction: not operational Link protection: enabled LSP name: Bypass->10.31.2.1 Bypass LSP: operational, Backup routes: 1 , Backup LSPs: 0
备份路由数为 1。
Bypass explicit route: 10.31.1.1 10.31.3.2 Address: 10.31.1.1 via: so-1/0/0.0 status: Up Last changed time: 41, Idle: 0 sec, Up cnt: 1, Down cnt: 0 Message received: 15 Hello: sent 17, received: 17, interval: 3 sec Remote instance: 0x2ebdcf43, Local instance: 0x643d9e23 Refresh reduction: not operational Link protection: disabled Bypass LSP: does not exist, Backup routes: 0, Backup LSPs: 0 user@Router3> show rsvp interface detail RSVP interface: 2 active fxp0.0 Index 1, State Dis/Up NoAuthentication, NoAggregate, NoReliable, NoLinkProtection HelloInterval 9(second) Address 192.168.6.64 PacketType Total Last 5 seconds Sent Received Sent Received Path 0 0 0 0 PathErr 0 0 0 0 PathTear 0 0 0 0 Resv 0 0 0 0 ResvErr 0 0 0 0 ResvTear 0 0 0 0 Hello 0 0 0 0 Ack 0 0 0 0 Srefresh 0 0 0 0 EndtoEnd RSVP 0 0 0 0 so-1/0/0.0 Index 6, State Ena/Up NoAuthentication, NoAggregate, NoReliable, NoLinkProtection HelloInterval 3(second) Address 10.31.1.2, 10.245.271.53 ActiveResv 1, PreemptionCnt 0, Update threshold 10% Subscription 100%, StaticBW 2.48832Gbps, AvailableBW 2.48832Gbps PacketType Total Last 5 seconds Sent Received Sent Received Path 5 14 0 1 PathErr 0 0 0 0 PathTear 0 0 0 0 Resv 8 9 0 0 ResvErr 0 0 0 0 ResvTear 0 0 0 0 Hello 23 25 2 2 Ack 0 0 0 0 Srefresh 0 0 0 0 EndtoEnd RSVP 0 0 0 0 so-6/0/0.0 Index 9, State Ena/Up NoAuthentication, NoAggregate, NoReliable, LinkProtection
链路保护已启用。
HelloInterval 9(second) Address 10.31.2.2, 10.245.271.53 ActiveResv 1, PreemptionCnt 0, Update threshold 10% Subscription 100%, StaticBW 9.95328Gbps, AvailableBW 9.95328Gbps PacketType Total Last 5 seconds Sent Received Sent Received Path 12 8 0 0 PathErr 0 0 0 0 PathTear 0 1 0 0 Resv 9 14 0 1 ResvErr 0 0 0 0 ResvTear 0 0 0 0 Hello 8 8 1 1 Ack 0 0 0 0 Srefresh 0 0 0 0 EndtoEnd RSVP 0 0 0 0 user@Router3> show route forwarding-table family mpls Routing table: ccc MPLS: Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 1 1 0 user 0 recv 3 3 1 user 0 recv 3 3 2 user 0 recv 3 3 100000 user 0 ulst 77 1
这是主要的 LSP。
Swap 0 so-6/0/0.0 Swap 100004[0] so-1/0/0.0 100000(S=0) user 0 ulst 78 1 Pop so-6/0/0.0 Swap 100004[0] so-1/0/0.0 100007 user 0 ulst 71 1
这是从路由器 1 到路由器 2 的旁路 LSP。
Swap 0 so-6/0/0.0 Swap 100003[0] so-1/0/0.0 100007(S=0) user 0 ulst 73 1 Pop so-6/0/0.0 Swap 100003[0] so-1/0/0.0
情况 2:禁用从路由器 1 到路由器 3 的链接时
[edit] user@Router1# set interfaces so-7/3/2 disable [edit] user@Router1# commit commit complete
路由器 1 到路由器 3 的主 接口已禁用。
路由器 1
user@Router1> show mpls lsp Ingress LSP: 1 sessions To From State Rt ActivePath P LSPname 10.245.71.52 10.245.71.51 Up 0 path1 * Protected_LSP
主 LSP 已启动。
Total 1 displayed, Up 1, Down 0 Egress LSP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit LSP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.245.71.52 10.245.271.53 Up 0 1 SE 100004 0 Bypass->10.31.2.1
这是从路由器 3 到路由器 2 的旁路 LSP。
Total 1 displayed, Up 1, Down 0 user@Router1> show rsvp session detail Ingress RSVP: 3 sessions 10.245.71.52 From: 10.31.3.1, LSPstate: Up, ActiveRoute: 0 LSPname: Protected_LSP
这是新发出的备份 LSP,如“收件人/发件人”字段所示。
Resv style: 1 SE, Label in: -, Label out: 100000 Time left: -, Since: Thu Aug 8 12:29:16 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 2 receiver 33 protocol 0 Link protection desired Type: Backup LSP at Point-of-Local-Repair PATH rcvfrom: localclient PATH sentto: 10.31.1.2 (so-0/0/0.0) 4 pkts RESV rcvfrom: 10.31.2.2 (so-0/0/0.0) 3 pkts Explct route: 10.31.2.2 10.31.2.1 Record route: <self> 10.31.2.2 10.31.2.1 10.245.71.52 From: 10.245.71.51, LSPstate: Dn, ActiveRoute: 0
原来的 LSP 现已关闭。
LSPname: Protected_LSP Resv style: 0 -, Label in: -, Label out: - Time left: -, Since: Thu Aug 8 12:13:24 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 2 receiver 33 protocol 0 Link protection desired Type: Link protected LSP PATH rcvfrom: localclient PATH sentto: [no route] Explct route: 10.31.1.2 10.31.2.1 Record route: <self> ...incomplete 10.245.271.53 From: 10.245.71.51, LSPstate: Up, ActiveRoute: 1 LSPname: Bypass->10.31.1.2
这是从路由器 1 到路由器 2 的旁路 LSP。
Resv style: 1 SE, Label in: -, Label out: 100001 Time left: -, Since: Thu Aug 8 12:26:48 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 52 protocol 0 Type: Bypass LSP PATH rcvfrom: localclient PATH sentto: 10.31.3.2 (so-0/0/0.0) 13 pkts RESV rcvfrom: 10.31.3.2 (so-0/0/0.0) 13 pkts Explct route: 10.31.3.2 10.31.2.2 Record route: <self> 10.31.3.2 10.31.2.2 Total 3 displayed, Up 2, Down 1 Egress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit RSVP: 1 sessions 10.245.71.52 From: 10.245.271.53, LSPstate: Up, ActiveRoute: 0 LSPname: Bypass->10.31.2.1
这是从路由器 3 到路由器 2 的旁路 LSP,在下一种情况下将失败。
Resv style: 1 SE, Label in: 100004, Label out: 0 Time left: 38, Since: Thu Aug 8 12:27:07 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 16 protocol 0 PATH rcvfrom: 10.31.1.2 (so-7/3/2.0) 11 pkts PATH sentto: 10.31.3.2 (so-0/0/0.0) 12 pkts RESV rcvfrom: 10.31.3.2 (so-0/0/0.0) 12 pkts Explct route: 10.31.3.2 Record route: 10.31.1.2 <self> 10.31.3.2 Total 1 displayed, Up 1, Down 0 user@Router1> show rsvp neighbor detail RSVP neighbor: 2 learned Address: 10.31.1.2 via: so-7/3/2.0 status: Down
邻居宕机了。
Last changed time: 25, Idle: 25 sec, Up cnt: 2, Down cnt: 2 Message received: 397 Hello: sent 900, received: 890, interval: 3 sec Remote instance: 0x0, Local instance: 0x41b41b17 Refresh reduction: not operational Link protection: enabled LSP name: Bypass->10.31.1.2 Bypass LSP: operational, Backup routes: 2, Backup LSPs: 1 Bypass explicit route: 10.31.3.2 10.31.2.2 Address: 10.31.3.2 via: so-0/0/0.0 status: Up Last changed time: 25:40, Idle: 5 sec, Up cnt: 4, Down cnt: 3 Message received: 502 Hello: sent 558, received: 538, interval: 20 sec Remote instance: 0x194fa7af, Local instance: 0x507b7c2a Refresh reduction: not operational Link protection: disabled Bypass LSP: does not exist, Backup routes: 0, Backup LSPs: 0 user@Router1> show route 10.31.5.1 inet.0: 23 destinations, 23 routes (22 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 10.31.5.1/32 *[RSVP/7] 00:03:04, metric 20 > via so-0/0/0.0, label-switched-path Bypass->10.31.1.2
可以通过备份 LSP 到达路由。
user@Router1> show route forwarding-table destination 10.31.5.1 Routing table: inet Internet: Destination Type RtRef Next hop Type Index NhRef Netif 10.31.5.1/32 user 0 Push 100000, Push 100001(top)[0] so-0/0/0.0
从路由器 1 到路由器 2 再到路由器 3 的备份 LSP 上显示双堆叠标签。
在继续执行案例 3 之前,请重新启用 so-7/3/2
路由器 1 上的接口。
[edit] user@Router1# delete interfaces so-7/3/2 disable [edit] user@Router1# commit commit complete
情况 3:当从路由器 3 到路由器 2 的链接被禁用时
[edit] user@Router3# set interfaces so-6/0/0 disable [edit] user@Router3# commit commit complete
路由器 3 到路由器 2 的主 接口已禁用。
路由器 3
user@Router3> show rsvp session Ingress RSVP: 2 sessions To From State Rt Style Labelin Labelout LSPname 10.245.71.52 10.245.271.53 Up 1 1 SE - 100005 Bypass->10.31.2.1 10.245.71.52 10.31.1.2 Up 0 1 SE - 0 Protected_LSP
备份从路由器 3 发出到路由器 2 的信号。
Total 2 displayed, Up 2, Down 0 Egress RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.245.271.53 10.245.71.51 Up 0 1 SE 3 - Bypass->10.31.1.2 Total 1 displayed, Up 1, Down 0 Transit RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.245.71.52 10.245.71.51 Dn 0 0 - 100000 - Protected_LSP
主 LSP 已关闭。
Total 1 displayed, Up 0, Down 1 user@Router3> show rsvp session detail Ingress RSVP: 2 sessions 10.245.71.52 From: 10.245.271.53, LSPstate: Up, ActiveRoute: 1 LSPname: Bypass->10.31.2.1 Suggested label received: -, Suggested label sent: - Recovery label received: -, Recovery label sent: 100005 Resv style: 1 SE, Label in: -, Label out: 100005 Time left: -, Since: Thu Aug 8 12:31:09 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 17 protocol 0 Type: Bypass LSP PATH rcvfrom: localclient PATH sentto: 10.31.1.1 (so-1/0/0.0) 6 pkts RESV rcvfrom: 10.31.1.1 (so-1/0/0.0) 6 pkts Explct route: 10.31.1.1 10.31.3.2 Record route: <self> 10.31.1.1 10.31.3.2 10.245.71.52 From: 10.31.1.2, LSPstate: Up, ActiveRoute: 0 LSPname: Protected_LSP Suggested label received: -, Suggested label sent: - Recovery label received: -, Recovery label sent: 0 Resv style: 1 SE, Label in: -, Label out: 0 Time left: -, Since: Thu Aug 8 12:31:59 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 2 receiver 33 protocol 0 Link protection desired Type: Backup LSP at Point-of-Local-Repair
这是备份 LSP。
PATH rcvfrom: localclient PATH sentto: 10.31.2.1 (so-1/0/0.0) 5 pkts RESV rcvfrom: 10.31.3.2 (so-1/0/0.0) 2 pkts Explct route: 10.31.3.2 Record route: <self> 10.31.3.2 Total 2 displayed, Up 2, Down 0 Egress RSVP: 1 sessions 10.245.271.53 From: 10.245.71.51, LSPstate: Up, ActiveRoute: 0 LSPname: Bypass->10.31.1.2 Suggested label received: -, Suggested label sent: - Recovery label received: -, Recovery label sent: - Resv style: 1 SE, Label in: 3, Label out: - Time left: 31, Since: Thu Aug 8 12:26:48 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 52 protocol 0 PATH rcvfrom: 10.31.2.1 (so-6/0/0.0) 23 pkts PATH sentto: localclient RESV rcvfrom: localclient Record route: 10.31.3.1 10.31.2.1 <self> Total 1 displayed, Up 1, Down 0 Transit RSVP: 1 sessions 10.245.71.52 From: 10.245.71.51, LSPstate: Dn, ActiveRoute: 0 LSPname: Protected_LSP Suggested label received: -, Suggested label sent: - Recovery label received: -, Recovery label sent: - Resv style: 0 -, Label in: 100000, Label out: - Time left: 53, Since: Thu Aug 8 12:26:39 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 2 receiver 33 protocol 0 Link protection desired Type: Link protected LSP PATH rcvfrom: 10.31.1.1 (so-1/0/0.0) 30 pkts PATH sentto: [no route] Explct route: 10.31.2.1 Record route: 10.31.1.1 <self> ...incomplete Total 1 displayed, Up 0, Down 1 user@Router3> show route forwarding-table family mpls Routing table: ccc MPLS: Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 1 1 0 user 0 recv 3 3 1 user 0 recv 3 3 2 user 0 recv 3 3 100000 user 0 Swap 100005[0] so-1/0/0.0
这显示了通过路由器 2 通过备份 LSP 传输的主 LSP 的标签交换。
路由器 1
user@Router1> show rsvp session detail Ingress RSVP: 1 sessions 10.245.71.52 From: 10.245.71.51, LSPstate: Up, ActiveRoute: 1 LSPname: Protected_LSP
主 LSP 不受影响。
Resv style: 1 SE, Label in: -, Label out: 100000 Time left: -, Since: Thu Aug 8 12:13:24 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 2 receiver 33 protocol 0 Link protection desired PATH rcvfrom: localclient PATH sentto: 10.31.1.2 (so-7/3/2.0) 95 pkts RESV rcvfrom: 10.31.1.2 (so-7/3/2.0) 87 pkts Explct route: 10.31.1.2 10.31.2.1 Record route: <self> 10.31.1.2 10.31.3.2 Total 1 displayed, Up 1, Down 0 Egress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit RSVP: 1 sessions 10.245.71.52 From: 10.245.271.53, LSPstate: Up, ActiveRoute: 0 LSPname: Bypass->10.31.2.1
将列出旁路 LSP,因为路由器 1 未检测到从路由器 3 到路由器 2 的备份。
Resv style: 1 SE, Label in: 100005, Label out: 0 Time left: 53, Since: Thu Aug 8 12:31:09 2002 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 17 protocol 0 PATH rcvfrom: 10.31.1.2 (so-7/3/2.0) 11 pkts PATH sentto: 10.31.3.2 (so-0/0/0.0) 11 pkts RESV rcvfrom: 10.31.3.2 (so-0/0/0.0) 11 pkts Explct route: 10.31.3.2 Record route: 10.31.1.2 <self> 10.31.3.2 Total 1 displayed, Up 1, Down 0 user@Router1> show route forwarding-table family mpls Routing table: ccc MPLS: Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 dscd 8 1 0 user 0 recv 10 3 1 user 0 recv 10 3 2 user 0 recv 10 3 100005 user 0 Swap 0 so-0/0/0.0
在旁路 LSP 上交换标签。
100005(S=0) user 0 Pop so-0/0/0.0 user@Router1> show route forwarding-table destination 10.31.5.1 extensive Routing table: inet [Index 0] Internet: Destination: 10.31.5.1/32 Route type: user Route reference: 0 Flags: sent to PFE Next-hop type: Push 100000
这里只有一个条目。路由器 3 的旁路中断,因为路由器 3 和路由器 2 之间的连接被禁用。
Next-hop interface: so-7/3/2.0 user@Router1> show isis adjacency Interface System L State Hold (secs) SNPA so-0/0/0.0 Router2 2 Up 24 so-7/3/2.0 Router3 2 Up 23 user@Router1> show route 10.31.5.1 extensive inet.0: 22 destinations, 22 routes (21 active, 0 holddown, 1 hidden) 10.31.5.1/32 (1 entry, 1 announced) State: <FlashAll> TSI: KRT in-kernel 10.31.5.1/32 -> {0.0.0.0} *RSVP Preference: 7 Next hop: via so-7/3/2.0 weight 1, selected
仅显示一个条目。
Label-switched-path Protected_LSP Label operation: Push 100000 State: <Active Int> Local AS: 69 Age: 2:21 Metric: 100 Task: RSVP Announcement bits (1): 0-KRT AS path: I user@Router1> show rsvp neighbor detail RSVP neighbor: 2 learned Address: 10.31.1.2 via: so-7/3/2.0 status: Up Last changed time: 2:58, Idle: 0 sec, Up cnt: 3, Down cnt: 2 Message received: 433 Hello: sent 965, received: 950, interval: 3 sec Remote instance: 0x74be7c42, Local instance: 0x41b41b17 Refresh reduction: not operational Link protection: disabled Bypass LSP: does not exist, Backup routes: 0, Backup LSPs: 0 Address: 10.31.3.2 via: so-0/0/0.0 status: Up Last changed time: 30:54, Idle: 0 sec, Up cnt: 4, Down cnt: 3 Message received: 533 Hello: sent 593, received: 573, interval: 20 sec Remote instance: 0x194fa7af, Local instance: 0x507b7c2a Refresh reduction: not operational Link protection: disabled Bypass LSP: does not exist, Backup routes: 0, Backup LSPs: 0 user@Router1> show rsvp session Ingress RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.245.71.52 10.245.71.51 Up 1 1 SE - 100000 Protected_LSP Total 1 displayed, Up 1, Down 0 Egress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 10.245.71.52 10.245.271.53 Up 0 1 SE 100005 0 Bypass->10.31.2.1 Total 1 displayed, Up 1, Down 0