示例:节点链路保护配置

图 1 显示了如何实现节点链路保护的示例。LSP 在路由器 0 上启动,具有通过路由器 1、路由器 2、路由器 3 和路由器 4 的严格路径。您可以在 LSP 中配置节点链路保护,并在路径中的所有 RSVP 接口上配置链路保护。
在路由器 0 上,将 LSP 配置为跨路由器 1、2、3 和 4 传输。将该 node-link-protection
语句包含在 LSP 中,并在传出 RSVP 接口 fe-0/1/1
上配置链路保护。要支持 LSP,请在所需的接口上配置 OSPF、MPLS 和 RSVP。
路由器 0
[edit] interfaces { fe-0/1/1 { unit 0 { family inet { address 10.11.1.10/30; } family mpls; } } so-0/0/2 { unit 0 { family inet { address 10.11.1.22/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.255.11.220/32; } } } } protocols { ospf { area 0.0.0.0 { interface lo0.0 { passive; } interface fe-0/1/1.0; interface so-0/0/2.0; } traffic-engineering; } mpls { statistics { file mplsStat.log size 1m; interval 30; display-id; } traffic-engineering bgp-igp-both-ribs; traceoptions { file mpls.log size 5m world-readable; flag cspf; flag cspf-link; flag cspf-node; flag state; flag error; } explicit-null; label-switched-path test_r0_r4 { from 10.255.11.220; to 10.255.11.215; node-link-protection; # Apply node-link protection to the LSP. primary pathP; } path pathP {# Define the LSP path across routers 1, 2, 3, and 4. 10.11.1.9 strict; 10.11.1.2 strict; 10.11.2.1 strict; 10.11.2.10 strict; } interface fe-0/1/1.0; interface so-0/0/2.0; } rsvp { traceoptions { file rsvp.log size 3m files 12 world-readable; flag event; flag state; flag error; flag packets detail; } interface fe-0/1/1.0 { link-protection; # Apply link protection to RSVP interfaces in the LSP path. } interface so-0/0/2.0; } }
在路由器 1 上,在传出 RSVP 接口 so-0/0/3.
上配置链路保护 在所有中转接口上配置 OSPF、MPLS 和 RSVP。
路由器 1
[edit] interfaces { fe-0/1/0 { unit 0 { family inet { address 10.11.3.1/30; } family mpls; } } fe-2/2/1 { unit 0 { family inet { address 10.11.1.9/30; } family mpls; } } so-0/0/3 { unit 0 { family inet { address 10.11.1.1/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.255.11.223/32; } } } } protocols { ospf { area 0.0.0.0 { interface lo0.0 { passive; } interface fe-0/1/0.0; interface fe-2/2/1.0; interface so-0/0/3.0; } traffic-engineering; } mpls { traffic-engineering bgp-igp-both-ribs; explicit-null; interface fe-0/1/0.0; interface fe-2/2/1.0; interface so-0/0/3.0; } rsvp { interface fe-0/1/0.0; interface fe-2/2/1.0; interface so-0/0/3.0 { link-protection; # Apply link protection on all RSVP interfaces in the LSP path. } } }
在路由器 2 上,在传出 RSVP 接口 so-0/0/0.
上配置链路保护 在所有传输接口上配置 OSPF、MPLS 和 RSVP。
路由器 2
[edit] interfaces { so-0/0/0 { unit 0 { family inet { address 10.11.2.2/30; } family mpls; } } so-0/0/2 { unit 0 { family inet { address 10.11.1.21/30; } family mpls; } } so-0/0/3 { unit 0 { family inet { address 10.11.1.2/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.255.11.218/32; } } } } protocols { ospf { area 0.0.0.0 { interface lo0.0 { passive; } interface so-0/0/0.0; interface so-0/0/2.0; interface so-0/0/3.0; } traffic-engineering; } mpls { traffic-engineering bgp-igp-both-ribs; explicit-null; interface so-0/0/0.0; interface so-0/0/2.0; interface so-0/0/3.0; } rsvp { interface so-0/0/0.0 { link-protection; # Apply link protection to RSVP interfaces in the LSP path. } interface so-0/0/2.0; interface so-0/0/3.0; } }
在路由器 3 上,在传出 RSVP 接口 fe-0/1/2.
上配置链路保护 在所有传输接口上配置 OSPF、MPLS 和 RSVP。
路由器 3
[edit] interfaces { fe-0/1/0 { unit 0 { family inet { address 10.11.3.2/30; } family mpls; } } fe-0/1/2 { unit 0 { family inet { address 10.11.2.9/30; } family mpls; } } so-0/0/0 { unit 0 { family inet { address 10.11.2.1/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.255.11.216/32; } } } } protocols { ospf { area 0.0.0.0 { interface lo0.0 { passive; } interface fe-0/1/0.0; interface fe-0/1/2.0; interface so-0/0/0.0; } traffic-engineering; } mpls { traffic-engineering bgp-igp-both-ribs; explicit-null; interface fe-0/1/0.0; interface fe-0/1/2.0; interface so-0/0/0.0; } rsvp { interface fe-0/1/0.0; interface fe-0/1/2.0 { link-protection; # Apply link protection to RSVP interfaces in the LSP path. } interface so-0/0/0.0; } }
由于路由器 4 是 LSP 的端点,因此您可以照常配置接口和协议。无需在此路由器上配置任何节点链路保护或链路保护语句。
路由器 4
[edit] interfaces { fe-0/1/2 { unit 0 { family inet { address 10.11.2.10/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.255.11.215/32; } } } } protocols { ospf { area 0.0.0.0 { interface lo0.0 { passive; } interface fe-0/1/2.0; } traffic-engineering; } mpls { traffic-engineering bgp-igp-both-ribs; explicit-null; interface fe-0/1/2.0; } rsvp { interface fe-0/1/2.0; } }
验证您的工作
要验证 MPLS LSP 节点链路保护的正常运行,请使用以下命令:
show mpls lsp extensive
show route detail
show rsvp neighbor detail
show rsvp session detail
以下部分显示了与配置示例一起使用的这些命令的输出。
user@router0> show rsvp session detail Ingress RSVP: 2 sessions 10.255.11.215 From: 10.255.11.220, LSPstate: Up, ActiveRoute: 5 LSPname: test_r0_r4, LSPpath: Primary Suggested label received: -, Suggested label sent: - Recovery label received: -, Recovery label sent: 100128 Resv style: 1 SE, Label in: -, Label out: 100128 Time left: -, Since: Thu May 8 13:36:58 2003 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 3 receiver 56517 protocol 0 Node/Link protection desired Type: Node/Link protected LSP PATH rcvfrom: localclient PATH sentto: 10.11.1.9 (fe-0/1/1.0) 20 pkts RESV rcvfrom: 10.11.1.9 (fe-0/1/1.0) 37 pkts Explct route: 10.11.1.9 10.11.1.2 10.11.2.1 10.11.2.10 Record route: <self> 10.11.1.9 10.11.1.2 10.11.2.1 10.11.2.10 10.255.11.218 From: 10.255.11.220, LSPstate: Up, ActiveRoute: 0 LSPname: Bypass->10.11.1.9->10.11.1.2 # 2 next hops indicate node-link protection. 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 May 8 13:36:58 2003 Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500 Port number: sender 1 receiver 56521 protocol 0 Type: Bypass LSP Number of data route tunnel through: 4 Number of RSVP session tunnel through: 0 PATH rcvfrom: localclient PATH sentto: 10.11.1.21 (so-0/0/2.0) 1 pkts RESV rcvfrom: 10.11.1.21 (so-0/0/2.0) 1 pkts Explct route: 10.11.1.21 Record route: <self> 10.11.1.21 Total 2 displayed, Up 2, Down 0 Egress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit RSVP: 0 sessions Total 0 displayed, Up 0, Down 0
该 show mpls lsp extensive
命令提供了一些有关链路保护和节点链路保护的有用信息。保护标志条目指示一系列值。通过将这些值相加,您可以根据总和了解 LSP 的保护状态。标志的重要值包括:1 = 可用(链路保护),2 = 正在使用,8 = 节点保护。因此,值 9 表示节点保护可用 (1 + 8 = 9
),值 A 表示正在使用受节点保护的链路(8 + 2 = A
十六进制)。
user@router0> show mpls lsp extensive Ingress LSP: 1 sessions 10.255.11.215 From: 10.255.11.220, State: Up, ActiveRoute: 5, LSPname: test_r0_r4 ActivePath: pathP (primary) Node/Link protection desired LoadBalance: Random Encoding type: Packet, Switching type: Packet, GPID: IPv4 *Primary pathP State: Up OptimizeTimer: 30 Reoptimization in 13 second(s). Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 40) 10.11.1.9 S 10.11.1.2 S 10.11.2.1 S 10.11.2.10 S Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node): 10.11.1.9(flag=9 Label=100128) 10.11.1.2(flag=9 Label=100080) 10.11.2.1(flag=1 Label=100080) 10.11.2.10(Label=0) 67 May 8 13:46:14 CSPF: computation result ignored[18 times] 66 May 8 13:37:31 Record Route: 10.11.1.9(flag=9 Label=100128) 10.11.1.2(flag=9 Label=100080) 10.11.2.1(flag=1 Label=100080) 10.11.2.10(Label=0) 65 May 8 13:37:28 CSPF: computation result ignored 64 May 8 13:37:07 Record Route: 10.11.1.9(flag=9 Label=100128) 10.11.1.2(flag=1 Label=100080) 10.11.2.1(Label=100080) 10.11.2.10(Label=0) 63 May 8 13:37:01 Record Route: 10.11.1.9(flag=9 Label=100128) 10.11.1.2(Label=100080) 10.11.2.1(Label=100080) 10.11.2.10(Label=0) 62 May 8 13:37:01 Link-protection Up 61 May 8 13:36:58 Selected as active path 60 May 8 13:36:58 Record Route: 10.11.1.9(Label=100128) 10.11.1.2(Label=100080) 10.11.2.1(Label=100080) 10.11.2.10(Label=0) 59 May 8 13:36:58 Up 58 May 8 13:36:58 Originate Call 57 May 8 13:36:58 CSPF: computation result accepted 56 May 8 13:36:29 CSPF failed: no route toward 10.11.2.10[10 times] 55 May 8 13:32:04 Clear Call 54 May 8 13:31:40 Deselected as active 53 May 8 13:31:40 Link-protection Down 52 May 8 13:31:40 Down 51 May 8 13:31:36 CSPF failed: no route toward 10.11.2.10[6 times] 50 May 8 13:29:00 10.11.2.1: Session preempted 49 May 8 13:28:42 Record Route: 10.11.1.9(flag=9 Label=100064) 10.11.1.2(flag=9 Label=100064) 10.11.2.1(Label=100064) 10.11.2.10(Label=0) 48 May 8 13:28:40 CSPF failed: no route toward 10.11.2.10 47 May 8 13:28:35 Link-protection Up 46 May 8 13:28:35 Link-protection Down 45 May 8 13:28:30 Link-protection Up 44 May 8 13:28:30 Link-protection Down 43 May 8 13:28:10 CSPF failed: no route toward 10.11.2.10 42 May 8 13:27:44 Link-protection Up 41 May 8 13:27:44 Link-protection Down 40 May 8 13:27:42 Link-protection Up 39 May 8 13:27:42 Record Route: 10.11.1.9(flag=9 Label=100064) 10.11.1.2(flag=9 Label=100064) 10.11.2.1(flag=1 Label=100064) 10.11.2.10(Label=0) 38 May 8 13:27:41 CSPF failed: no route toward 10.11.2.10[2 times] 37 May 8 13:27:39 CSPF: link down/deleted 10.11.2.9(eagle.00/10.255.11.216)->0.0.0.0(eagle.04/0.0.0.0) 36 May 8 13:27:39 Link-protection Down 35 May 8 13:27:39 Record Route: 10.11.1.9(Label=100064) 10.11.1.2(Label=100064) 10.11.2.1(Label=100064) 10.11.2.10(Label=0) 34 May 8 13:27:39 CSPF failed: no route toward 10.11.2.10 33 May 8 13:27:39 CSPF: link down/deleted 0.0.0.0(eagle.04/0.0.0.0)->0.0.0.0(papst.00/10.255.11.215) 32 May 8 13:27:12 CSPF: computation result ignored[16 times] 31 May 8 13:19:35 Record Route: 10.11.1.9(flag=9 Label=100064) 10.11.1.2(flag=9 Label=100048) 10.11.2.1(flag=1 Label=100048) 10.11.2.10(Label=0) 30 May 8 13:19:22 Link-protection Up 29 May 8 13:19:22 Record Route: 10.11.1.9(flag=9 Label=100064) 10.11.1.2(flag=9 Label=100048) 10.11.2.1(Label=100048) 10.11.2.10(Label=0) 28 May 8 13:19:22 Up 27 May 8 13:19:22 Link-protection Down 26 May 8 13:19:22 CSPF: computation result accepted 25 May 8 13:19:16 Link-protection Up 24 May 8 13:19:16 Link-protection Down 23 May 8 13:18:54 CSPF failed: no route toward 10.11.2.1 22 May 8 13:18:54 CSPF: link down/deleted 0.0.0.0(eagle.04/0.0.0.0)->0.0.0.0(papst.00/10.255.11.215) 21 May 8 13:18:53 CSPF failed: no route toward 10.11.2.1[2 times] 20 May 8 13:18:46 CSPF: link down/deleted 10.11.2.9(eagle.00/10.255.11.216)->0.0.0.0(eagle.04/0.0.0.0) 19 May 8 13:18:35 Record Route: 10.11.1.9(flag=9 Label=100032) 10.11.1.2(flag=9 Label=100032) 10.11.2.1(Label=100016) 10.11.2.10(Label=0) 18 May 8 13:18:35 Record Route: 10.11.1.9(flag=9 Label=100032) 10.11.1.2(Label=100032) 10.11.2.1(Label=100016) 10.11.2.10(Label=0) Created: Thu May 8 13:13:28 2003 Total 1 displayed, Up 1, Down 0 Egress LSP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit LSP: 0 sessions Total 0 displayed, Up 0, Down 0 user@router0> show rsvp neighbor detail RSVP neighbor: 2 learned Address: 10.11.1.9 via: fe-0/1/1.0 status: Up Last changed time: 33:02, Idle: 5 sec, Up cnt: 1, Down cnt: 0 Message received: 130 Hello: sent 221, received: 221, interval: 9 sec Remote instance: 0x66368e80, Local instance: 0x643f57b5 Refresh reduction: incomplete Remote end: enabled, Ack-extension: disabled Address: 10.11.1.21 via: so-0/0/2.0 status: Up Last changed time: 32:41, Idle: 10 sec, Up cnt: 1, Down cnt: 0 Message received: 78 Hello: sent 218, received: 218, interval: 9 sec Remote instance: 0x74b57f2a, Local instance: 0x66341d2f Refresh reduction: operational Remote end: enabled, Ack-extension: enabled user@router0> show route 10.255.11.215 detail inet.0: 33 destinations, 34 routes (31 active, 0 holddown, 2 hidden) 10.255.11.215/32 (2 entries, 1 announced) State: <FlashAll> *RSVP Preference: 7 Next hop: 10.11.1.9 via fe-0/1/1.0 weight 1, selected Label-switched-path test_r0_r4 Label operation: Push 100128, selfID=RSVP-7 Next hop: via so-0/0/2.0 weight 20001 Label-switched-path Bypass->10.11.1.9->10.11.1.2 Label operation: Push 100080, selfID=RSVP-7, parentID=RSVP-8 State: <Active Int> Local AS: 69 Age: 13:14 Metric: 40 Task: RSVP Announcement bits (2): 0-KRT 3-Resolve inet.0 AS path: I IS-IS Preference: 18 Level: 2 Next hop: 10.11.1.9 via fe-0/1/1.0, selected State: <Int> Inactive reason: Route Preference Local AS: 69 Age: 13:20 Metric: 40 Task: IS-IS AS path: I inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) 10.255.11.215/32 (1 entry, 1 announced) State: <FlashAll> *RSVP Preference: 7 Next hop: 10.11.1.9 via fe-0/1/1.0 weight 1, selected Label-switched-path test_r0_r4 Label operation: Push 100128, selfID=RSVP-7 Next hop: via so-0/0/2.0 weight 20001 Label-switched-path Bypass->10.11.1.9->10.11.1.2 Label operation: Push 100080, selfID=RSVP-7, parentID=RSVP-8 State: <Active Int> Local AS: 69 Age: 13:14 Metric: 40 Task: RSVP Announcement bits (1): 1-Resolve inet.0 AS path: I