配置静态双向共路LSP的MPLS TE隧道保护组示例
隧道保护组是在网络故障时,提供一种端对端路径保护解决方案。本例描述了双向共路LSP的MPLS TE隧道保护组的实现过程。
背景信息
静态双向共路LSP的隧道保护组技术能够为双向LSP提供双端倒换功能,在主隧道发生故障时,正向和反向的流量会同时切换到备份路径上,从而提高了网络的可靠性。
如图3-20中的MPLS网络,主路径为LSRA-LSRB-LSRC,备份路径为LSRA-LSRD-LSRC。在主备路径上分别配置静态双向共路LSP,并将两条LSP绑定为隧道保护组,既可以完成LSP的双端倒换功能。
配置思路
采用如下的思路配置双向共路LSP的MPLS TE隧道保护组:
配置各接口的IP地址及静态路由。
配置MPLS基本能力,使能MPLS TE。
配置主、备静态双向共路LSP的入节点、中间节点和出节点。
配置主、备MPLS TE隧道接口,并将隧道接口与对应的LSP绑定。
配置MPLS TE隧道保护组。
配置隧道保护组后进行故障检测,本示例采用MPLS-TP OAM功能进行故障检测。
数据准备
为完成此配置例,需准备如下的数据:
LSRA和LSRC上隧道的接口编号、隧道接口IP地址、目的地址、隧道ID、隧道信令协议(为cr-static)
静态双向共路LSP入节点的下一跳地址和出标签
静态双向共路LSP中间节点的入接口、下一跳和出标签
静态双向共路LSP出节点的入接口
操作步骤
- 配置各接口的IP地址及路由协议
配置各接口的IP地址和掩码,并配置静态路由,保证各LSR之间在网络层互通。
具体配置请参见配置文件。
- 配置MPLS基本能力,使能MPLS TE
# 配置LSRA。
[~LSRA] mpls lsr-id 1.1.1.1
[*LSRA] mpls
[*LSRA-mpls] mpls te
[*LSRA-mpls] quit
[*LSRA] interface gigabitethernet 0/1/0
[*LSRA-GigabitEthernet0/1/0] mpls
[*LSRA-GigabitEthernet0/1/0] mpls te
[*LSRA-GigabitEthernet0/1/0] quit
[*LSRA] interface gigabitethernet 0/1/1
[*LSRA-GigabitEthernet0/1/1] mpls
[*LSRA-GigabitEthernet0/1/1] mpls te
[*LSRA-GigabitEthernet0/1/1] commit
[~LSRA-GigabitEthernet0/1/1] quit
LSRB、LSRC、LSRD与LSRA类似,不再赘述。
- 配置主备隧道静态双向共路LSP的入节点、中间节点和出节点# 配置LSRA为静态双向共路LSP的入节点。
[~LSRA] bidirectional static-cr-lsp ingress Tunnel 10 [*LSRA-bi-static-ingress-Tunnel10] forward nexthop 2.1.1.2 out-label 20 bandwidth ct0 10000 [*LSRA-bi-static-ingress-Tunnel10] backward in-label 20 [*LSRA-bi-static-ingress-Tunnel10] quit
[*LSRA] bidirectional static-cr-lsp ingress Tunnel20 [*LSRA-bi-static-ingress-Tunnel20] forward nexthop 4.1.1.2 out-label 21 bandwidth ct0 10000 [*LSRA-bi-static-ingress-Tunnel20] backward in-label 21 [*LSRA-bi-static-ingress-Tunnel20] commit [~LSRA-bi-static-ingress-Tunnel20] quit
# 配置LSRB为主静态双向共路LSP的中间节点。[~LSRB]bidirectional static-cr-lsp transit lsp1 [*LSRB-bi-static-transit-lsp1] forward in-label 20 nexthop 3.2.1.2 out-label 40 bandwidth ct0 10000 [*LSRB-bi-static-transit-lsp1] backward in-label 16 nexthop 2.1.1.1 out-label 20 bandwidth ct0 10000 [*LSRB-bi-static-transit-lsp1] commit [~LSRB-bi-static-transit-lsp1] quit
# 配置LSRD为备份静态双向共路LSP的中间节点。[~LSRD]bidirectional static-cr-lsp transit lsp2 [*LSRD-bi-static-transit-lsp2] forward in-label 21 nexthop 3.4.1.2 out-label 41 bandwidth ct0 10000 [*LSRD-bi-static-transit-lsp2] backward in-label 17 nexthop 4.1.1.1 out-label 21 bandwidth ct0 10000 [*LSRD-bi-static-transit-lsp2] commit [~LSRD-bi-static-transit-lsp2] quit
# 配置LSRC为静态双向共路LSP的出节点。[~LSRC] bidirectional static-cr-lsp egress lsp1 [*LSRC-bi-static-egress-lsp1] forward in-label 40 lsrid 1.1.1.1 tunnel-id 100 [*LSRC-bi-static-egress-lsp1] backward nexthop 3.2.1.1 out-label 16 bandwidth ct0 10000 [*LSRC-bi-static-egress-lsp1] quit
[*LSRC] bidirectional static-cr-lsp egress lsp2 [*LSRC-bi-static-egress-lsp2] forward in-label 41 lsrid 1.1.1.1 tunnel-id 101 [*LSRC-bi-static-egress-lsp2] backward nexthop 3.4.1.1 out-label 17 bandwidth ct0 10000 [*LSRC-bi-static-egress-lsp2] commit [~LSRC-bi-static-egress-lsp2] quit
- 配置主、备MPLS TE隧道接口,并将隧道接口与对应的LSP绑定
# 在LSRA上配置LSRA至LSRC的MPLS TE隧道Tunnel10和Tunnel11。
[~LSRA] interface Tunnel 10
[*LSRA-Tunnel10] ip address unnumbered interface loopback 1
[*LSRA-Tunnel10] tunnel-protocol mpls te
[*LSRA-Tunnel10] destination 3.3.3.3
[*LSRA-Tunnel10] mpls te tunnel-id 100
[*LSRA-Tunnel10] mpls te signal-protocol cr-static
[*LSRA-Tunnel10] mpls te bidirectional
[*LSRA-Tunnel10] quit
[*LSRA] interface Tunnel 11
[*LSRA-Tunnel11] ip address unnumbered interface loopback 1
[*LSRA-Tunnel11] tunnel-protocol mpls te
[*LSRA-Tunnel11] destination 3.3.3.3
[*LSRA-Tunnel11] mpls te tunnel-id 101
[*LSRA-Tunnel11] mpls te signal-protocol cr-static
[*LSRA-Tunnel11] mpls te bidirectional
[*LSRA-Tunnel11] commit
[~LSRA-Tunnel11] quit
# 在LSRC上配置LSRC至LSRA的MPLS TE隧道Tunnel20和Tunnel21。
[~LSRC] interface Tunnel 20
[*LSRC-Tunnel20] ip address unnumbered interface loopback 1
[*LSRC-Tunnel20] tunnel-protocol mpls te
[*LSRC-Tunnel20] destination 1.1.1.1
[*LSRC-Tunnel20] mpls te tunnel-id 200
[*LSRC-Tunnel20] mpls te signal-protocol cr-static
[*LSRC-Tunnel20] mpls te passive-tunnel
[*LSRC-Tunnel20] mpls te binding bidirectional static-cr-lsp egress lsp1
[*LSRC-Tunnel20] quit
[*LSRC] interface Tunnel 21
[*LSRC-Tunnel21] ip address unnumbered interface loopback 1
[*LSRC-Tunnel21] tunnel-protocol mpls te
[*LSRC-Tunnel21] destination 1.1.1.1
[*LSRC-Tunnel21] mpls te tunnel-id 201
[*LSRC-Tunnel21] mpls te signal-protocol cr-static
[*LSRC-Tunnel21] mpls te passive-tunnel
[*LSRC-Tunnel21] mpls te binding bidirectional static-cr-lsp egress lsp2
[*LSRC-Tunnel21] commit
[~LSRC-Tunnel21] quit
- 配置MPLS TE隧道保护组# 在LSRA上配置Tunnel10的保护隧道为Tunnel11。
[~LSRA] interface Tunnel 10
[*LSRA-Tunnel10] mpls te protection tunnel 101 mode revertive wtr 0
[*LSRA-Tunnel10] commit
[~LSRA-Tunnel10] quit
# 在LSRC上配置Tunnel20的保护隧道为Tunnel21。
[~LSRC] interface Tunnel 20
[*LSRC-Tunnel20] mpls te protection tunnel 201 mode revertive wtr 0
[*LSRC-Tunnel20] commit
[~LSRC-Tunnel20] quit
- 配置隧道保护组后进行故障检测,本示例采用MPLS-TP OAM功能进行故障检测。在LSRA上配置Tunnel10进行故障检测:
[~LSRA] mpls-tp meg abc
[~LSRA-Tunnel10] me te interface Tunnel 10 mep-id 1 remote-mep-id 2
[*LSRA-Tunnel10] commit
[~LSRA-Tunnel10] quit
在LSRC上配置Tunnel20进行故障检测:[~LSRC] mpls-tp meg abc
[~LSRC-Tunnel20] me te interface Tunnel 20 mep-id 2 remote-mep-id 1
[*LSRC-Tunnel20] commit
[~LSRC-Tunnel20] quit
- 检查配置结果
配置完成后,在PE1上执行display mpls te protection tunnel all verbose命令,可以看到Tunnel接口的状态为Up。
# 在PE1上查看配置结果。[~LSRA] display mpls te protection tunnel all verbose ---------------------------------------------------------------- Verbose information about the No."1" protection-group ---------------------------------------------------------------- Work-tunnel id : 100 Protect-tunnel id : 101 Work-tunnel name : Tunnel10 Protect-tunnel name : Tunnel11 Work-tunnel reverse-lsp : - Protect-tunnel reverse-lsp : - Bridge type : 1:1 Switch type : bidirectional Switch result : work-tunnel Tunnel using Best-Effort : none Tunnel using Ordinary : none Work-tunnel frr in use : none Work-tunnel defect state : non-defect Protect-tunnel defect state : non-defect Work-tunnel forward-lsp defect state : non-defect Protect-tunnel forward-lsp defect state : non-defect Work-tunnel reverse-lsp defect state : non-defect Protect-tunnel reverse-lsp defect state : non-defect HoldOff config time : 0ms HoldOff remain time : - WTR config time : 0s WTR remain time : - Mode : revertive Using same path : - Local state : no request Far end request : no request
配置文件
LSRA的配置文件
# sysname LSRA # mpls lsr-id 1.1.1.1 # mpls mpls te # bidirectional static-cr-lsp ingress Tunnel10 forward nexthop 2.1.1.2 out-label 20 bandwidth ct0 10000 backward in-label 20 # bidirectional static-cr-lsp ingress Tunnel11 forward nexthop 4.1.1.2 out-label 21 bandwidth ct0 10000 backward in-label 21 # interface GigabitEthernet0/1/0 undo shutdown ip address 2.1.1.1 255.255.255.0 mpls mpls te # interface GigabitEthernet0/1/1 undo shutdown ip address 4.1.1.1 255.255.255.0 mpls mpls te # interface LoopBack1 ip address 1.1.1.1 255.255.255.255 # interface Tunnel10 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.3 mpls te signal-protocol cr-static mpls te tunnel-id 100 mpls te bidirectional mpls te protection tunnel 101 mode revertive wtr 0 # interface Tunnel11 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.3 mpls te signal-protocol cr-static mpls te tunnel-id 101 mpls te bidirectional # ip route-static 2.2.2.2 255.255.255.255 2.1.1.2 ip route-static 3.3.3.3 255.255.255.255 2.1.1.2 ip route-static 3.3.3.3 255.255.255.255 4.1.1.2 ip route-static 4.4.4.4 255.255.255.255 4.1.1.2 # mpls-tp meg Tunnel10 me te interface Tunnel10 mep-id 1 remote-mep-id 2 # return
LSRB的配置文件
# sysname LSRB # mpls lsr-id 2.2.2.2 # mpls mpls te # bidirectional static-cr-lsp transit lsp1 forward in-label 20 nexthop 3.2.1.2 out-label 40 bandwidth ct0 10000 backward in-label 16 nexthop 2.1.1.1 out-label 20 bandwidth ct0 10000 # interface GigabitEthernet0/1/0 undo shutdown ip address 2.1.1.2 255.255.255.0 mpls mpls te # interface GigabitEthernet0/1/1 undo shutdown ip address 3.2.1.1 255.255.255.0 mpls mpls te # interface LoopBack1 ip address 2.2.2.2 255.255.255.255 # ip route-static 1.1.1.1 255.255.255.255 2.1.1.1 ip route-static 3.3.3.3 255.255.255.255 3.2.1.2 # return
LSRC的配置文件
# sysname LSRC # mpls lsr-id 3.3.3.3 # mpls mpls te # bidirectional static-cr-lsp egress lsp1 forward in-label 40 lsrid 1.1.1.1 tunnel-id 100 backward nexthop 3.2.1.1 out-label 16 bandwidth ct0 10000 # bidirectional static-cr-lsp egress lsp2 forward in-label 41 lsrid 1.1.1.1 tunnel-id 101 backward nexthop 3.4.1.1 out-label 17 bandwidth ct0 10000 # interface GigabitEthernet0/1/0 undo shutdown ip address 3.2.1.2 255.255.255.0 mpls mpls te # interface GigabitEthernet0/1/1 undo shutdown ip address 3.4.1.2 255.255.255.0 mpls mpls te # interface LoopBack1 ip address 3.3.3.3 255.255.255.255 # interface Tunnel20 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 1.1.1.1 mpls te signal-protocol cr-static mpls te tunnel-id 200 mpls te passive-tunnel mpls te binding bidirectional static-cr-lsp egress lsp1 mpls te protection tunnel 201 mode revertive wtr 0 # interface Tunnel21 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 1.1.1.1 mpls te signal-protocol cr-static mpls te tunnel-id 201 mpls te passive-tunnel mpls te binding bidirectional static-cr-lsp egress lsp2 # ip route-static 1.1.1.1 255.255.255.255 3.2.1.1 ip route-static 1.1.1.1 255.255.255.255 3.4.1.1 ip route-static 2.2.2.2 255.255.255.255 3.2.1.1 ip route-static 4.4.4.4 255.255.255.255 3.4.1.1 # mpls-tp meg Tunnel20 me te interface Tunnel20 mep-id 2 remote-mep-id 1 # return
LSRD的配置文件
# sysname LSRD # mpls lsr-id 4.4.4.4 # mpls mpls te # bidirectional static-cr-lsp transit lsp2 forward in-label 21 nexthop 3.4.1.2 out-label 41 bandwidth ct0 10000 backward in-label 17 nexthop 4.1.1.1 out-label 21 bandwidth ct0 10000 # interface GigabitEthernet0/1/0 undo shutdown ip address 4.1.1.2 255.255.255.0 mpls mpls te # interface GigabitEthernet0/1/1 undo shutdown ip address 3.4.1.1 255.255.255.0 mpls mpls te # interface LoopBack1 ip address 4.4.4.4 255.255.255.255 # ip route-static 1.1.1.1 255.255.255.255 4.1.1.1 ip route-static 3.3.3.3 255.255.255.255 3.4.1.2 # return