配置PE通过PWE3单归接入SPE的多段PW的PW Redundancy示例
在PE单归接入SPE的多段PW的PW Redundancy场景中,SPE上配置主从模式的交换PW。
组网需求
如图9-40所示,PE1通过SPE双归接入到PE2和PE3。在公网链路故障、PE2或PE3节点故障、AC链路故障时,CE1和CE2仍然能够互通。
本例中interface1、interface2、interface3、interface1.1分别代表GE1/0/0,GE1/0/1,GE1/0/2,GE1/0/0.1。
。
配置思路
采用如下的思路配置PE单归接入SPE的多段PW的PW Redundancy:
配置IP地址和路由,具体包括:
配置PE和SPE的接口IP地址。
配置PE和SPE的IGP路由协议。
配置MPLS和公网隧道,具体包括:
配置PE和SPE的MPLS基本功能。
配置公网隧道。
配置PE和SPE的OSPF TE功能。
配置业务多段PW。
操作步骤
- 配置各接口的IP地址和路由协议
按照图9-40配置各接口的IP地址和掩码,具体配置过程略。
本举例使用OSPF路由协议,具体配置过程略。
- 配置MPLS基本能力,SPE和PE1、PE2、PE3之间配置MPLS TE隧道,PE2和PE3之间配置LDP-LSP隧道
- 配置公网业务PW
- 配置Eth-Trunk
# 配置PE2。
[~PE2] interface gigabitethernet 1/0/2
[*PE2-GigabitEthernet1/0/2] undo shutdown
[*PE2-GigabitEthernet1/0/2] quit
[*PE2] interface eth-trunk 10
[*PE2-Eth-Trunk10] mode lacp-static
[*PE2-Eth-Trunk10] trunkport gigabitethernet 1/0/2
[*PE2-Eth-Trunk10] quit
[*PE2] lacp e-trunk system-id 00e0-fc00-0000
[*PE2] lacp e-trunk priority 100
[*PE2] e-trunk 10
[*PE2-e-trunk-10] priority 10
[*PE2-e-trunk-10] peer-address 4.4.4.4 source-address 3.3.3.3
[*PE2-e-trunk-10] quit
[*PE2] interface eth-trunk 10
[*PE2-Eth-Trunk10] e-trunk 10
[*PE2-Eth-Trunk10] quit
[*PE2] commit
PE3与PE2配置类似,请参考配置文件。
- 检查配置结果
# CE1与CE2的配置请参考配置文件。
CE1 ping CE2的VLANIF接口地址。
[*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 # mpls lsr-id 1.1.1.1 # mpls mpls te mpls rsvp-te # mpls l2vpn # explicit-path tospe next hop 10.1.2.2 next hop 2.2.2.2 # mpls ldp # mpls ldp remote-peer 2.2.2.2 remote-ip 2.2.2.2 # 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 # interface GigabitEthernet1/0/1 undo shutdown ip address 10.1.2.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # interface Tunnel101 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 2.2.2.2 mpls te tunnel-id 100 mpls te path explicit-path tospe mpls te reserved-for-binding # ospf 1 opaque-capability enable area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 10.1.2.0 0.0.0.255 mpls-te enable # tunnel-policy policy1 tunnel binding destination 2.2.2.2 te Tunnel101 # return
SPE的配置文件
# sysname SPE # mpls lsr-id 2.2.2.2 # mpls mpls te mpls rsvp-te mpls te cspf # mpls l2vpn # mpls switch-l2vc 1.1.1.1 1 tunnel-policy policy1 between 3.3.3.3 2 tunnel-policy policy1 backup 4.4.4.4 3 tunnel-policy policy1 independent encapsulation vlan # explicit-path tope1 next hop 10.1.2.1 next hop 1.1.1.1 # explicit-path tope2 next hop 10.1.3.2 next hop 3.3.3.3 # explicit-path tope3 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 3.3.3.3 remote-ip 3.3.3.3 # 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.3.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/2 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 Tunnel100 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 1.1.1.1 mpls te tunnel-id 100 mpls te path explicit-path tope1 mpls te reserved-for-binding # interface Tunnel101 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 3.3.3.3 mpls te tunnel-id 200 mpls te path explicit-path tope2 mpls te reserved-for-binding # interface Tunnel102 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 4.4.4.4 mpls te tunnel-id 300 mpls te path explicit-path tope3 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.2.0 0.0.0.255 network 10.1.3.0 0.0.0.255 network 10.1.4.0 0.0.0.255 mpls-te enable # tunnel-policy policy1 tunnel binding destination 1.1.1.1 te Tunnel100 tunnel binding destination 3.3.3.3 te Tunnel101 tunnel binding destination 4.4.4.4 te Tunnel102 # return
PE2的配置文件
# sysname PE2 # lacp e-trunk system-id 00e0-fc00-0000 lacp e-trunk priority 100 # mpls lsr-id 3.3.3.3 # mpls mpls te mpls rsvp-te mpls te cspf # mpls l2vpn # explicit-path tospe next hop 10.1.3.1 next hop 2.2.2.2 # mpls ldp # mpls ldp remote-peer 2.2.2.2 remote-ip 2.2.2.2 # e-trunk 10 priority 10 peer-address 4.4.4.4 source-address 3.3.3.3 # interface Eth-Trunk10 mode lacp-static e-trunk 10 # interface Eth-Trunk10.1 vlan-type dot1q 10 mpls l2vc 2.2.2.2 2 tunnel-policy policy1 mpls l2vc 4.4.4.4 4 bypass # 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 ldp # interface GigabitEthernet1/0/2 undo shutdown eth-trunk 10 # interface LoopBack0 ip address 3.3.3.3 255.255.255.255 # interface Tunnel100 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 2.2.2.2 mpls te tunnel-id 200 mpls te path explicit-path tospe 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.5.0 0.0.0.255 mpls-te enable # tunnel-policy policy1 tunnel binding destination 2.2.2.2 te Tunnel100 # return
PE3的配置文件
# sysname PE3 # lacp e-trunk system-id 00e0-fc00-0000 lacp e-trunk priority 100 # mpls lsr-id 4.4.4.4 # mpls mpls te mpls rsvp-te mpls te cspf # mpls l2vpn # explicit-path tospe next hop 10.1.4.1 next hop 2.2.2.2 # mpls ldp # mpls ldp remote-peer 2.2.2.2 remote-ip 2.2.2.2 # e-trunk 10 priority 20 peer-address 3.3.3.3 source-address 4.4.4.4 # interface Eth-Trunk10 mode lacp-static e-trunk 10 # interface Eth-Trunk10.1 vlan-type dot1q 10 mpls l2vc 2.2.2.2 3 tunnel-policy policy1 mpls l2vc 3.3.3.3 4 bypass # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.4.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/1 undo shutdown ip address 10.1.5.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet1/0/2 undo shutdown eth-trunk 10 # interface LoopBack0 ip address 4.4.4.4 255.255.255.255 # interface Tunnel100 ip address unnumbered interface LoopBack0 tunnel-protocol mpls te destination 2.2.2.2 mpls te tunnel-id 300 mpls te path explicit-path tospe mpls te reserved-for-binding # ospf 1 opaque-capability enable area 0.0.0.0 network 4.4.4.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 2.2.2.2 te Tunnel100 # return
CE2的配置文件
# sysname CE2 # vlan batch 10 # 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