配置动态多段PW的PW APS保护示例
在PW APS场景中,通过MPLS OAM机制检测动态多段PW。
组网需求
如图9-39所示,公网的四台PE设备之间部署了动态双向关联LSP隧道。要求CE1和CE2通过公网的四台PE互通,并保证可靠性。
为保证可靠性,PE1和PE2之间通过主备PW保证业务不中断。对于同源同宿的主备PW和动态双向关联LSP隧道,考虑部署动态PW的PW APS保护。由于四台PE在不同的IGP域内,因此部署多段PW。
配置思路
采用如下的思路配置动态多段PW的PW APS保护:
配置各接口的IP地址和路由协议
配置MPLS和公网隧道
在本示例中,PE和SPE之间均使用动态双向关联LSP隧道,具体包括:
配置MPLS基本能力,并使能MPLS TE、RSVP-TE和CSPF
配置OSPF TE
配置动态双向关联LSP
配置PW保护组,本示例配置多段动态PW,具体包括:
PE1和PE2上分别配置主备PW保护组
SPE1和SPE2上配置纯动态交换PW
配置PW APS保护,具体包括:
PE1和PE2上配置PW APS实例
配置PW保护组和PW APS实例绑定
配置MPLS OAM检测PW状态
配置AC侧CE设备通过VLAN接入L2VPN
数据准备
为完成此配置例,需准备如下的数据:
PE接口编号、接口IP地址和OSPF进程号
PE的LSR ID、Tunnel接口的编号和IP地址、反向RSVP-LSP的遂道ID、反向RSVP-LSP的Ingress节点的LSR ID
L2VC本地和远端的IP地址、VC ID、VC Type
PE1和PE2设备上的APS实例编号
操作步骤
- 配置各接口的IP地址和路由协议
按照图9-39配置各接口的IP地址和掩码,具体配置过程略。
本举例使用OSPF路由协议,保证PE1、PE2、SPE1和SPE2在网络层互通。具体配置过程略。
- 配置MPLS和公网隧道
本示例中,PE1、PE2和SPE1、SPE2之间采用动态双向关联LSP隧道。
- 配置PW保护组
本示例中,配置动态多段动态PW。
- 配置PW APS保护
- 配置MPLS OAM检测PW状态
# 配置PE1。
[~PE1] mpls
[*PE1-mpls] mpls oam
[*PE1-mpls] quit
[*PE1] mpls-oam
[*PE1-mpls-oam] mpls oam l2vc peer-ip 2.2.2.2 vc-id 1 vc-type vlan remote-peer-ip 4.4.4.4 remote-vc-id 3 remote-vc-type vlan type cv auto-protocol
[*PE1-mpls-oam] mpls oam l2vc peer-ip 3.3.3.3 vc-id 2 vc-type vlan remote-peer-ip 4.4.4.4 remote-vc-id 4 remote-vc-type vlan type cv auto-protocol
[*PE1-mpls-oam] mpls oam l2vc enable receive peer-ip 2.2.2.2 vc-id 1 vc-type vlan
[*PE1-mpls-oam] mpls oam l2vc enable send peer-ip 2.2.2.2 vc-id 1 vc-type vlan
[*PE1-mpls-oam] mpls oam l2vc enable receive peer-ip 3.3.3.3 vc-id 2 vc-type vlan
[*PE1-mpls-oam] mpls oam l2vc enable send peer-ip 3.3.3.3 vc-id 2 vc-type vlan
[*PE1-mpls-oam] quit
[*PE1] commit
# 配置PE2。
[~PE2] mpls
[*PE2-mpls] mpls oam
[*PE2-mpls] quit
[*PE2] mpls-oam
[*PE2-mpls-oam] mpls oam l2vc peer-ip 2.2.2.2 vc-id 3 vc-type vlan remote-peer-ip 1.1.1.1 remote-vc-id 1 remote-vc-type vlan type cv auto-protocol
[*PE2-mpls-oam] mpls oam l2vc peer-ip 3.3.3.3 vc-id 4 vc-type vlan remote-peer-ip 1.1.1.1 remote-vc-id 2 remote-vc-type vlan type cv auto-protocol
[*PE2-mpls-oam] mpls oam l2vc enable receive peer-ip 2.2.2.2 vc-id 3 vc-type vlan
[*PE2-mpls-oam] mpls oam l2vc enable send peer-ip 2.2.2.2 vc-id 3 vc-type vlan
[*PE2-mpls-oam] mpls oam l2vc enable receive peer-ip 3.3.3.3 vc-id 4 vc-type vlan
[*PE2-mpls-oam] mpls oam l2vc enable send peer-ip 3.3.3.3 vc-id 4 vc-type vlan
[*PE2-mpls-oam] quit
[*PE2] commit
查看PE1上MPLS OAM配置信息。
[~PE1] display mpls oam l2vc all
-------------------------------------------------------------------------------- Total Oam Num: 2 Total Start Oam Num: 2 Total Defect Oam Num: 0 -------------------------------------------------------------------------------- No. Peer IP VC Type VC ID Status -------------------------------------------------------------------------------- 1 2.2.2.2 vlan 3 Start/Non-defect 2 3.3.3.3 vlan 4 Start/Non-defect
- 检查配置结果
# CE1 ping CE2的GE子接口地址
[~CE1] ping 10.1.1.2
PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=40 ms Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=40 ms Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms --- 10.1.1.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/22/40 ms
配置文件
CE1的配置文件
# sysname CE1 # interface GigabitEthernet1/0/0 undo shutdown # interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 10.1.1.1 255.255.255.0 # return
PE1的配置文件
# sysname PE1 # vlan batch 10 # undo cluster enable # mpls lsr-id 1.1.1.1 mpls mpls te label advertise non-null mpls rsvp-te mpls oam mpls te cspf # mpls l2vpn # pw-aps 1 # explicit-path 1to2 next hop 10.1.2.2 next hop 2.2.2.2 # explicit-path 1to3 next hop 10.1.3.2 next hop 3.3.3.3 # mpls ldp # mpls ldp remote-peer 2.2.2.2 remote-ip 2.2.2.2 # mpls ldp remote-peer 3.3.3.3 remote-ip 3.3.3.3 # interface Vlanif10 # interface GigabitEthernet1/0/0 undo shutdown # interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 mpls l2vc 2.2.2.2 1 tunnel-policy policy1 control-word mpls l2vc 3.3.3.3 2 tunnel-policy policy1 control-word secondary mpls l2vpn pw-aps 1 admin # interface GigabitEthernet1/0/1 undo shutdown ip address 10.1.2.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/2 undo shutdown ip address 10.1.3.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # interface Tunnel10 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 2.2.2.2 mpls te tunnel-id 100 mpls te reverse-lsp protocol rsvp-te ingress-lsr-id 2.2.2.2 tunnel-id 100 mpls te path explicit-path 1to2 mpls te reserved-for-binding # interface Tunnel11 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 3.3.3.3 mpls te tunnel-id 200 mpls te reverse-lsp protocol rsvp-te ingress-lsr-id 3.3.3.3 tunnel-id 200 mpls te path explicit-path 1to3 mpls te reserved-for-binding # ospf 1 opaque-capability enable area 0.0.0.0 network 10.1.2.0 0.0.0.255 network 1.1.1.1 0.0.0.0 network 10.1.3.0 0.0.0.255 mpls-te enable # tunnel-policy policy1 tunnel binding destination 2.2.2.2 te Tunnel10 tunnel binding destination 3.3.3.3 te Tunnel11 # mpls-oam mpls oam l2vc peer-ip 2.2.2.2 vc-id 1 vc-type vlan remote-peer-ip 4.4.4.4 remote-vc-id 3 remote-vc-type vlan type cv auto-protocol mpls oam l2vc peer-ip 3.3.3.3 vc-id 2 vc-type vlan remote-peer-ip 4.4.4.4 remote-vc-id 4 remote-vc-type vlan type cv auto-protocol mpls oam l2vc enable receive peer-ip 2.2.2.2 vc-id 1 vc-type vlan mpls oam l2vc enable send peer-ip 2.2.2.2 vc-id 1 vc-type vlan mpls oam l2vc enable receive peer-ip 3.3.3.3 vc-id 2 vc-type vlan mpls oam l2vc enable send peer-ip 3.3.3.3 vc-id 2 vc-type vlan l # return
PE2的配置文件
# sysname PE2 # mpls lsr-id 4.4.4.4 mpls mpls te label advertise non-null mpls rsvp-te mpls oam mpls te cspf # mpls l2vpn # pw-aps 2 # explicit-path 4to2 next hop 10.1.4.1 next hop 2.2.2.2 # explicit-path 4to3 next hop 10.1.5.1 next hop 3.3.3.3 # mpls ldp # mpls ldp remote-peer 2.2.2.2 remote-ip 2.2.2.2 # mpls ldp remote-peer 3.3.3.3 remote-ip 3.3.3.3 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.4.2 255.255.255.0 mpls mpls te mpls rsvp-te mpls ldp # interface GigabitEthernet1/0/1 undo shutdown ip address 10.1.5.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/2 undo shutdown # interface GigabitEthernet1/0/2.1 vlan-type dot1q 10 mpls l2vc 2.2.2.2 3 tunnel-policy policy1 control-word mpls l2vc 3.3.3.3 4 tunnel-policy policy1 control-word secondary mpls l2vpn pw-aps 2 admin # interface LoopBack0 ip address 4.4.4.4 255.255.255.255 # interface Tunnel10 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 3.3.3.3 mpls te tunnel-id 400 mpls te reverse-lsp protocol rsvp-te ingress-lsr-id 3.3.3.3 tunnel-id 400 mpls te path explicit-path 4to3 mpls te reserved-for-binding # interface Tunnel11 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 2.2.2.2 mpls te tunnel-id 300 mpls te reverse-lsp protocol rsvp-te ingress-lsr-id 2.2.2.2 tunnel-id 300 mpls te path explicit-path 4to2 mpls te reserved-for-binding # ospf 1 opaque-capability enable area 0.0.0.0 network 10.1.4.0 0.0.0.255 network 10.1.5.0 0.0.0.255 network 4.4.4.4 0.0.0.0 mpls-te enable # tunnel-policy policy1 tunnel binding destination 2.2.2.2 te Tunnel11 tunnel binding destination 3.3.3.3 te Tunnel10 # mpls-oam mpls oam l2vc peer-ip 2.2.2.2 vc-id 3 vc-type vlan remote-peer-ip 1.1.1.1 remote-vc-id 1 remote-vc-type vlan type cv auto-protocol mpls oam l2vc peer-ip 3.3.3.3 vc-id 4 vc-type vlan remote-peer-ip 1.1.1.1 remote-vc-id 2 remote-vc-type vlan type cv auto-protocol mpls oam l2vc enable receive peer-ip 2.2.2.2 vc-id 3 vc-type vlan mpls oam l2vc enable send peer-ip 2.2.2.2 vc-id 3 vc-type vlan mpls oam l2vc enable receive peer-ip 3.3.3.3 vc-id 4 vc-type vlan mpls oam l2vc enable send peer-ip 3.3.3.3 vc-id 4 vc-type vlan # return
SPE1的配置文件
# sysname SPE1 # mpls lsr-id 2.2.2.2 mpls mpls te label advertise non-null mpls rsvp-te mpls te cspf # mpls l2vpn # mpls switch-l2vc 4.4.4.4 3 tunnel-policy policy1 between 1.1.1.1 1 tunnel-policy policy1 encapsulation vlan # explicit-path 2to1 next hop 10.1.2.1 next hop 1.1.1.1 # explicit-path 2to4 next hop 10.1.4.2 next hop 4.4.4.4 # mpls ldp # mpls ldp remote-peer 1.1.1.1 remote-ip 1.1.1.1 # mpls ldp remote-peer 4.4.4.4 remote-ip 4.4.4.4 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.2.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/1 undo shutdown ip address 10.1.4.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface LoopBack0 ip address 2.2.2.2 255.255.255.255 # interface Tunnel10 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 1.1.1.1 mpls te tunnel-id 100 mpls te reverse-lsp protocol rsvp-te ingress-lsr-id 1.1.1.1 tunnel-id 100 mpls te path explicit-path 2to1 mpls te reserved-for-binding # interface Tunnel11 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 4.4.4.4 mpls te tunnel-id 300 mpls te reverse-lsp protocol rsvp-te ingress-lsr-id 4.4.4.4 tunnel-id 300 mpls te path explicit-path 2to4 mpls te reserved-for-binding # ospf 1 opaque-capability enable area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 10.1.4.0 0.0.0.255 network 10.1.2.0 0.0.0.255 mpls-te enable # tunnel-policy policy1 tunnel binding destination 1.1.1.1 te Tunnel10 tunnel binding destination 4.4.4.4 te Tunnel11 # return
SPE2的配置文件
# sysname SPE2 # mpls lsr-id 3.3.3.3 mpls mpls te label advertise non-null mpls rsvp-te mpls te cspf # mpls l2vpn # mpls switch-l2vc 4.4.4.4 4 tunnel-policy policy1 between 1.1.1.1 2 tunnel-policy policy1 encapsulation vlan control-word-transparent # explicit-path 3to1 next hop 10.1.3.1 next hop 1.1.1.1 # explicit-path 3to4 next hop 10.1.5.2 next hop 4.4.4.4 # mpls ldp # mpls ldp remote-peer 1.1.1.1 remote-ip 1.1.1.1 # mpls ldp remote-peer 4.4.4.4 remote-ip 4.4.4.4 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.3.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/1 undo shutdown ip address 10.1.5.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface LoopBack0 ip address 3.3.3.3 255.255.255.255 # interface Tunnel10 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 4.4.4.4 mpls te tunnel-id 400 mpls te reverse-lsp protocol rsvp-te ingress-lsr-id 4.4.4.4 tunnel-id 400 mpls te path explicit-path 3to4 mpls te reserved-for-binding # interface Tunnel11 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 1.1.1.1 mpls te tunnel-id 200 mpls te reverse-lsp protocol rsvp-te ingress-lsr-id 1.1.1.1 tunnel-id 200 mpls te path explicit-path 3to1 mpls te reserved-for-binding # ospf 1 opaque-capability enable area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 10.1.3.0 0.0.0.255 network 10.1.4.0 0.0.0.255 network 10.1.5.0 0.0.0.255 mpls-te enable # tunnel-policy policy1 tunnel binding destination 1.1.1.1 te Tunnel11 tunnel binding destination 4.4.4.4 te Tunnel10 # return
CE2的配置文件
# sysname CE2 # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 # interface Eth-Trunk10 portswitch port trunk allow-pass vlan 10 mode lacp-static # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 10 # interface GigabitEthernet1/0/1 undo shutdown eth-trunk 10 # return