配置CR-LSP热备份示例
组网需求
图3-19为MPLS VPN网络。要求从PE1上建立一条TE隧道,目的地址为PE2,并配置CR-LSP热备份(hot-standby)和逃生路径(best-effort)。其中,
主CR-LSP的路径为PE1-->P1-->PE2;
备份CR-LSP的路径为PE1-->P2-->PE2;
当主CR-LSP故障时,流量切换到备份CR-LSP;当主CR-LSP故障恢复,延时15秒后再进行流量回切。如果主、备CR-LSP都故障,触发建立逃生路径,使流量切换到逃生路径上。其中主、备CR-LSP都可以通过显式路径来指定,逃生路径由系统自动根据网络的故障情况来计算不需用户指定,本例中的结果为PE1->P2->P1->PE2。当故障节点不同时,逃生路径的结果也不一样。
配置思路
采用如下思路配置CR-LSP热备份:
配置各接口IP地址和IGP使各节点互通。
配置MPLS和MPLS TE基本能力。
在PE1上配置主、备显式路径。
在PE1上创建目的地址为PE2的隧道接口,指定显式路径,并使能热备份和逃生路径,配置回切时间为15秒。
操作步骤
- 配置各接口的IP地址
根据组网图配置IP地址,并在节点上创建Loopback接口,配置Loopback接口的IP地址为MPLS LSR-ID。具体配置内容请参见本例的配置文件。
- 配置IGP
在各个节点上配置OSPF或IS-IS,使各节点能互通。本例使用IS-IS。具体配置内容请参见本例的配置文件。
- 配置MPLS基本能力
在各个节点的系统视图下配置LSR-ID,使能MPLS,并在物理接口下使能MPLS。具体配置内容请参见本例的配置文件。
- 配置MPLS TE基本能力
在各个节点的MPLS视图和链路的接口视图下使能MPLS-TE、MPLS RSVP-TE。具体配置内容请参见本例的配置文件。
- 配置IS-IS TE,并配置CSPF
在各个节点上配置IS-IS TE,并在PE1上配置CSPF。具体配置过程请参见配置RSVP-TE隧道。
- 配置主、备CR-LSP使用的显式路径
# 在PE1上配置主CR-LSP使用的显式路径。
<PE1> system-view
[~PE1] explicit-path main
[*PE1-explicit-path-main] next hop 10.4.1.2
[*PE1-explicit-path-main] next hop 10.2.1.2
[*PE1-explicit-path-main] next hop 3.3.3.3
[*PE1-explicit-path-main] quit
# 在PE1上配置备份CR-LSP使用的显式路径。
[*PE1] explicit-path backup
[*PE1-explicit-path-backup] next hop 10.3.1.2
[*PE1-explicit-path-backup] next hop 10.5.1.2
[*PE1-explicit-path-backup] next hop 3.3.3.3
[*PE1-explicit-path-backup] commit
[~PE1-explicit-path-backup] quit
# 完成此步骤后,可在PE1上执行命令查看显式路径是否配置正确。
[~PE1] display explicit-path main
Path Name : main Path Status : Enabled
1 10.4.1.2 Strict Include
2 10.2.1.2 Strict Include
3 3.3.3.3 Strict Include
[~PE1] display explicit-path backup
Path Name : backup Path Status : Enabled
1 10.3.1.2 Strict Include
2 10.5.1.2 Strict Include
3 3.3.3.3 Strict Include
- 配置隧道接口
# 在PE1上创建Tunnel接口,指定显式路径,配置隧道带宽为10Mbps。
[~PE1] interface tunnel1
[*PE1-Tunnel1] ip address unnumbered interface loopback 1
[*PE1-Tunnel1] tunnel-protocol mpls te
[*PE1-Tunnel1] destination 3.3.3.3
[*PE1-Tunnel1] mpls te tunnel-id 502
[*PE1-Tunnel1] mpls te path explicit-path main
[*PE1-Tunnel1] mpls te bandwidth ct0 10000
# 在该Tunnel接口配置热备份,回切时间为15秒,指定备份显式路径,并配置逃生路径。
[*PE1-Tunnel1] mpls te backup hot-standby wtr 15
[*PE1-Tunnel1] mpls te path explicit-path backup secondary
[*PE1-Tunnel1] mpls te backup ordinary best-effort
[*PE1-Tunnel1] commit
[~PE1-Tunnel1] quit
完成步骤后,在PE1上执行display mpls te tunnel-interface tunnel1命令,可发现主CR-LSP、备份CR-LSP建立成功。
[~PE1] display mpls te tunnel-interface tunnel1
Tunnel Name : Tunnel1 Signalled Tunnel Name: - Tunnel State Desc : Primary CR-LSP Up and HotBackup CR-LSP Up Tunnel Attributes : Active LSP : Primary LSP Traffic Switch : - Session ID : 502 Ingress LSR ID : 4.4.4.4 Egress LSR ID: 3.3.3.3 Admin State : UP Oper State : UP Signaling Protocol : RSVP FTid : 161 Tie-Breaking Policy : None Metric Type : None Bfd Cap : None Reopt : Disabled Reopt Freq : - Auto BW : Disabled Threshold : 0 percent Current Collected BW: 0 kbps Auto BW Freq : 0 Min BW : 0 kbps Max BW : 0 kbps Tunnel Group : - Interfaces Protected: - Excluded IP Address : - Referred LSP Count : 0 Primary Tunnel : - Pri Tunn Sum : - Backup Tunnel : - Group Status : - Oam Status : - IPTN InLabel : - BackUp LSP Type : Hot-Standby BestEffort : Enabled Secondary HopLimit : 32 BestEffort HopLimit : - Secondary Explicit Path Name: backup Secondary Affinity Prop/Mask: 0x0/0x0 BestEffort Affinity Prop/Mask: 0x0/0x0 IsConfigLspConstraint: - Hot-Standby Revertive Mode: Revertive Hot-Standby Overlap-path: Disabled Hot-Standby Switch State: CLEAR Bit Error Detection: Disabled Bit Error Detection Switch Threshold: - Bit Error Detection Resume Threshold: - Primary LSP ID : 4.4.4.4:424 LSP State : UP LSP Type : Primary Setup Priority : 7 Hold Priority: 7 IncludeAll : 0x0 IncludeAny : 0x0 ExcludeAny : 0x0 Affinity Prop/Mask : 0x0/0x0 Resv Style : SE Configured Bandwidth Information: CT0 Bandwidth(Kbit/sec): 10000 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Actual Bandwidth Information: CT0 Bandwidth(Kbit/sec): 10000 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Explicit Path Name : main Hop Limit: 32 Record Route : Enabled Record Label : Disabled Route Pinning : Disabled FRR Flag : Disabled IdleTime Remain : - BFD Status : - Soft Preemption : Enabled Backup LSP ID : 4.4.4.4:423 IsBestEffortPath : No LSP State : UP LSP Type : Hot-Standby Setup Priority : 7 Hold Priority: 7 IncludeAll : 0x0 IncludeAny : 0x0 ExcludeAny : 0x0 Affinity Prop/Mask : 0x0/0x0 Resv Style : SE Configured Bandwidth Information: CT0 Bandwidth(Kbit/sec): 10000 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Actual Bandwidth Information: CT0 Bandwidth(Kbit/sec): 10000 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Explicit Path Name : backup Hop Limit: 32 Record Route : Enabled Record Label : Disabled Route Pinning : Disabled FRR Flag : Disabled IdleTime Remain : - BFD Status : - Soft Preemption : Enabled
# 可使用命令查看热备份信息。
[~PE1] display mpls te hot-standby state interface Tunnel1
---------------------------------------------------------------- Verbose information about the Tunnel1 hot-standby state ---------------------------------------------------------------- Tunnel Name : Tunnel1 Session ID : 502 Main LSP index : 0xC1 Hot-Standby LSP index : 0xE1 HSB switch result : main LSP HSB switch reason : - WTR config time : 15 s WTR remain time : - Using overlapped path : no
# 可使用ping lsp te命令检测热备份CR-LSP连通性。[~PE1] ping lsp te tunnel1 hot-standby
LSP PING FEC: RSVP IPV4 SESSION QUERY Tunnel1 : 100 data bytes, press CTR L_C to break Reply from 3.3.3.3: bytes=100 Sequence=1 time = 4 ms Reply from 3.3.3.3: bytes=100 Sequence=2 time = 3 ms Reply from 3.3.3.3: bytes=100 Sequence=3 time = 3 ms Reply from 3.3.3.3: bytes=100 Sequence=4 time = 3 ms Reply from 3.3.3.3: bytes=100 Sequence=5 time = 6 ms --- FEC: RSVP IPV4 SESSION QUERY Tunnel1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 3/3/6 ms
# 可使用tracert lsp te命令检测热备份CR-LSP所经过的路径。[~PE1] tracert lsp te tunnel1 hot-standby LSP Trace Route FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel1 , press CTRL_C to break. TTL Replier Time Type Downstream 0 Ingress 10.3.1.2/[13313 ] 1 10.3.1.2 90 ms Transit 10.5.1.2/[3 ] 2 3.3.3.3 130 ms Egress
- 检查配置结果
将同一台测试仪的两个接口(Port1和Port2)分别接入PE1和PE2,从Port1向Port2打MPLS流(注意标签值的设置)。可发现当拔出PE1上的GE0/2/0或P1上的GE0/2/0接口的线缆时,故障收敛时间为毫秒级。在PE1上执行display mpls te hot-standby state interface tunnel1命令,可发现流量被切换到备份CR-LSP上。
[~PE1] display mpls te hot-standby state interface tunnel1
---------------------------------------------------------------- Verbose information about the Tunnel1 hot-standby state ---------------------------------------------------------------- Tunnel Name : Tunnel1 Session ID : 502 Main LSP index : 0x0 Hot-Standby LSP index : 0xE1 HSB switch result : hot-standby LSP HSB switch reason : signal fail WTR config time : 10 s WTR remain time : - Using overlapped path : no
插上刚才拔出的线缆后,等15秒后,可发现流量被切换到主CR-LSP上。
如果拔出PE1上的GE0/2/0或P1上的GE0/2/0接口后再拔出PE2上的GE0/2/0或P2上的GE0/2/0接口的线缆时,隧道接口变为Down后又会变为Up,逃生路径建立成功,流量被切换到逃生路径上。
[~PE1] display mpls te tunnel-interface tunnel1
Tunnel Name : Tunnel1 Signalled Tunnel Name: - Tunnel State Desc : Backup CR-LSP In use and Primary CR-LSP setting Up Tunnel Attributes : Active LSP : BestEffort LSP Traffic Switch : - Session ID : 502 Ingress LSR ID : 4.4.4.4 Egress LSR ID: 3.3.3.3 Admin State : UP Oper State : UP Signaling Protocol : RSVP FTid : 161 Tie-Breaking Policy : None Metric Type : None Bfd Cap : None Reopt : Disabled Reopt Freq : - Auto BW : Disabled Threshold : 0 percent Current Collected BW: 0 kbps Auto BW Freq : 0 Min BW : 0 kbps Max BW : 0 kbps Offload : Disabled Offload Freq : 0 sec Low Value : 0 kbps High Value : 0 kbps Readjust Value : 0 kbps Offload Explicit Path Name: - Tunnel Group : - Interfaces Protected: - Excluded IP Address : - Referred LSP Count : 0 Primary Tunnel : - Pri Tunn Sum : - Backup Tunnel : - Group Status : - Oam Status : - IPTN InLabel : - BackUp LSP Type : BestEffort BestEffort : Enabled Secondary HopLimit : 32 BestEffort HopLimit : - Secondary Explicit Path Name: backup Secondary Affinity Prop/Mask: 0x0/0x0 BestEffort Affinity Prop/Mask: 0x0/0x0 IsConfigLspConstraint: - Hot-Standby Revertive Mode: Revertive Hot-Standby Overlap-path: Disabled Hot-Standby Switch State: CLEAR Bit Error Detection: Disabled Bit Error Detection Switch Threshold: - Bit Error Detection Resume Threshold: - Primary LSP ID : 4.4.4.4:436 LSP State : DOWN LSP Type : Primary Setup Priority : 7 Hold Priority: 7 IncludeAll : 0x0 IncludeAny : 0x0 ExcludeAny : 0x0 Affinity Prop/Mask : 0x0/0x0 Resv Style : SE Configured Bandwidth Information: CT0 Bandwidth(Kbit/sec): 10000 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Actual Bandwidth Information: CT0 Bandwidth(Kbit/sec): 10000 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Explicit Path Name : main Hop Limit: 32 Record Route : Enabled Record Label : Disabled Route Pinning : Disabled FRR Flag : Disabled IdleTime Remain : - BFD Status : - Soft Preemption : Enabled Backup LSP ID : 4.4.4.4:440 IsBestEffortPath : No LSP State : DOWN LSP Type : Hot-Standby Setup Priority : 7 Hold Priority: 7 IncludeAll : 0x0 IncludeAny : 0x0 ExcludeAny : 0x0 Affinity Prop/Mask : 0x0/0x0 Resv Style : SE Configured Bandwidth Information: CT0 Bandwidth(Kbit/sec): 10000 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Actual Bandwidth Information: CT0 Bandwidth(Kbit/sec): 10000 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Explicit Path Name : backup Hop Limit: 32 Record Route : Enabled Record Label : Disabled Route Pinning : Disabled FRR Flag : Disabled IdleTime Remain : - BFD Status : - Soft Preemption : Enabled Backup LSP ID : 4.4.4.4:439 IsBestEffortPath : Yes LSP State : UP LSP Type : BestEffort Setup Priority : 7 Hold Priority: 7 IncludeAll : 0x0 IncludeAny : 0x0 ExcludeAny : 0x0 Affinity Prop/Mask : 0x0/0x0 Resv Style : SE Configured Bandwidth Information: CT0 Bandwidth(Kbit/sec): 0 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Actual Bandwidth Information: CT0 Bandwidth(Kbit/sec): 0 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec): 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec): 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec): 0 CT7 Bandwidth(Kbit/sec): 0 Explicit Path Name : - Hop Limit: - Record Route : Enabled Record Label : Disabled Route Pinning : Disabled FRR Flag : Disabled IdleTime Remain : - BFD Status : - Soft Preemption : Enabled
[~PE1] display mpls te tunnel path
Tunnel Interface Name : Tunnel1 Lsp ID : 4.4.4.4 :502 :32776 Hop Information Hop 0 10.3.1.1 Hop 1 10.3.1.2 Hop 2 2.2.2.2 Hop 3 10.1.1.2 Hop 4 10.1.1.1 Hop 5 1.1.1.1 Hop 6 10.2.1.1 Hop 7 10.2.1.2 Hop 8 3.3.3.3
配置文件
PE1的配置文件
#
sysname PE1
#
mpls lsr-id 4.4.4.4
#
mpls
mpls te
mpls te cspf
mpls rsvp-te
#
explicit-path backup
next hop 10.3.1.2
next hop 10.5.1.2
next hop 3.3.3.3
#
explicit-path main
next hop 10.4.1.2
next hop 10.2.1.2
next hop 3.3.3.3
isis 1
cost-style wide
traffic-eng level-1-2
network-entity 10.0000.0000.0004.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.3.1.1 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.4.1.1 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
isis enable 1
#
interface Tunnel1
ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.3 mpls te tunnel-id 502 mpls te record-route mpls te bandwidth ct0 10000 mpls te backup hot-standby wtr 15 mpls te backup ordinary best-effort mpls te path explicit-path main mpls te path explicit-path backup secondary
#
return
P1的配置文件
#
sysname P1
#
mpls lsr-id 1.1.1.1
#
mpls
mpls te
mpls rsvp-te
isis 1
cost-style wide
traffic-eng level-1-2
network-entity 10.0000.0000.0001.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.1 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.4.1.2 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 10.2.1.1 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface LoopBack1
isis enable 1
ip address 1.1.1.1 255.255.255.255
#
return
P2的配置文件
#
sysname P2
#
mpls lsr-id 2.2.2.2
#
mpls
mpls te
mpls rsvp-te
isis 1
cost-style wide
traffic-eng level-1-2
network-entity 10.0000.0000.0002.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.2 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.5.1.1 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 10.3.1.2 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
isis enable 1
#
return
PE2的配置文件
#
sysname PE2
#
mpls lsr-id 3.3.3.3
#
mpls
mpls te
mpls rsvp-te
isis 1
cost-style wide
traffic-eng level-1-2
network-entity 10.0000.0000.0003.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.2.1.2 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.5.1.2 255.255.255.252
mpls
mpls te
isis enable 1
mpls rsvp-te
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
isis enable 1
#
return