Example for Configuring Connecting an E-Trunk to a VPLS Network
Networking Requirements
If no E-Trunk is configured, a CE can be connected to only one PE using an Eth-Trunk link. If the Eth-Trunk or PE fails, the CE cannot communicate with the PE. After an E-Trunk is configured, the CE can be dual homed to PEs, improving link reliability between devices.
In Figure 3-28, CE1 is dual homed to PE1 and PE2 using two Eth-Trunks in LACP mode and connected to a VPLS network.
CE1 communicates with CE2 on the VPLS network through PE1. If PE1 or the Eth-Trunk link between CE1 and PE1 fails, CE1 cannot communicate with CE2. To prevent service interruptions, configure an E-Trunk on PE1 and PE2. When communication between CE1 and PE1 fails, traffic is switched to PE2 so that CE1 can communicate with CE2 through PE2. When PE1 or the Eth-Trunk link between CE1 and PE1 recovers, traffic is switched back to PE1.
The E-Trunk implements backup of LAGs between PE1 and PE2 and improves network reliability.
Switch |
Interface |
VLANIF interface |
IP Address |
---|---|---|---|
PE1 |
GigabitEthernet1/0/1 |
- |
- |
GigabitEthernet1/0/2 |
- |
- |
|
GigabitEthernet1/0/3 |
VLANIF 100 |
10.1.1.1/24 |
|
Loopback1 |
- |
1.1.1.9/32 |
|
PE2 |
GigabitEthernet1/0/1 |
- |
- |
GigabitEthernet1/0/2 |
- |
- |
|
GigabitEthernet1/0/3 |
VLANIF 200 |
10.1.2.1/24 |
|
Loopback1 |
- |
2.2.2.9/32 |
|
PE3 |
GigabitEthernet1/0/1 |
VLANIF 100 |
10.1.1.2/24 |
GigabitEthernet1/0/2 |
VLANIF 200 |
10.1.2.2/24 |
|
GigabitEthernet1/0/3 |
GigabitEthernet1/0/3.1 |
- |
|
Loopback1 |
- |
3.3.3.9/32 |
|
CE1 |
GigabitEthernet1/0/1 |
- |
- |
GigabitEthernet1/0/2 |
- |
- |
|
GigabitEthernet1/0/3 |
- |
- |
|
GigabitEthernet1/0/4 |
- |
- |
|
CE2 |
GigabitEthernet1/0/3 |
- |
- |
Configuration Roadmap
The configuration roadmap is as follows:
Configure an E-Trunk as follows:
Create Eth-Trunks in LACP mode between CE1 and PE1, and between CE1 and PE2. Add member interfaces to the Eth-Trunks.
Create an E-Trunk on PE1 and PE2 and add the two Eth-Trunks to the E-Trunk.
Set the following parameters of the E-Trunk:
E-Trunk priority
LACP system ID and LACP priority
Interval for sending hello packets
Time multiplier for detecting hello packets
IP addresses of the local and remote devices
- Bind the E-Trunk to a BFD session.
- Configure PEs so that CE1 can access the VPLS network.
Configure a routing protocol on the backbone network to ensure that devices can communicate with each other.
Configure basic MPLS functions and the Label Distribution Protocol (LDP).
Enable MPLS L2VPN on the PEs.
Configure a virtual service instance (VSI) and specify LDP as the signaling protocol.
Create Eth-Trunk sub-interfaces and bind the VSI to the sub-interfaces.
Procedure
- Configure VLANs and IP addresses on pseudo wire (PW) side
interfaces. Configure a routing protocol on the backbone network to
ensure that devices can communicate with each other. The OSPF protocol
is used in this example.
# Configure PE1.
<HUAWEI> system-view [HUAWEI] sysname PE1 [PE1] vlan batch 100 [PE1] interface gigabitethernet 1/0/3 [PE1-GigabitEthernet1/0/3] port link-type trunk [PE1-GigabitEthernet1/0/3] port trunk allow-pass vlan 100 [PE1-GigabitEthernet1/0/3] quit [PE1] interface vlanif 100 [PE1-Vlanif100] ip address 10.1.1.1 24 [PE1-Vlanif100] quit [PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.9 32 [PE1-LoopBack1] quit [PE1] ospf 1 [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit
# Configure PE2.
<HUAWEI> system-view [HUAWEI] sysname PE2 [PE2] vlan batch 200 [PE2] interface gigabitethernet 1/0/3 [PE2-GigabitEthernet1/0/3] port link-type trunk [PE2-GigabitEthernet1/0/3] port trunk allow-pass vlan 200 [PE2-GigabitEthernet1/0/3] quit [PE2] interface vlanif 200 [PE2-Vlanif200] ip address 10.1.2.1 24 [PE2-Vlanif200] quit [PE2] interface loopback 1 [PE2-LoopBack1] ip address 2.2.2.9 32 [PE2-LoopBack1] quit [PE2] ospf 1 [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 10.1.2.1 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit
# Configure PE3.
<HUAWEI> system-view [HUAWEI] sysname PE3 [PE3] vlan batch 100 200 [PE3] interface gigabitethernet 1/0/1 [PE3-GigabitEthernet1/0/1] port link-type trunk [PE3-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 [PE3-GigabitEthernet1/0/1] quit [PE3] interface gigabitethernet 1/0/2 [PE3-GigabitEthernet1/0/2] port link-type trunk [PE3-GigabitEthernet1/0/2] port trunk allow-pass vlan 200 [PE3-GigabitEthernet1/0/2] quit [PE3] interface vlanif 100 [PE3-Vlanif100] ip address 10.1.1.2 24 [PE3-Vlanif100] quit [PE3] interface vlanif 200 [PE3-Vlanif200] ip address 10.1.2.2 24 [PE3-Vlanif200] quit [PE3] interface loopback 1 [PE3-LoopBack1] ip address 3.3.3.9 32 [PE3-LoopBack1] quit [PE3] ospf 1 [PE3-ospf-1] area 0 [PE3-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0 [PE3-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255 [PE3-ospf-1-area-0.0.0.0] network 10.1.2.2 0.0.0.255 [PE3-ospf-1-area-0.0.0.0] quit [PE3-ospf-1] quit
After the configuration is complete, PE1, PE2, and PE3 use OSPF to discover IP routes to Loopback1 of one another, and they can ping each other. Run the display ip routing-table command on PE1, PE2, and PE3 to verify that the PEs have learned the routes to one another.
- Do not add the attachment circuit (AC) side interface and PW side interface of a PE to the same VLAN. If they are added to the same VLAN, a loop may occur.
- When using OSPF, configure PE1, PE2, and PE3 to advertise 32-bit loopback addresses.
- Configure Eth-Trunks in LACP mode on CE1, PE1, and PE2, and add member interfaces to the Eth-Trunks. Configure Layer 2 forwarding
on CE1.
# Configure CE1.
<HUAWEI> system-view [HUAWEI] sysname CE1 [CE1] vlan batch 10 [CE1] interface eth-trunk 20 [CE1-Eth-Trunk20] port link-type trunk [CE1-Eth-Trunk20] port trunk allow-pass vlan 10 [CE1-Eth-Trunk20] mode lacp [CE1-Eth-Trunk20] trunkport GigabitEthernet 1/0/1 to 1/0/4 [CE1-Eth-Trunk20] quit
# Configure PE1.
[PE1] interface eth-trunk 10 [PE1-Eth-Trunk10] port link-type trunk [PE1-Eth-Trunk10] mode lacp [PE1-Eth-Trunk10] trunkport GigabitEthernet 1/0/1 to 1/0/2 [PE1-Eth-Trunk10] quit
# Configure PE2.
[PE2] interface eth-trunk 10 [PE2-Eth-Trunk10] port link-type trunk [PE2-Eth-Trunk10] mode lacp [PE2-Eth-Trunk10] trunkport GigabitEthernet 1/0/1 to 1/0/2 [PE2-Eth-Trunk10] quit
- Create an E-Trunk and set the LACP priority, LACP system
ID, E-Trunk priority, local and remote IP addresses, time multiplier
for detecting hello packets, and interval for sending hello packets.
# Configure PE1.
[PE1] e-trunk 1 [PE1-e-trunk-1] quit [PE1] lacp e-trunk priority 1 [PE1] lacp e-trunk system-id 00E0-FC00-0000 [PE1] e-trunk 1 [PE1-e-trunk-1] priority 10 [PE1-e-trunk-1] timer hold-on-failure multiplier 3 [PE1-e-trunk-1] timer hello 9 [PE1-e-trunk-1] peer-address 2.2.2.9 source-address 1.1.1.9 [PE1-e-trunk-1] quit
# Configure PE2.
[PE2] e-trunk 1 [PE2-e-trunk-1] quit [PE2] lacp e-trunk priority 1 [PE2] lacp e-trunk system-id 00E0-FC00-0000 [PE2] e-trunk 1 [PE2-e-trunk-1] priority 20 [PE2-e-trunk-1] timer hold-on-failure multiplier 3 [PE2-e-trunk-1] timer hello 9 [PE2-e-trunk-1] peer-address 1.1.1.9 source-address 2.2.2.9 [PE2-e-trunk-1] quit
- Add the Eth-Trunks to the E-Trunk.
# Configure PE1.
[PE1] interface eth-trunk 10 [PE1-Eth-Trunk10] e-trunk 1 [PE1-Eth-Trunk10] quit
# Configure PE2.
[PE2] interface eth-trunk 10 [PE2-Eth-Trunk10] e-trunk 1 [PE2-Eth-Trunk10] quit
- Bind the E-Trunk to a BFD session.
Create a BFD session.
# Configure PE1.
[PE1] bfd [PE1-bfd] quit [PE1] bfd hello1 bind peer-ip 2.2.2.9 source-ip 1.1.1.9 [PE1-bfd-session-hello1] discriminator local 1 [PE1-bfd-session-hello1] discriminator remote 2 [PE1-bfd-session-hello1] commit [PE1-bfd-session-hello1] quit
The IP addresses of the local and remote devices of a BFD session must be the same as those of the E-Trunk.
# Configure PE2.
[PE2] bfd [PE2-bfd] quit [PE2] bfd hello2 bind peer-ip 1.1.1.9 source-ip 2.2.2.9 [PE2-bfd-session-hello2] discriminator local 2 [PE2-bfd-session-hello2] discriminator remote 1 [PE2-bfd-session-hello2] commit [PE2-bfd-session-hello2] quit
Bind E-Trunk 1 to the BFD session.
# Configure PE1.
[PE1] e-trunk 1 [PE1-e-trunk-1] e-trunk track bfd-session session-name hello1 [PE1-e-trunk-1] quit
# Configure PE2.
[PE2] e-trunk 1 [PE2-e-trunk-1] e-trunk track bfd-session session-name hello2 [PE2-e-trunk-1] quit
- Configure PEs so that CE1 can access the VPLS network.
Configure basic MPLS functions and LDP on PE1, PE2, and PE3.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface vlanif 100 [PE1-Vlanif100] mpls [PE1-Vlanif100] mpls ldp [PE1-Vlanif100] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.9 [PE2] mpls [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface vlanif 200 [PE2-Vlanif200] mpls [PE2-Vlanif200] mpls ldp [PE2-Vlanif200] quit
# Configure PE3.
[PE3] mpls lsr-id 3.3.3.9 [PE3] mpls [PE3-mpls] quit [PE3] mpls ldp [PE3-mpls-ldp] quit [PE3] interface vlanif 100 [PE3-Vlanif100] mpls [PE3-Vlanif100] mpls ldp [PE3-Vlanif100] quit [PE3] interface vlanif 200 [PE3-Vlanif200] mpls [PE3-Vlanif200] mpls ldp [PE3-Vlanif200] quit
After the configuration is complete, run the display mpls ldp session command on the PEs. You can see that the LDP session status is Operational, indicating that LDP sessions have been set up.
Enable MPLS L2VPN on PE1, PE2, and PE3.
# Configure PE1.
[PE1] mpls l2vpn [PE1-l2vpn] quit
# Configure PE2.
[PE2] mpls l2vpn [PE2-l2vpn] quit
# Configure PE3.
[PE3] mpls l2vpn [PE3-l2vpn] quit
Create VSI ldp1 on PE1, PE2, and PE3 and specify LDP as the signaling protocol in the VSI.
# Configure PE1.
[PE1] vsi ldp1 static [PE1-vsi-ldp1] pwsignal ldp [PE1-vsi-ldp1-ldp] vsi-id 2 [PE1-vsi-ldp1-ldp] peer 3.3.3.9 [PE1-vsi-ldp1-ldp] quit [PE1-vsi-ldp1] quit
# Configure PE2.
[PE2] vsi ldp1 static [PE2-vsi-ldp1] pwsignal ldp [PE2-vsi-ldp1-ldp] vsi-id 2 [PE2-vsi-ldp1-ldp] peer 3.3.3.9 [PE2-vsi-ldp1-ldp] quit [PE2-vsi-ldp1] quit
# Configure PE3.
[PE3] vsi ldp1 static [PE3-vsi-ldp1] pwsignal ldp [PE3-vsi-ldp1-ldp] vsi-id 2 [PE3-vsi-ldp1-ldp] peer 1.1.1.9 [PE3-vsi-ldp1-ldp] peer 2.2.2.9 [PE3-vsi-ldp1-ldp] quit [PE3-vsi-ldp1] quit
Configure an Eth-Trunk sub-interface on PE1 and PE2, and bind the VSI to the Eth-Trunk sub-interface.
# Configure PE1.
[PE1] interface Eth-Trunk 10.1 [PE1-Eth-Trunk10.1] dot1q termination vid 10 [PE1-Eth-Trunk10.1] l2 binding vsi ldp1 [PE1-Eth-Trunk10.1] quit
# Configure PE2.
[PE2] interface Eth-Trunk 10.1 [PE2-Eth-Trunk10.1] dot1q termination vid 10 [PE2-Eth-Trunk10.1] l2 binding vsi ldp1 [PE2-Eth-Trunk10.1] quit
Configure a Dot1q sub-interface on PE3, and bind the VSI to the sub-interface.
# Configure PE3.
[PE3] interface gigabitethernet 1/0/3.1 [PE3-GigabitEthernet1/0/3.1] dot1q termination vid 10 [PE3-GigabitEthernet1/0/3.1] l2 binding vsi ldp1 [PE3-GigabitEthernet1/0/3.1] quit
- Verify the configuration.
# Run the display eth-trunk command on CE1 to check the Eth-Trunk configuration.
# Run the display e-trunk command to check E-Trunk information.
# Check information about E-Trunk 1 on PE1.
[PE1] display e-trunk 1 The E-Trunk information E-TRUNK-ID : 1 Revert-Delay-Time (s) : 120 Priority : 10 System-ID : 00e0-0f74-eb00 Peer-IP : 2.2.2.9 Source-IP : 1.1.1.9 State : Master Causation : PRI Send-Period (100ms) : 9 Fail-Time (100ms) : 27 Receive : 41 Send : 42 RecDrop : 0 SndDrop : 0 Peer-Priority : 20 Peer-System-ID : 00e0-3b6c-6100 Peer-Fail-Time (100ms) : 27 BFD-Session : hello1 Description : - Sequence : Disable -------------------------------------------------------------------------------- The Member information Type ID LocalPhyState Work-Mode State Causation Remote-ID Eth-Trunk 10 Up auto Master ETRUNK_MASTER 10
# Check information about E-Trunk 1 on PE2.
[PE2] display e-trunk 1 The E-Trunk information E-TRUNK-ID : 1 Revert-Delay-Time (s) : 120 Priority : 20 System-ID : 00e0-3b6c-6100 Peer-IP : 1.1.1.9 Source-IP : 2.2.2.9 State : Backup Causation : PRI Send-Period (100ms) : 9 Fail-Time (100ms) : 27 Receive : 43 Send : 42 RecDrop : 3 SndDrop : 0 Peer-Priority : 10 Peer-System-ID : 00e0-0f74-eb00 Peer-Fail-Time (100ms) : 27 BFD-Session : hello2 Description : - Sequence : Disable -------------------------------------------------------------------------------- The Member information Type ID LocalPhyState Work-Mode State Causation Remote-ID Eth-Trunk 10 Down auto Backup ETRUNK_BACKUP 10
According to the preceding information, the E-Trunk priority value on PE1 is 10 and the E-Trunk status is Master; the E-Trunk priority value on PE2 is 20 and the E-Trunk status is Backup. Link backup is achieved.
Configuration Files
CE1 configuration file
# sysname CE1 # vlan batch 10 # interface Eth-Trunk20 port link-type trunk port trunk allow-pass vlan 10 mode lacp # interface GigabitEthernet1/0/1 eth-trunk 20 # interface GigabitEthernet1/0/2 eth-trunk 20 # interface GigabitEthernet1/0/3 eth-trunk 20 # interface GigabitEthernet1/0/4 eth-trunk 20 # return
PE1 configuration file
# sysname PE1 # vlan batch 100 # lacp e-trunk system-id 00e0-fc00-0000 lacp e-trunk priority 1 # bfd # mpls lsr-id 1.1.1.9 mpls # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 3.3.3.9 # mpls ldp # interface Vlanif100 ip address 10.1.1.1 255.255.255.0 mpls mpls ldp # e-trunk 1 priority 10 peer-address 2.2.2.9 source-address 1.1.1.9 timer hello 9 timer hold-on-failure multiplier 3 e-trunk track bfd-session session-name hello1 # interface Eth-Trunk10 port link-type trunk mode lacp e-trunk 1 # interface Eth-Trunk10.1 dot1q termination vid 10 l2 binding vsi ldp1 # interface GigabitEthernet1/0/1 eth-trunk 10 # interface GigabitEthernet1/0/2 eth-trunk 10 # interface GigabitEthernet1/0/3 port link-type trunk port trunk allow-pass vlan 100 # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # bfd hello1 bind peer-ip 2.2.2.9 source-ip 1.1.1.9 discriminator local 1 discriminator remote 2 commit # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.1.0 0.0.0.255 # return
PE2 configuration file
# sysname PE2 # vlan batch 200 # lacp e-trunk system-id 00e0-fc00-0000 lacp e-trunk priority 1 # bfd # mpls lsr-id 2.2.2.9 mpls # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 3.3.3.9 # mpls ldp # interface Vlanif200 ip address 10.1.2.1 255.255.255.0 mpls mpls ldp # e-trunk 1 priority 20 peer-address 1.1.1.9 source-address 2.2.2.9 timer hello 9 timer hold-on-failure multiplier 3 e-trunk track bfd-session session-name hello2 # interface Eth-Trunk10 port link-type trunk mode lacp e-trunk 1 # interface Eth-Trunk10.1 dot1q termination vid 10 l2 binding vsi ldp1 # interface GigabitEthernet1/0/1 eth-trunk 10 # interface GigabitEthernet1/0/2 eth-trunk 10 # interface GigabitEthernet1/0/3 port link-type trunk port trunk allow-pass vlan 200 # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # bfd hello2 bind peer-ip 1.1.1.9 source-ip 2.2.2.9 discriminator local 2 discriminator remote 1 commit # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 10.1.2.0 0.0.0.255 # return
PE3 configuration file
# sysname PE3 # vlan batch 100 200 # mpls lsr-id 3.3.3.9 mpls # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 1.1.1.9 peer 2.2.2.9 # mpls ldp # interface Vlanif100 ip address 10.1.1.2 255.255.255.0 mpls mpls ldp # interface Vlanif200 ip address 10.1.2.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet1/0/1 port link-type trunk port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/2 port link-type trunk port trunk allow-pass vlan 200 # interface GigabitEthernet1/0/3.1 dot1q termination vid 10 l2 binding vsi ldp1 # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.1.2.0 0.0.0.255 # return