配置动态BFD for SR-MPLS TE LSP示例
本示例中,通过配置动态BFD for SR-MPLS TE LSP,可以快速检测SR-MPLS TE LSP的故障,为SR-MPLS TE LSP中的流量提供保护。
组网需求
如图2-18所示,PE1上建立了一条PE2隧道,同时建立主备两条LSP,路径的生成和数据的转发采用SR(segment routing)协议。PE2负责收集网络拓扑并通过IS-IS泛洪上报给控制器,控制器通过收集的拓扑信息计算主备两条LSP的标签路径,并将路径信息下发给第三方适配器,通过第三方适配器将主备两条LSP的路径信息下发给Ingress节点PE1。
该隧道使能了热备份。当主LSP故障时,流量切换到备份LSP;当主LSP故障恢复,则进行流量回切。
因为路径的下发通过第三方适配器完成,因此无需配置PCC(PCE Client)。
与第三方对接时,如果对端不支持BFD功能,可通过配置BFD单臂模式,对链路进行检测。
配置思路
采用如下的思路配置动态BFD for SR-MPLS TE LSP:
配置各节点接口的IP地址及作为MPLS LSR-ID的Loopback接口的地址。
配置LSR-ID并全局使能各节点的MPLS TE和各接口的MPLS TE。
在各节点使能全局segment routing能力。
在各节点配置标签分配和拓扑收集方式,本示例采用控制器分配标签的方式。
在PE2节点和控制器之间建立IS-IS邻居,以便通过IS-IS泛洪上报网络拓扑。
在Ingress节点PE1创建隧道接口,指定隧道的IP地址、隧道协议、目的地址以及隧道带宽。
配置CR-LSP热备份。
在隧道Ingress端使能BFD,配置MPLS TE BFD,并指定本地发送BFD报文的最小时间间隔和允许接收BFD报文的最小时间间隔,以及BFD本地检测倍数。
在Egress端使能被动创建BFD会话。
操作步骤
- 配置各接口的IP地址
配置各接口的IP地址和掩码,具体配置过程见配置文件。
- 配置IS-IS协议发布各节点接口所连网段和LSR-ID的主机路由
在各个节点上配置IS-IS,使各设备间网络能互通。具体配置过程请参见配置文件。
- 在控制器和PE2之间配置IS-IS邻居
在控制器和PE2之间配置IS-IS邻居,使控制器和PE2能够互通,以便PE2通过IS-IS泛洪给控制器网络拓扑。具体配置过程参见配置文件。
- 配置MPLS基本能力,使能MPLS TE
# 配置PE1。
[~PE1] mpls lsr-id 1.1.1.1
[*PE1] mpls
[*PE1-mpls] mpls te
[*PE1-mpls] quit
[*PE1] interface gigabitethernet 0/1/0
[*PE1-GigabitEthernet0/1/0] mpls
[*PE1-GigabitEthernet0/1/0] mpls te
[*PE1-GigabitEthernet0/1/0] commit
[~PE1-GigabitEthernet0/1/0] quit
P1、PE2与PE1的配置相同,不再赘述。
- 在各节点使能segment routing能力
# 配置PE1。
[~PE1] segment-routing
[*PE1] commit
P1、PE2与PE1的配置相同,不再赘述。
- 在各节点配置标签分配和拓扑收集方式,本示例采用控制器分配标签的方式。
# 配置PE1。
[~PE1] isis 1
[*PE1-isis-1] cost-style wide
[*PE1-isis-1] traffic-eng level-2
[*PE1-isis-1] segment-routing mpls
[*PE1-isis-1] commit
[~PE1-isis-1] quit
P1、PE2与PE1的配置相同,不再赘述。
- 在Ingress节点PE1上配置隧道接口,并配置热备份
# 配置PE1。
[~PE1] interface tunnel1
[*PE1-Tunnel1] ip address unnumbered interface loopback 0
[*PE1-Tunnel1] tunnel-protocol mpls te
[*PE1-Tunnel1] destination 3.3.3.3
[*PE1-Tunnel1] mpls te tunnel-id 1
[*PE1-Tunnel1] mpls te signal-protocol segment-routing
[*PE1-Tunnel1] mpls te pce delegate
[*PE1-Tunnel1] mpls te backup hot-standby
[*PE1-Tunnel1] commit
[~PE1-Tunnel1] quit
- 检查配置结果
配置完成后,在PE1上执行display mpls te tunnel-interface命令,可以看到Tunnel接口的状态为Up。
[~PE1] display mpls te tunnel-interface tunnel1
Tunnel Name : Tunnel1 Signalled Tunnel Name: - Tunnel State Desc : CR-LSP is Up Tunnel Attributes : Active LSP : Primary LSP Traffic Switch : - Session ID : 1 Ingress LSR ID : 1.1.1.9 Egress LSR ID: 4.4.4.9 Admin State : UP Oper State : UP Signaling Protocol : RSVP FTid : 1 Tie-Breaking Policy : None Metric Type : None Bfd Cap : None Reopt : Disabled Reopt Freq : - Inter-area Reopt : Disabled 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 : - Low Value : - High Value : - Readjust Value : - Offload Explicit Path Name: Tunnel Group : - Interfaces Protected: - Excluded IP Address : - Referred LSP Count : 0 Primary Tunnel : - Pri Tunn Sum : - Backup Tunnel : - Group Status : Up Oam Status : - IPTN InLabel : - Tunnel BFD Status : - BackUp LSP Type : Hot-Standby BestEffort : Enabled Secondary HopLimit : - BestEffort HopLimit : - Secondary Explicit Path Name: - 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: - Ip-Prefix Name : - P2p-Template Name : - PCE Delegate : Only status report LSP Control Status : Local control Entropy Label :None Associated Tunnel Group ID: - Associated Tunnel Group Type: - Auto BW Remain Time : 200 s Reopt Remain Time : 100 s Metric Inherit IGP : None Binding Sid : - Reverse Binding Sid : - FRR Attr Source : - Is FRR degrade down : No Primary LSP ID : 1.1.1.9:19 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: - Record Route : Disabled Record Label : Disabled Route Pinning : Disabled FRR Flag : Disabled IdleTime Remain : - BFD Status : - Soft Preemption : Enabled Reroute Flag : Disabled Pce Flag : Normal Path Setup Type : EXPLICIT Create Modify LSP Reason: - Backup LSP ID : 1.1.1.9:46945 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): 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 Reroute Flag : Enabled Pce Flag : Normal Path Setup Type : CSPF Create Modify LSP Reason: -
在PE1上执行display mpls te tunnel命令,可以看到SR-MPLS TE隧道的建立情况。
[~PE1] display mpls te tunnel
------------------------------------------------------------------------------- Ingress LsrId Destination LSPID In/OutLabel R Tunnel-name ------------------------------------------------------------------------------- - - - 101/101 T lsp 1.1.1.1 3.3.3.3 21 -/330000 I Tunnel1 1.1.1.1 3.3.3.3 26 -/330002 I Tunnel1 ------------------------------------------------------------------------------- R: Role, I: Ingress, T: Transit, E: Egress
在PE1上执行display mpls te tunnel path命令,可以看到SR-MPLS TE隧道的路径信息。
[~PE1] display mpls te tunnel path
Tunnel Interface Name : Tunnel1 Lsp ID : 1.1.1.1 :1 :21 Hop Information Hop 0 Label 330000 NAI 10.1.1.2 Tunnel Interface Name : Tunnel1 Lsp ID : 1.1.1.1 :1 :26 Hop Information Hop 0 Label 330002 NAI 10.1.2.2 Hop 1 Label 330002 NAI 10.1.3.1
- 在隧道Ingress端使能BFD并配置MPLS TE BFD
# 在PE1上的Tunnel接口下使能MPLS TE BFD,并指定本地发送BFD报文的最小时间间隔和允许接收的最小时间间隔都为100毫秒,BFD本地检测倍数为3。
[~PE1] bfd
[*PE1-bfd] quit
[*PE1] interface tunnel 1
[*PE1-Tunnel1] mpls te bfd enable
[*PE1-Tunenl1] mpls te bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 3
[*PE1-Tunenl1] commit
[~PE1-Tunenl1] quit
- 在隧道Egress端使能被动创建BFD会话
[~PE2] bfd
[*PE2-bfd] mpls-passive
[*PE2-bfd] commit
[~PE2-bfd] quit
# 完成此步骤后,在PE1和PE2上执行display bfd session mpls-te interface Tunnel ,可发现BFD会话状态为Up。
[~PE1] display bfd session mpls-te interface Tunnel 1 te-lsp
(w): State in WTR (*): State is invalid -------------------------------------------------------------------------------- Local Remote PeerIpAddr State Type InterfaceName -------------------------------------------------------------------------------- 16399 16386 3.3.3.3 Up D_TE_LSP Tunnel1 --------------------------------------------------------------------------------
配置文件
PE1的配置文件
# sysname PE1 # bfd # mpls lsr-id 1.1.1.1 # mpls mpls te # segment-routing # isis 1 is-level level-2 cost-style wide network-entity 10.0000.0000.0002.00 segment-routing mpls traffic-eng level-2 # interface GigabitEthernet0/1/0 undo shutdown ip address 10.1.1.1 255.255.255.0 isis enable 1 mpls mpls te # interface GigabitEthernet0/2/0 undo shutdown ip address 10.1.2.1 255.255.255.0 isis enable 1 mpls mpls te # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 isis enable 1 # interface Tunnel1 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 3.3.3.3 mpls te signal-protocol segment-routing mpls te tunnel-id 1 mpls te pce delegate mpls te backup hot-standby mpls te bfd enable mpls te bfd min-tx-interval 100 min-rx-interval 100 # return
P1的配置文件
# sysname P1 # mpls lsr-id 2.2.2.2 # mpls mpls te # segment-routing # isis 1 is-level level-2 cost-style wide network-entity 10.0000.0000.0003.00 segment-routing mpls traffic-eng level-2 # interface GigabitEthernet2/0/0 undo shutdown ip address 10.1.2.2 255.255.255.0 isis enable 1 mpls mpls te # interface GigabitEthernet3/0/0 undo shutdown ip address 10.1.3.2 255.255.255.0 isis enable 1 mpls mpls te # interface LoopBack0 ip address 2.2.2.2 255.255.255.255 isis enable 1 # return
PE2的配置文件
# sysname PE2 # bfd mpls-passive # mpls lsr-id 3.3.3.3 # mpls mpls te # segment-routing # isis 1 is-level level-2 cost-style wide network-entity 10.0000.0000.0004.00 segment-routing mpls traffic-eng level-2 # interface GigabitEthernet0/1/0 undo shutdown ip address 10.1.1.2 255.255.255.0 isis enable 1 mpls mpls te # interface GigabitEthernet0/3/0 undo shutdown ip address 10.1.3.1 255.255.255.0 isis enable 1 mpls mpls te # interface LoopBack0 ip address 3.3.3.3 255.255.255.255 isis enable 1 # return
Controller的配置文件
# sysname Controller # isis 1 is-level level-2 cost-style wide network-entity 10.0000.0000.0005.00 segment-routing mpls traffic-eng level-2 # interface GigabitEthernet0/3/0 undo shutdown ip address 10.2.1.2 255.255.255.0 isis enable 1 # return