Link Aggregation Configuration
- Example for Configuring Link Aggregation in Manual Mode When Switches Are Directly Connected
- Example for Configuring Link Aggregation in LACP Mode When Switches Are Directly Connected
- Example for Connecting an E-Trunk to a VPLS Network
- Example for Configuring an Eth-Trunk to Preferentially Forward Local Trafficin a CSS or Stack
- Example for Configuring an Eth-Trunk and Association Between VRRP and the Interface Status
Example for Configuring Link Aggregation in Manual Mode When Switches Are Directly Connected
Overview
Ethernet link aggregation increases link bandwidth by bundling multiple physical links to form a logical link. Link aggregation can work in manual mode or Link Aggregation Control Protocol (LACP) mode.
In manual mode, you must manually create an Eth-Trunk and add member interfaces to the Eth-Trunk. In this mode, LACP is not required. If a high link bandwidth between two directly connected devices is required but the remote device does not support LACP, you can use the manual mode. The manual mode can increase bandwidth, enhance reliability, and implement load balancing.
In manual mode, all active links forward data and load balance traffic.
Configuration Notes
- Member interfaces of an Eth-Trunk must use the same Ethernet type and rate.
- Both devices of the Eth-Trunk must use the same number of physical interfaces, interface rate, duplex mode, and flow control mode.
- If an interface of the local device is added to an Eth-Trunk, an interface of the remote device directly connected to the interface of the local device must also be added to an Eth-Trunk. Otherwise, the two ends cannot communicate.
- Both devices of an Eth-Trunk must use the same link aggregation mode.
- This example applies to all versions of all S series switches.
Networking Requirements
In Figure 3-74, SwitchA and SwitchB connect to devices in VLAN 10 and VLAN 20 through Ethernet links, and heavy traffic is transmitted between SwitchA and SwitchB.
SwitchA and SwitchB can provide higher link bandwidth to implement inter-VLAN communication. Data transmission and link reliability need to be ensured.
Configuration Roadmap
The configuration roadmap is as follows:
Create an Eth-Trunk and add member interfaces to the Eth-Trunk to increase link bandwidth.
Create VLANs and add interfaces to the VLANs.
Set the load balancing mode to ensure that traffic is load balanced between member interfaces of the Eth-Trunk and enhance reliability.
Procedure
- Create an Eth-Trunk on SwitchA and SwitchB and add member
interfaces to the Eth-Trunk.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] interface eth-trunk 1 //Create Eth-Trunk 1. [SwitchA-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3 //Add GE0/0/1, GE0/0/2, and GE0/0/3 to Eth-Trunk 1. [SwitchA-Eth-Trunk1] quit
<HUAWEI> system-view [HUAWEI] sysname SwitchB [SwitchB] interface eth-trunk 1 //Create Eth-Trunk 1. [SwitchB-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3 //Add GE0/0/1, GE0/0/2, and GE0/0/3 to Eth-Trunk 1. [SwitchB-Eth-Trunk1] quit
- Create VLANs and add interfaces to the VLANs.
# Create VLAN 10 and VLAN 20 and add interfaces to them. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] vlan batch 10 20 [SwitchA] interface gigabitethernet 0/0/4 [SwitchA-GigabitEthernet0/0/4] port link-type trunk //Configure the interface as a trunk interface. The default link type of an interface is not trunk. [SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 10 [SwitchA-GigabitEthernet0/0/4] quit [SwitchA] interface gigabitethernet 0/0/5 [SwitchA-GigabitEthernet0/0/5] port link-type trunk //Configure the interface as a trunk interface. The default link type of an interface is not trunk. [SwitchA-GigabitEthernet0/0/5] port trunk allow-pass vlan 20 [SwitchA-GigabitEthernet0/0/5] quit
# Configure Eth-Trunk 1 to allow packets from VLAN 10 and VLAN 20 to pass through. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] interface eth-trunk 1 [SwitchA-Eth-Trunk1] port link-type trunk //Configure the interface as a trunk interface. The default link type of an interface is not trunk. [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20 [SwitchA-Eth-Trunk1] quit
- Set the load balancing mode of Eth-Trunk 1. The configuration
of SwitchB is similar to the configuration of SwitchA, and is not
mentioned here.
[SwitchA] interface eth-trunk 1 [SwitchA-Eth-Trunk1] load-balance src-dst-mac //Configure load balancing based on the source and destination MAC addresses on Eth-Trunk 1. [SwitchA-Eth-Trunk1] quit
- Verify the configuration.
Run the display eth-trunk 1 command in any view to check whether the Eth-Trunk is created and whether member interfaces are added.
[SwitchA] display eth-trunk 1 Eth-Trunk1's state information is: WorkingMode: NORMAL Hash arithmetic: According to SA-XOR-DA Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8 Operate status: up Number Of Up Port In Trunk: 3 -------------------------------------------------------------------------------- PortName Status Weight GigabitEthernet0/0/1 Up 1 GigabitEthernet0/0/2 Up 1 GigabitEthernet0/0/3 Up 1
The preceding information shows that Eth-Trunk 1 contains three member interfaces: GigabitEthernet0/0/1, GigabitEthernet0/0/2, and GigabitEthernet0/0/3. The member interface status is Up and the value of Operate status of Eth-Trunk 1 is up.
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 10 20 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 load-balance src-dst-mac # interface GigabitEthernet0/0/1 eth-trunk 1 # interface GigabitEthernet0/0/2 eth-trunk 1 # interface GigabitEthernet0/0/3 eth-trunk 1 # interface GigabitEthernet0/0/4 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet0/0/5 port link-type trunk port trunk allow-pass vlan 20 # return
SwitchB configuration file
# sysname SwitchB # vlan batch 10 20 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 load-balance src-dst-mac # interface GigabitEthernet0/0/1 eth-trunk 1 # interface GigabitEthernet0/0/2 eth-trunk 1 # interface GigabitEthernet0/0/3 eth-trunk 1 # interface GigabitEthernet0/0/4 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet0/0/5 port link-type trunk port trunk allow-pass vlan 20 # return
Example for Configuring Link Aggregation in LACP Mode When Switches Are Directly Connected
Overview
Ethernet link aggregation increases link bandwidth by bundling multiple physical links to form a logical link. Link aggregation can work in manual mode or Link Aggregation Control Protocol (LACP) mode.
If a high link bandwidth between two directly connected devices is required and devices support LACP, the LACP mode is recommended. The LACP mode increases bandwidth, improves reliability, implements load balancing, enhances Eth-Trunk fault tolerance, and provides backup.
In LACP mode, some links are active links and other links are backup links. All the active links participate in data forwarding. If an active link becomes faulty, a backup link is selected to replace the faulty link. That is, the number of links participating in data forwarding remains unchanged.
Configuration Notes
- Member interfaces of an Eth-Trunk must use the same Ethernet type and rate.
- Both devices of the Eth-Trunk must use the same number of physical interfaces, interface rate, duplex mode, and flow control mode.
- If an interface of the local device is added to an Eth-Trunk, an interface of the remote device directly connected to the interface of the local device must also be added to an Eth-Trunk. Otherwise, the two ends cannot communicate.
- Both devices of an Eth-Trunk must use the same link aggregation mode.
- This example applies to all versions of all S series switches.
Networking Requirements
In Figure 3-75, SwitchA and SwitchB connect to devices in VLAN 10 and VLAN 20 through Ethernet links, and heavy traffic is transmitted between SwitchA and SwitchB. The link between SwitchA and SwitchB is required to provide high bandwidth to implement inter-VLAN communication. Link aggregation in LACP mode is configured on SwitchA and SwitchB to improve the bandwidth and reliability. The following requirements must be met:
Two active links implement load balancing.
One link functions as the backup link. When a fault occurs on an active link, the backup link replaces the faulty link to maintain reliable data transmission.
Devices in the same VLAN can communicate.
Configuration Roadmap
The configuration roadmap is as follows:
Create an Eth-Trunk and configure the Eth-Trunk to work in LACP mode to implement link aggregation.
Add member interfaces to the Eth-Trunk.
Set the LACP system priority and determine the Actor so that the Partner selects active interfaces based on the Actor interface priority.
Set the upper threshold for the number of active interfaces to improve reliability.
Set LACP interface priorities and determine active interfaces so that interfaces with higher priorities are selected as active interfaces.
Create VLANs and add interfaces to the VLANs.
Procedure
- Create Eth-Trunk 1 on SwitchA and configure Eth-Trunk 1 to work in LACP mode. The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] interface eth-trunk 1 //Create Eth-Trunk 1. [SwitchA-Eth-Trunk1] mode lacp //Configure link aggregation in LACP mode. [SwitchA-Eth-Trunk1] quit
- Add member interfaces to Eth-Trunk 1 on SwitchA. The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] eth-trunk 1 //Add GE0/0/1 to Eth-Trunk 1. [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] eth-trunk 1 //Add GE0/0/2 to Eth-Trunk 1. [SwitchA-GigabitEthernet0/0/2] quit [SwitchA] interface gigabitethernet 0/0/3 [SwitchA-GigabitEthernet0/0/3] eth-trunk 1 //Add GE0/0/3 to Eth-Trunk 1. [SwitchA-GigabitEthernet0/0/3] quit
- Set the LACP system priority of SwitchA to 100 so that SwitchA becomes the Actor.
[SwitchA] lacp priority 100 //The default LACP system priority is 32768. Change the LACP priority of SwitchA to be higher than that of SwitchB so that SwitchA functions as the Actor.
- On SwitchA, set the upper threshold for the number of active interfaces to 2.
[SwitchA] interface eth-trunk 1 [SwitchA-Eth-Trunk1] max active-linknumber 2 //The default upper threshold for the number of active interfaces in the LAG is 8. Change the upper threshold for the number of active interfaces to 2. [SwitchA-Eth-Trunk1] quit
- Set the LACP system priority and determine active links on SwitchA.
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] lacp priority 100 //The default LACP interface priority is 32768. Change the LACP priority of GE0/0/1 to 100 so that GE0/0/1 serves as the active interface. [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] lacp priority 100 //The default LACP interface priority is 32768. Change the LACP priority of GE0/0/2 to 100 so that GE0/0/2 serves as the active interface. [SwitchA-GigabitEthernet0/0/2] quit
- Create VLANs and add interfaces to the VLANs.
# Create VLAN 10 and VLAN 20 and add interfaces to them. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] vlan batch 10 20 [SwitchA] interface gigabitethernet 0/0/4 [SwitchA-GigabitEthernet0/0/4] port link-type trunk //Configure the interface as a trunk interface. The default link type of an interface is not trunk. [SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 10 [SwitchA-GigabitEthernet0/0/4] quit [SwitchA] interface gigabitethernet 0/0/5 [SwitchA-GigabitEthernet0/0/5] port link-type trunk //Configure the interface as a trunk interface. The default link type of an interface is not trunk. [SwitchA-GigabitEthernet0/0/5] port trunk allow-pass vlan 20 [SwitchA-GigabitEthernet0/0/5] quit
# Configure Eth-Trunk 1 to allow packets from VLAN 10 and VLAN 20 to pass through. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] interface eth-trunk 1 [SwitchA-Eth-Trunk1] port link-type trunk //Configure the interface as a trunk interface. The default link type of an interface is not trunk. [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20 [SwitchA-Eth-Trunk1] quit
- Verify the configuration.
# Check information about the Eth-Trunk on each Switch and check whether link negotiation is successful.
[SwitchA] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 WorkingMode: LACP Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP System Priority: 100 System ID: 00e0-fca8-0417 Least Active-linknumber: 1 Max Active-linknumber: 2 Operate status: up Number Of Up Port In Trunk: 2 -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight GigabitEthernet0/0/1 Selected 1GE 100 6145 2865 11111100 1 GigabitEthernet0/0/2 Selected 1GE 100 6146 2865 11111100 1 GigabitEthernet0/0/3 Unselect 1GE 32768 6147 2865 11100000 1 Partner: -------------------------------------------------------------------------------- ActorPortName SysPri SystemID PortPri PortNo PortKey PortState GigabitEthernet0/0/1 32768 00e0-fca6-7f85 32768 6145 2609 11111100 GigabitEthernet0/0/2 32768 00e0-fca6-7f85 32768 6146 2609 11111100 GigabitEthernet0/0/3 32768 00e0-fca6-7f85 32768 6147 2609 11110000
[SwitchB] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 WorkingMode: LACP Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP System Priority: 32768 System ID: 00e0-fca6-7f85 Least Active-linknumber: 1 Max Active-linknumber: 8 Operate status: up Number Of Up Port In Trunk: 2 -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight GigabitEthernet0/0/1 Selected 1GE 32768 6145 2609 11111100 1 GigabitEthernet0/0/2 Selected 1GE 32768 6146 2609 11111100 1 GigabitEthernet0/0/3 Unselect 1GE 32768 6147 2609 11110000 1 Partner: -------------------------------------------------------------------------------- ActorPortName SysPri SystemID PortPri PortNo PortKey PortState GigabitEthernet0/0/1 100 00e0-fca8-0417 100 6145 2865 11111100 GigabitEthernet0/0/2 100 00e0-fca8-0417 100 6146 2865 11111100 GigabitEthernet0/0/3 100 00e0-fca8-0417 32768 6147 2865 11100000
The preceding information shows that the LACP system priority of SwitchA is 100 and is higher than the LACP system priority of SwitchB. GigabitEthernet0/0/1 and GigabitEthernet0/0/2 are active interfaces and are in Selected state. GigabitEthernet0/0/3 is in Unselect state. In addition, load balancing and redundancy are implemented.
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 10 20 # lacp priority 100 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 mode lacp max active-linknumber 2 # interface GigabitEthernet0/0/1 eth-trunk 1 lacp priority 100 # interface GigabitEthernet0/0/2 eth-trunk 1 lacp priority 100 # interface GigabitEthernet0/0/3 eth-trunk 1 # interface GigabitEthernet0/0/4 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet0/0/5 port link-type trunk port trunk allow-pass vlan 20 # return
SwitchB configuration file
# sysname SwitchB # vlan batch 10 20 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 mode lacp # interface GigabitEthernet0/0/1 eth-trunk 1 # interface GigabitEthernet0/0/2 eth-trunk 1 # interface GigabitEthernet0/0/3 eth-trunk 1 # interface GigabitEthernet0/0/4 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet0/0/5 port link-type trunk port trunk allow-pass vlan 20 # return
Example for Connecting an E-Trunk to a VPLS Network
Overview
Enhanced Trunk (E-Trunk) is an extension to LACP (a link aggregation protocol for a single device) and implements link aggregation among multiple devices. E-Trunk achieves device-level link reliability but not card-level link reliability.
When a CE is dual-homed to a VPLS, VLL, or PWE3 network, an E-Trunk can be configured to protect the links between the CE and PEs and implement backup between PEs. If no E-Trunk is configured, a CE can be connected to only one PE using an Eth-Trunk. If the Eth-Trunk or the PE fails, the CE cannot communicate with the PE. After the E-Trunk is used, the CE can be dual-homed to two PEs to implement backup.
Configuration Notes
- Devices must use link aggregation in LACP mode.
In Figure 3-76, the E-Trunk configuration on PE1 and PE2 must be the same. The Eth-Trunks between PE1 and CE1 and between PE2 and CE1 must use the same rate and duplex mode (key values must be the same) and join the same E-Trunk. After the Eth-Trunks are added to the E-Trunk, ensure that the LACP priorities and system IDs of PE1 and PE2 are the same. On CE1, interfaces directly connected to PE1 and PE2 must be added to the same Eth-Trunk. The Eth-Trunk can have a different Eth-Trunk ID from that on the PEs. For example, the CE is configured with Eth-Trunk 20, while both PEs are configured with Eth-Trunk 10.
You must specify an IP address (loopback address recommended) for each PE to ensure Layer 3 connectivity. Ensure that the peer IP address of a PE is the local IP address of the other PE.
The E-Trunk must be bound to a BFD session.
You must set the same protocol packet password for PE1 and PE2.
- This example applies to the following products:
- S5700-HI, S5710-EI, S5720-EI, S5710-HI, S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H
- S6700-EI, S6720-EI, S6720S-EI, S6720-HI, S6730-H, S6730S-H
- S7703, S7706, S7712, S7703 PoE, S7706 PoE
- S9703, S9706, S9712
For the product models whose applicable versions are not listed above, see Table 1 in "Applicable Products and Versions" for details.
For details about software mappings, visit Hardware Center and select the desired product model.
The S5731-L and S5731S-L are remote units and do not support web-based management, YANG, or commands. They can be configured only through configuration delivery by the central device. For details, see "Simplified Architecture Configuration (the Solar System Solution)" in the S300, S500, S2700, S5700, and S6700 V200R023C00 Configuration Guide - Device Management.
Networking Requirements
If no E-Trunk is configured, a CE can be connected to only one PE using an Eth-Trunk. If the Eth-Trunk or the PE fails, the CE cannot communicate with the PE. After an E-Trunk is configured, the CE can be dual-homed to PEs. E-Trunk achieves device-level link reliability but not card-level link reliability.
In Figure 3-76, CE1 is connected to PE1 and PE2 using two Eth-Trunks in LACP mode and is dual-homed to a VPLS network.
Initially, CE1 communicates with CE2 on the VPLS network through PE1. If PE1 or the Eth-Trunk between CE1 and PE1 fails, CE1 cannot communicate with CE2. To prevent service interruption, 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 between CE1 and PE1 recovers, traffic is switched back to PE1.
The E-Trunk implements backup of link aggregation groups (LAGs) between PE1 and PE2 and therefore improves network reliability.
Switch |
Interface |
Layer 3 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.
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 in LACP mode to the E-Trunk.
Set E-Trunk parameters:
E-Trunk priority
LACP system ID and LACP priority of the E-Trunk
Interval at which Hello packets are sent
Time multiplier for detecting Hello packets
IP addresses of the local and remote ends
- Bind the E-Trunk to a BFD session.
- Configure CE1 to connect to the VPLS network as follows:
Configure a routing protocol on the backbone network to implement the interworking between devices.
Configure basic MPLS functions and LDP.
Enable MPLS L2VPN on PEs.
Configure a 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 the PW-side interfaces according to Figure 3-76. Configure a routing protocol on the backbone network to implement the interworking between devices. OSPF is used in this example.
# Configure aggregation switch 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.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit
# Configure aggregation switch 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.0 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit
# Configure aggregation switch 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.0 0.0.0.255 [PE3-ospf-1-area-0.0.0.0] network 10.1.2.0 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 each other's Loopback1 interface, and can ping one another. Run the display ip routing-table command on PE1, PE2, and PE3 to determine whether the PEs have learned the routes to one another.
- The AC-side interface and PW-side interface of a PE cannot be added to the same VLAN; otherwise, a loop may occur.
- When configuring OSPF, configure PE1, PE2, and PE3 to advertise 32-bit loopback addresses.
- Configure Eth-Trunks in LACP mode on user-side switch 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 //Create Eth-Trunk 20 and enter the view of Eth-Trunk 20. [CE1-Eth-Trunk20] port link-type trunk //Set the link type of the interface to trunk. [CE1-Eth-Trunk20] port trunk allow-pass vlan 10 //Add Eth-Trunk 20 to VLAN 10. [CE1-Eth-Trunk20] mode lacp //Configure Eth-Trunk 20 to work in LACP mode. [CE1-Eth-Trunk20] trunkport GigabitEthernet 1/0/1 to 1/0/4 //Add GE1/0/1 to GE1/0/4 to Eth-Trunk20. [CE1-Eth-Trunk20] quit
# Configure PE1.
[PE1] interface eth-trunk 10 //Create Eth-Trunk 10 and enter the view of Eth-Trunk 10. [PE1-Eth-Trunk10] port link-type trunk //Set the link type of the interface to trunk. [PE1-Eth-Trunk10] mode lacp //Configure Eth-Trunk 10 to work in LACP mode. [PE1-Eth-Trunk10] trunkport GigabitEthernet 1/0/1 to 1/0/2 //Add GE1/0/1 and GE1/0/2 to Eth-Trunk10. [PE1-Eth-Trunk10] quit
# Configure PE2.
[PE2] interface eth-trunk 10 //Create Eth-Trunk 10 and enter the view of Eth-Trunk 10. [PE2-Eth-Trunk10] port link-type trunk //Set the link type of the interface to trunk. [PE2-Eth-Trunk10] mode lacp //Configure Eth-Trunk 10 to work in LACP mode. [PE2-Eth-Trunk10] trunkport GigabitEthernet 1/0/1 to 1/0/2 //Add GE1/0/1 and GE1/0/2 to Eth-Trunk10. [PE2-Eth-Trunk10] quit
- Create an E-Trunk and set the LACP priority, LACP system ID, E-Trunk priority, time multiplier for detecting hello packets, interval at which hello packets are sent, and local and remote IP addresses.
# Configure PE1.
[PE1] e-trunk 1 //Create E-Trunk 1 and enter the view of E-Trunk 1. [PE1-e-trunk-1] quit [PE1] lacp e-trunk priority 1 //Set the LACP priority of E-Trunk 1 to 1. [PE1] lacp e-trunk system-id 00e0-fc12-3450 //Set the LACP system ID of E-Trunk 1 to 00e0-fc12-3450. [PE1] e-trunk 1 //Enter the view of E-Trunk 1. [PE1-e-trunk-1] priority 10 //Set the priority of E-Trunk 1 to 10. [PE1-e-trunk-1] timer hold-on-failure multiplier 3 //Set the time multiplier for detecting hello packets to 3. [PE1-e-trunk-1] timer hello 9 //Set the interval at which hello packets are sent to 9 ms. [PE1-e-trunk-1] peer-address 2.2.2.9 source-address 1.1.1.9 //Set the remote IP address to 2.2.2.9 and local IP address to 1.1.1.9. [PE1-e-trunk-1] quit
# Configure PE2.
[PE2] e-trunk 1 //Create E-Trunk 1 and enter the view of E-Trunk 1. [PE2-e-trunk-1] quit [PE2] lacp e-trunk priority 1 //Set the LACP priority of E-Trunk 1 to 1. [PE2] lacp e-trunk system-id 00e0-fc12-3450 //Set the LACP system ID of E-Trunk 1 to 00e0-fc12-3450. [PE2] e-trunk 1 //Enter the view of E-Trunk 1. [PE2-e-trunk-1] priority 20 //Set the priority of E-Trunk 1 to 20. [PE2-e-trunk-1] timer hold-on-failure multiplier 3 //Set the time multiplier for detecting hello packets to 3. [PE2-e-trunk-1] timer hello 9 //Set the interval at which hello packets are sent to 9 ms. [PE2-e-trunk-1] peer-address 1.1.1.9 source-address 2.2.2.9 //Set the remote IP address to 1.1.1.9 and local IP address to 2.2.2.9. [PE2-e-trunk-1] quit
- Add the Eth-Trunks in LACP mode to the E-Trunk.
# Configure PE1.
[PE1] interface eth-trunk 10 //Enter the view of Eth-Trunk 10. [PE1-Eth-Trunk10] e-trunk 1 //Add Eth-Trunk 10 to E-Trunk 1. [PE1-Eth-Trunk10] quit
# Configure PE2.
[PE2] interface eth-trunk 10 //Enter the view of Eth-Trunk 10. [PE2-Eth-Trunk10] e-trunk 1 //Add Eth-Trunk 10 to E-Trunk 1. [PE2-Eth-Trunk10] quit
- Bind the E-Trunk to a BFD session.
Create a BFD session.
# Configure PE1.
[PE1] bfd //Enable BFD. [PE1-bfd] quit [PE1] bfd hello1 bind peer-ip 2.2.2.9 source-ip 1.1.1.9 //Create a BFD session named hello1 and bind the BFD session to remote IP address 2.2.2.9 and local IP address 1.1.1.9. [PE1-bfd-session-hello1] discriminator local 1 //Set the local discriminator to 1. [PE1-bfd-session-hello1] discriminator remote 2 //Set the remote discriminator to 2. [PE1-bfd-session-hello1] commit //Commit the BFD session configuration. [PE1-bfd-session-hello1] quit
The IP addresses of the local and remote ends 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 //Create a BFD session named hello2 and bind the BFD session to remote IP address 1.1.1.9 and local IP address 2.2.2.9. [PE2-bfd-session-hello2] discriminator local 2 //Set the local discriminator to 2. [PE2-bfd-session-hello2] discriminator remote 1 //Set the remote discriminator to 1. [PE2-bfd-session-hello2] commit //Commit the BFD session configuration. [PE2-bfd-session-hello2] quit
Bind E-Trunk 1 to the BFD session.
# Configure PE1.
[PE1] e-trunk 1 //Enter the view of E-Trunk 1. [PE1-e-trunk-1] e-trunk track bfd-session session-name hello1 //Bind E-Trunk 1 to the BFD session hello1. [PE1-e-trunk-1] quit
# Configure PE2.
[PE2] e-trunk 1 //Enter the view of E-Trunk 1. [PE2-e-trunk-1] e-trunk track bfd-session session-name hello2 //Bind E-Trunk 1 to the BFD session 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 //Set the LSR ID to 1.1.1.9. [PE1] mpls //Enable global MPLS. [PE1-mpls] quit [PE1] mpls ldp //Enable global LDP. [PE1-mpls-ldp] quit [PE1] interface vlanif 100 [PE1-Vlanif100] mpls //Enable MPLS on an interface. [PE1-Vlanif100] mpls ldp //Enable LDP on an interface. [PE1-Vlanif100] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.9 //Set the LSR ID to 2.2.2.9. [PE2] mpls //Enable global MPLS. [PE2-mpls] quit [PE2] mpls ldp //Enable global LDP. [PE2-mpls-ldp] quit [PE2] interface vlanif 200 [PE2-Vlanif200] mpls //Enable MPLS on an interface. [PE2-Vlanif200] mpls ldp //Enable LDP on an interface. [PE2-Vlanif200] quit
# Configure PE3.
[PE3] mpls lsr-id 3.3.3.9 //Set the LSR ID to 3.3.3.9. [PE3] mpls //Enable global MPLS. [PE3-mpls] quit [PE3] mpls ldp //Enable global LDP. [PE3-mpls-ldp] quit [PE3] interface vlanif 100 [PE3-Vlanif100] mpls //Enable MPLS on an interface. [PE3-Vlanif100] mpls ldp //Enable LDP on an interface. [PE3-Vlanif100] quit [PE3] interface vlanif 200 [PE3-Vlanif200] mpls //Enable MPLS on an interface. [PE3-Vlanif200] mpls ldp //Enable LDP on an interface. [PE3-Vlanif200] quit
After the configuration is complete, run the display mpls ldp session command on PEs to determine whether the status of the remote LDP peer relationship is Operational. This indicates that remote LDP sessions are set up.
Enable MPLS L2VPN on PE1, PE2, and PE3.
# Configure PE1.
[PE1] mpls l2vpn //Enable global MPLS L2VPN. [PE1-l2vpn] quit
# Configure PE2.
[PE2] mpls l2vpn //Enable global MPLS L2VPN. [PE2-l2vpn] quit
# Configure PE3.
[PE3] mpls l2vpn //Enable global MPLS L2VPN. [PE3-l2vpn] quit
Create a VSI ldp1 on PE1, PE2, and PE3 and specify LDP as the signaling protocol in the VSI.
# Configure PE1.
[PE1] vsi ldp1 static //Create a VSI named ldp1 and configure static member discovery. [PE1-vsi-ldp1] pwsignal ldp //Set the signaling mode to LDP. [PE1-vsi-ldp1-ldp] vsi-id 2 //Set the ID of the VSI to 2. [PE1-vsi-ldp1-ldp] peer 3.3.3.9 //Set the peer address of the VSI to 3.3.3.9. [PE1-vsi-ldp1-ldp] quit [PE1-vsi-ldp1] quit
# Configure PE2.
[PE2] vsi ldp1 static //Create a VSI named ldp1 and configure static member discovery. [PE2-vsi-ldp1] pwsignal ldp //Set the signaling mode to LDP. [PE2-vsi-ldp1-ldp] vsi-id 2 //Set the ID of the VSI to 2. [PE2-vsi-ldp1-ldp] peer 3.3.3.9 //Set the peer address of the VSI to 3.3.3.9. [PE2-vsi-ldp1-ldp] quit [PE2-vsi-ldp1] quit
# Configure PE3.
[PE3] vsi ldp1 static //Create a VSI named ldp1 and configure static member discovery. [PE3-vsi-ldp1] pwsignal ldp //Set the signaling mode to LDP. [PE3-vsi-ldp1-ldp] vsi-id 2 //Set the ID of the VSI to 2. [PE3-vsi-ldp1-ldp] peer 1.1.1.9 //Set the peer address of the VSI to 1.1.1.9. [PE3-vsi-ldp1-ldp] peer 2.2.2.9 //Set the peer address of the VSI to 2.2.2.9. [PE3-vsi-ldp1-ldp] quit [PE3-vsi-ldp1] quit
Configure Eth-Trunk sub-interfaces on PE1 and PE2, and bind the VSI to the Eth-Trunk sub-interfaces.
# Configure PE1.
[PE1] vcmp role silent [PE1] interface Eth-Trunk 10.1 //Create Eth-Trunk 10.1 and enter the view of Eth-Trunk 10.1. [PE1-Eth-Trunk10.1] dot1q termination vid 10 //Set the single VLAN ID for dot1q encapsulation on Eth-Trunk 10.1 to VLAN 10. [PE1-Eth-Trunk10.1] l2 binding vsi ldp1 //Bind Eth-Trunk 10.1 to the VSI ldp1. [PE1-Eth-Trunk10.1] quit
# Configure PE2.
[PE2] vcmp role silent [PE2] interface Eth-Trunk 10.1 //Create Eth-Trunk 10.1 and enter the view of Eth-Trunk 10.1. [PE2-Eth-Trunk10.1] dot1q termination vid 10 //Set the single VLAN ID for dot1q encapsulation on Eth-Trunk 10.1 to VLAN 10. [PE2-Eth-Trunk10.1] l2 binding vsi ldp1 //Bind Eth-Trunk 10.1 to the VSI ldp1. [PE2-Eth-Trunk10.1] quit
Configure a sub-interface on PE3 and bind the VSI to the sub-interface.
# Configure PE3.
[PE3] vcmp role silent [PE3] interface gigabitethernet 1/0/3.1 //Create GE1/0/3.1 and enter the view of GE1/0/3.1. [PE3-GigabitEthernet1/0/3.1] dot1q termination vid 10 //Set the single VLAN ID for dot1q encapsulation on GE1/0/3.1 to VLAN 10. [PE3-GigabitEthernet1/0/3.1] l2 binding vsi ldp1 //Bind GE1/0/3.1 to the 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 information about the E-Trunk.
# 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-fc12-3450 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-fc6c-6100 Peer-Fail-Time (100ms) : 27 BFD-Session : hello1 Description : - Sequence : Enable -------------------------------------------------------------------------------- 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-fc12-3450 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-fc74-eb00 Peer-Fail-Time (100ms) : 27 BFD-Session : hello2 Description : - Sequence : Enable -------------------------------------------------------------------------------- The Member information Type ID LocalPhyState Work-Mode State Causation Remote-ID Eth-Trunk 10 Down auto Backup ETRUNK_BACKUP 10
The preceding information shows that the E-Trunk priority on PE1 is 10, and the E-Trunk status is Master; the E-Trunk priority on PE2 is 20, and the E-Trunk status is Backup. Device backup is implemented.
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 # vcmp role silent # vlan batch 100 # lacp e-trunk system-id 00e0-fc12-3450 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 # vcmp role silent # 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 # vcmp role silent # 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
Example for Configuring an Eth-Trunk to Preferentially Forward Local Traffic in a CSS or Stack
Overview
In a CSS or stack, an Eth-Trunk is configured as the outbound interface of traffic to ensure reliable transmission. Member interfaces of the Eth-Trunk are located on different chassis. When devices in the CSS or stack forward traffic, the Eth-Trunk may select an inter-chassis member interface based on a hash algorithm. The cable bandwidth between devices in the CSS or stack is limited, so inter-chassis traffic forwarding occupies bandwidth resources between devices, lowering traffic forwarding efficiency. To address this issue, you can enable an Eth-Trunk to preferentially forward local traffic.
Configuration Notes
- If active interfaces of an Eth-Trunk on the local device have sufficient bandwidth to forward traffic, you can configure the Eth-Trunk to preferentially forward local traffic. This improves traffic forwarding efficiency and increases bandwidth capacity between devices in the CSS.
- If active interfaces of an Eth-Trunk on the local device do not have sufficient bandwidth to forward traffic, you can configure the Eth-Trunk not to preferentially forward local traffic. In this case, some traffic on the local device is forwarded through member interfaces of an Eth-Trunk on another device, preventing packet loss.
- This example applies to the following products and versions:
- S2720-EI, S2750-EI: For the applicable versions, see Table 1.
- S2730S-S: For the applicable versions, see Table 1.
- S5710-X-LI, S5720-EI, S5720-LI, S5720S-LI, S5720-SI, S5720S-SI, S5720I-SI, S5720-HI, S5730-HI, S5730-SI, S5730S-EI, S5731-H, S5731-S, S5731S-S, S5731S-H, S5732-H: For the applicable versions, see TableTable 1.
- S6720-EI, S6720S-EI, S6720-LI, S6720S-LI, S6720-SI, S6720S-SI, S6720-HI, S6730-H, S6730S-H, S6730-S, S6730S-S: For the applicable versions, see TableTable 1.
- S5700-LI, S5700-HI, S5710-EI, S6700-EI: running V200R003C00 and later versions.
- S5700S-LI: running V200R008C00 and later versions.
Only S5700S-28P-PWR-LI-AC, S5700S-28X-LI-AC, and S5700S-52X-LI-AC support this function.
- S5700-SI, S5700-EI: running V200R002C00 and later versions.
- S5710-HI: V200R005C03.
- S300, S5735-L, S5735S-L, S5735S-L-M, S5735-S, S500, S5735S-S: V200R019C10 and later versions.
- S5735-L-I, S5735-L1,S5735S-L1: For the applicable versions, see TableTable 1.
- S7706, S7712, S7706 PoE: For the applicable versions, see TableTable 1.
- S9706, S9712: For the applicable versions, see TableTable 1.
For details about software mappings, visit Hardware Center and select the desired product model.
The S5731-L and S5731S-L are remote units and do not support web-based management, YANG, or commands. They can be configured only through configuration delivery by the central device. For details, see "Simplified Architecture Configuration (the Solar System Solution)" in the S300, S500, S2700, S5700, and S6700 V200R023C00 Configuration Guide - Device Management.
Networking Requirements
On the network shown in Figure 3-77, CSS technology is used to increase the total capacity of switches. Switch3 and Switch4 are connected through stack cables to form a logical switch. To implement backup between switches and improve reliability, physical interfaces on the two switches are added to an Eth-Trunk. In normal situations, traffic from VLAN 2 and VLAN 3 is forwarded through GE1/0/1 and GE1/0/2 respectively. This increases bandwidth capacity between switches and reduces traffic forwarding efficiency.
To ensure that traffic from VLAN 2 is forwarded through GE1/0/1 and traffic from VLAN 3 is forwarded through GE1/0/2, you can configure the Eth-Trunk to preferentially forward local traffic.
Configuration Roadmap
The configuration roadmap is as follows:
Create an Eth-Trunk.
Add member interfaces to the Eth-Trunk.
Enable the Eth-Trunk to preferentially forward local traffic.
Add interfaces to VLANs to implement Layer 2 connectivity.
Procedure
- Create an Eth-Trunk and configure the ID of a VLAN from which packets can pass through the Eth-Trunk.
# Configure the CSS.
<HUAWEI> system-view [HUAWEI] sysname CSS [CSS] interface eth-trunk 10 //Create Eth-Trunk 10 and enter the view of Eth-Trunk 10. [CSS-Eth-Trunk10] port link-type trunk //Set the link type of the interface to trunk. [CSS-Eth-Trunk10] port trunk allow-pass vlan all //Configure the interface to allow all VLANs. [CSS-Eth-Trunk10] quit
# Configure the aggregation switch PE.
<HUAWEI> system-view [HUAWEI] sysname PE [PE] interface eth-trunk 10 //Create Eth-Trunk 10 and enter the view of Eth-Trunk 10. [PE-Eth-Trunk10] port link-type trunk //Set the link type of the interface to trunk. [PE-Eth-Trunk10] port trunk allow-pass vlan all //Configure the interface to allow all VLANs. [PE-Eth-Trunk10] quit
- Add member interfaces to the Eth-Trunk.
# Configure the CSS.
[CSS] interface gigabitethernet 1/1/0/4 [CSS-GigabitEthernet1/1/0/4] eth-trunk 10 //Add GE1/1/0/4 to Eth-Trunk 10. [CSS-GigabitEthernet1/1/0/4] quit [CSS] interface gigabitethernet 2/1/0/4 [CSS-GigabitEthernet2/1/0/4] eth-trunk 10 //Add GE2/1/0/4 to Eth-Trunk 10. [CSS-GigabitEthernet2/1/0/4] quit
# Configure the PE.
[PE] interface gigabitethernet 1/0/1 [PE-GigabitEthernet1/0/1] eth-trunk 10 //Add GE1/0/1 to Eth-Trunk 10. [PE-GigabitEthernet1/0/1] quit [PE] interface gigabitethernet 1/0/2 [PE-GigabitEthernet1/0/2] eth-trunk 10 //Add GE1/0/2 to Eth-Trunk 10. [PE-GigabitEthernet1/0/2] quit
- Configure the Eth-Trunk on devices in the CSS to preferentially forward local traffic.
On the S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-L, S5735S-L1, S5735S-L-M, S5735-S, S500, S5735-S-I, and S5735S-S run the following command:
[CSS] local-preference enable //Enable Eth-Trunk 10 to preferentially forward local traffic.
On the devices except the S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-L, S5735S-L1, S5735S-L-M, S5735-S, S500, S5735-S-I, and S5735S-S, run the following commands:
[CSS] interface eth-trunk 10 [CSS-Eth-Trunk10] local-preference enable //Enable Eth-Trunk 10 to preferentially forward local traffic. [CSS-Eth-Trunk10] quit
By default, an Eth-Trunk is enabled to preferentially forward local traffic. If you run the local-preference enable command, the system displays the message "Error: The local preferential forwarding mode has been configured."
- Configure Layer 2 forwarding.
# Configure the CSS.
[CSS] vlan batch 2 3
[CSS] interface gigabitethernet 1/1/0/3
[CSS-GigabitEthernet1/1/0/3] port link-type trunk
[CSS-GigabitEthernet1/1/0/3] port trunk allow-pass vlan 2
[CSS-GigabitEthernet1/1/0/3] quit
[CSS] interface gigabitethernet 2/1/0/3
[CSS-GigabitEthernet2/1/0/3] port link-type trunk
[CSS-GigabitEthernet2/1/0/3] port trunk allow-pass vlan 3
[CSS-GigabitEthernet2/1/0/3] quit
# Configure access switch Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 2
[Switch1-vlan2] quit
[Switch1] interface gigabitethernet 1/0/1
[Switch1-GigabitEthernet1/0/1] port link-type trunk
[Switch1-GigabitEthernet1/0/1] port trunk allow-pass vlan 2
[Switch1-GigabitEthernet1/0/1] quit
[Switch1] interface gigabitethernet 1/0/2
[Switch1-GigabitEthernet1/0/2] port link-type trunk
[Switch1-GigabitEthernet1/0/2] port trunk allow-pass vlan 2
[Switch1-GigabitEthernet1/0/2] quit
# Configure access switch Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 3
[Switch2-vlan3] quit
[Switch2] interface gigabitethernet 1/0/1
[Switch2-GigabitEthernet1/0/1] port link-type trunk
[Switch2-GigabitEthernet1/0/1] port trunk allow-pass vlan 3
[Switch2-GigabitEthernet1/0/1] quit
[Switch2] interface gigabitethernet 1/0/2
[Switch2-GigabitEthernet1/0/2] port link-type trunk
[Switch2-GigabitEthernet1/0/2] port trunk allow-pass vlan 3
[Switch2-GigabitEthernet1/0/2] quit
- Verify the configuration.
After the configuration is complete, run the display trunkmembership eth-trunk command in any view to check information about member interfaces of the Eth-Trunk.
The display on the CSS is used as an example.
<CSS> display trunkmembership eth-trunk 10
Trunk ID: 10 Used status: VALID TYPE: ethernet Working Mode : Normal Number Of Ports in Trunk = 2 Number Of Up Ports in Trunk = 2 Operate status: up Interface GigabitEthernet1/1/0/4, valid, operate up, weight=1 Interface GigabitEthernet2/1/0/4, valid, operate up, weight=1
Configuration Files
CSS configuration file
# sysname CSS # vlan batch 2 3 # interface Eth-Trunk10 port link-type trunk port trunk allow-pass vlan 2 to 4094 # interface GigabitEthernet1/1/0/3 port link-type trunk port trunk allow-pass vlan 2 # interface GigabitEthernet2/1/0/3 port link-type trunk port trunk allow-pass vlan 3 # interface GigabitEthernet1/1/0/4 eth-trunk 10 # interface GigabitEthernet2/1/0/4 eth-trunk 10 # return
PE configuration file
# sysname PE # interface Eth-Trunk10 port link-type trunk port trunk allow-pass vlan 2 to 4094 # interface GigabitEthernet1/0/1 eth-trunk 10 # interface GigabitEthernet1/0/2 eth-trunk 10 # return
Switch1 configuration file
# sysname Switch1 # vlan batch 2 # interface GigabitEthernet1/0/1 port link-type trunk port trunk allow-pass vlan 2 # interface GigabitEthernet1/0/2 port link-type trunk port trunk allow-pass vlan 2 # return
Switch2 configuration file
# sysname Switch2 # vlan batch 3 # interface GigabitEthernet1/0/1 port link-type trunk port trunk allow-pass vlan 3 # interface GigabitEthernet1/0/2 port link-type trunk port trunk allow-pass vlan 3 # return
Example for Configuring an Eth-Trunk and Association Between VRRP and the Interface Status
Association Between VRRP and the Interface Status
Additional technologies are required to enhance the VRRP active/standby function. For example, when the link from the master to a network is disconnected, VRRP cannot detect the fault and an active/standby switchover cannot be performed. As a result, hosts cannot remotely access the network through the master. To address this issue, you can configure association between VRRP and the interface status.
When the master detects that the uplink interface fails, the master reduces its priority to be lower than the priority of the backup and immediately sends VRRP packets. After the backup receives the VRRP packets, it detects that the priority in the VRRP packets is lower than its priority and switches to the master. This ensures correct traffic forwarding.
Configuration Notes
In V200R003 and earlier versions, VRRP can be configured only on the VLANIF interface.
In V200R005 and later versions, VRRP can be configured on the VLANIF interface and Layer 3 Ethernet interface.
For a modular switch in V200R006 and later versions, VRRP can be configured on the VLANIF interface, Layer 3 Ethernet interface, Dot1q termination sub-interface, and QinQ termination sub-interface.
For a fixed switch in V200R009 and later versions, VRRP can be configured on the VLANIF interface, Layer 3 Ethernet interface, and sub-interface.
- Ensure that each device of the same VRRP group is configured with the same VRID.
VRRP groups must use different virtual IP addresses. The virtual IP address of a VRRP group must be on the same network segment as the IP address of the interface where the VRRP group is configured.
A VRRP group can be associated with a maximum of eight interfaces. Association between a VRRP group and the interface status cannot be configured on the device as the IP address owner.
- This example applies to the following products:
- S2720-EI: V200R011C10 and later versions
- S3700-EI, S3700-HI
- S5720-LI, S5720S-LI, S5720-SI, S5720S-SI, S5720I-SI, S5700-EI, S5700-HI, S5710-EI, S5720-EI, S5710-HI, S5720-HI, S5730-HI, S5730-SI, S5730S-EI, S5731-H, S5731-S, S5731S-S, S5731S-H, S5732-H, S2730S-S, S5735-L-I, S5735-L1, S300, S5735-L, S5735S-L, S5735S-L1, S5735S-L-M, S5735-S-I, S5735S-H, S5736-S, S5735-S, S500, S5735S-S
- S6720-LI, S6720S-LI, S6720-SI, S6720S-SI, S6700-EI, S6720-EI, S6720S-EI, S6720-HI, S6730-H, S6730S-H, S6730-S, S6730S-S
- S7703, S7706, S7712, S7703 PoE, S7706 PoE
- S9703, S9706, S9712
For the product models whose applicable versions are not listed above, see Table 1 in "Applicable Products and Versions" for details.
For details about software mappings, visit Hardware Center and select the desired product model.
The S5731-L and S5731S-L are remote units and do not support web-based management, YANG, or commands. They can be configured only through configuration delivery by the central device. For details, see "Simplified Architecture Configuration (the Solar System Solution)" in the S300, S500, S2700, S5700, and S6700 V200R023C00 Configuration Guide - Device Management.
Networking Requirements
The hosts use SwitchA as the default gateway to connect to the Internet. When SwitchA or the downlink/uplink fails, SwitchB functions as the gateway to implement gateway backup.
The bandwidth of the link between SwitchA and SwitchB is increased to implement link backup and improve link reliability.
After SwitchA recovers, it becomes the gateway within 20s.
Configuration Roadmap
A VRRP group in active/standby mode is used to implement gateway backup. The configuration roadmap is as follows:
Assign an IP address to each interface and configure a routing protocol to ensure network connectivity.
Configure VLAN aggregation on SwitchA and SwitchB to implement Layer 2 isolation and Layer 3 connectivity of VLANs 101 to 180 and save IP addresses.
Create an Eth-Trunk on SwitchA and SwitchB and add member interfaces to the Eth-Trunk to increase the link bandwidth and implement link backup.
Configure a VRRP group between SwitchA and SwitchB. Set a higher priority for SwitchA so that SwitchA functions as the master to forward traffic, and set the preemption delay to 20s on SwitchA. Set a lower priority for SwitchB so that SwitchB functions as the backup.
Associate VRRP with GE1/0/1 and GE1/0/2 on SwitchA so that the VRRP group can detect the fault of the master and perform an active/standby switchover immediately.
SwitchA and SwitchB are core switches, and the switch is an aggregation switch.
Procedure
- Configure devices to ensure network connectivity.
# Assign an IP address to each interface on core devices. SwitchA is used as an example. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here. For details, see the configuration files.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] vlan batch 11 to 15 101 to 180 301 to 305 400 [SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] port link-type trunk [SwitchA-GigabitEthernet1/0/1] undo port trunk allow-pass vlan 1 [SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 400 [SwitchA-GigabitEthernet1/0/1] quit [SwitchA] interface gigabitethernet 1/0/2 [SwitchA-GigabitEthernet1/0/2] port link-type trunk [SwitchA-GigabitEthernet1/0/2] undo port trunk allow-pass vlan 1 [SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 101 to 180 [SwitchA-GigabitEthernet1/0/2] quit [SwitchA] interface vlanif 11 [SwitchA-Vlanif11] ip address 10.1.1.2 24 [SwitchA-Vlanif11] quit [SwitchA] interface vlanif 12 [SwitchA-Vlanif12] ip address 10.1.2.2 24 [SwitchA-Vlanif12] quit [SwitchA] interface vlanif 13 [SwitchA-Vlanif13] ip address 10.1.3.2 24 [SwitchA-Vlanif13] quit [SwitchA] interface vlanif 14 [SwitchA-Vlanif14] ip address 10.1.4.2 24 [SwitchA-Vlanif14] quit [SwitchA] interface vlanif 15 [SwitchA-Vlanif15] ip address 10.1.5.2 24 [SwitchA-Vlanif15] quit [SwitchA] interface vlanif 400 [SwitchA-Vlanif400] ip address 192.168.1.1 24 [SwitchA-Vlanif400] quit
# Configure Layer 2 transparent transmission on the switch.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan batch 11 to 15 101 to 180 [Switch] interface gigabitethernet 1/0/1 [Switch-GigabitEthernet1/0/1] port link-type trunk [Switch-GigabitEthernet1/0/1] undo port trunk allow-pass vlan 1 [Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 11 to 15 101 to 180 [Switch-GigabitEthernet1/0/1] quit [Switch] interface gigabitethernet 1/0/2 [Switch-GigabitEthernet1/0/2] port link-type trunk [Switch-GigabitEthernet1/0/2] undo port trunk allow-pass vlan 1 [Switch-GigabitEthernet1/0/2] port trunk allow-pass vlan 11 to 15 101 to 180 [Switch-GigabitEthernet1/0/2] quit
# Configure OSPF on SwitchA, SwitchB, and switch. SwitchA is used as an example. The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here. For details, see the configuration files.
[SwitchA] ospf 1 [SwitchA-ospf-1] area 0 [SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255 [SwitchA-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255 [SwitchA-ospf-1-area-0.0.0.0] network 10.1.3.0 0.0.0.255 [SwitchA-ospf-1-area-0.0.0.0] network 10.1.4.0 0.0.0.255 [SwitchA-ospf-1-area-0.0.0.0] network 10.1.5.0 0.0.0.255 [SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [SwitchA-ospf-1-area-0.0.0.0] quit [SwitchA-ospf-1] quit
- Configure a super-VLAN on SwitchA and SwitchB.
# Configure a super-VLAN on SwitchA. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here. For details, see the configuration files.
[SwitchA] vlan 11 [SwitchA-vlan11] aggregate-vlan [SwitchA-vlan11] access-vlan 101 to 116 301 [SwitchA-vlan11] quit [SwitchA] vlan 12 [SwitchA-vlan12] aggregate-vlan [SwitchA-vlan12] access-vlan 117 to 132 302 [SwitchA-vlan12] quit [SwitchA] vlan 13 [SwitchA-vlan13] aggregate-vlan [SwitchA-vlan13] access-vlan 133 to 148 303 [SwitchA-vlan13] quit [SwitchA] vlan 14 [SwitchA-vlan14] aggregate-vlan [SwitchA-vlan14] access-vlan 149 to 164 304 [SwitchA-vlan14] quit [SwitchA] vlan 15 [SwitchA-vlan15] aggregate-vlan [SwitchA-vlan15] access-vlan 165 to 180 305 [SwitchA-vlan15] quit
- Configure link aggregation on SwitchA and SwitchB.
# Create Eth-Trunk 1 in LACP mode on SwitchA. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here. For details, see the configuration files.
[SwitchA] interface eth-trunk 1 [SwitchA-Eth-Trunk1] mode lacp [SwitchA-Eth-Trunk1] port link-type trunk [SwitchA-Eth-Trunk1] undo port trunk allow-pass vlan 1 [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 301 to 305 [SwitchA-Eth-Trunk1] quit
# Add member interfaces on SwitchA to Eth-Trunk 1. The configuration of SwitchB is similar to the configuration of SwitchA, and is not mentioned here. For details, see the configuration files.
[SwitchA] interface gigabitethernet 1/0/3 [SwitchA-GigabitEthernet1/0/3] eth-trunk 1 [SwitchA-GigabitEthernet1/0/3] quit [SwitchA] interface gigabitethernet 1/0/4 [SwitchA-GigabitEthernet1/0/4] eth-trunk 1 [SwitchA-GigabitEthernet1/0/4] quit
- Configure VRRP groups on SwitchA and SwitchB.
# Configure a VRRP group on SwitchA, and set the priority of SwitchA to 120 and the preemption delay to 20s.
[SwitchA] interface vlanif 11 [SwitchA-Vlanif11] vrrp vrid 1 virtual-ip 10.1.1.1 [SwitchA-Vlanif11] vrrp vrid 1 priority 120 //The default priority of the device in a VRRP group is 100. Change the priority of the master to be higher than that of the backup. [SwitchA-Vlanif11] vrrp vrid 1 preempt-mode timer delay 20 //The device in a VRRP group uses the immediate preemption mode by default. Change the preemption delay of the master to prevent traffic interruptions when the master and backup frequently preempt the bandwidth on an unstable network. [SwitchA-Vlanif11] vrrp vrid 1 track interface gigabitethernet 1/0/1 reduced 100 //Associate the VRRP group with the uplink interface. Set the decreased priority to ensure that the priority of the backup is higher than the priority of the master. Then an active/standby switchover can be triggered. [SwitchA-Vlanif11] vrrp vrid 1 track interface gigabitethernet 1/0/2 reduced 100 //Associate the VRRP group with the downlink interface. Set the decreased priority to ensure that the priority of the backup is higher than the priority of the master. Then an active/standby switchover can be triggered. [SwitchA-Vlanif11] vrrp advertise send-mode 301 //Specify VLAN 301 where VRRP packets are transmitted to save the network bandwidth. [SwitchA-Vlanif11] quit [SwitchA] interface vlanif 12 [SwitchA-Vlanif12] vrrp vrid 2 virtual-ip 10.1.2.1 [SwitchA-Vlanif12] vrrp vrid 2 priority 120 [SwitchA-Vlanif12] vrrp vrid 2 preempt-mode timer delay 20 [SwitchA-Vlanif12] vrrp vrid 2 track interface gigabitethernet 1/0/1 reduced 100 [SwitchA-Vlanif12] vrrp vrid 2 track interface gigabitethernet 1/0/2 reduced 100 [SwitchA-Vlanif12] vrrp advertise send-mode 302 [SwitchA-Vlanif12] quit [SwitchA] interface vlanif 13 [SwitchA-Vlanif13] vrrp vrid 3 virtual-ip 10.1.3.1 [SwitchA-Vlanif13] vrrp vrid 3 priority 120 [SwitchA-Vlanif13] vrrp vrid 3 preempt-mode timer delay 20 [SwitchA-Vlanif13] vrrp vrid 3 track interface gigabitethernet 1/0/1 reduced 100 [SwitchA-Vlanif13] vrrp vrid 3 track interface gigabitethernet 1/0/2 reduced 100 [SwitchA-Vlanif13] vrrp advertise send-mode 303 [SwitchA-Vlanif13] quit [SwitchA] interface vlanif 14 [SwitchA-Vlanif14] vrrp vrid 4 virtual-ip 10.1.4.1 [SwitchA-Vlanif14] vrrp vrid 4 priority 120 [SwitchA-Vlanif14] vrrp vrid 4 preempt-mode timer delay 20 [SwitchA-Vlanif14] vrrp vrid 4 track interface gigabitethernet 1/0/1 reduced 100 [SwitchA-Vlanif14] vrrp vrid 4 track interface gigabitethernet 1/0/2 reduced 100 [SwitchA-Vlanif14] vrrp advertise send-mode 304 [SwitchA-Vlanif14] quit [SwitchA] interface vlanif 15 [SwitchA-Vlanif15] vrrp vrid 5 virtual-ip 10.1.5.1 [SwitchA-Vlanif15] vrrp vrid 5 priority 120 [SwitchA-Vlanif15] vrrp vrid 5 preempt-mode timer delay 20 [SwitchA-Vlanif15] vrrp vrid 5 track interface gigabitethernet 1/0/1 reduced 100 [SwitchA-Vlanif15] vrrp vrid 5 track interface gigabitethernet 1/0/2 reduced 100 [SwitchA-Vlanif15] vrrp advertise send-mode 305 [SwitchA-Vlanif15] quit
# Configure a VRRP group on SwitchB. SwitchB uses the default priority of 100.
[SwitchB] interface vlanif 11 [SwitchB-Vlanif11] vrrp vrid 1 virtual-ip 10.1.1.1 [SwitchB-Vlanif11] vrrp advertise send-mode 301 [SwitchB-Vlanif11] quit [SwitchB] interface vlanif 12 [SwitchB-Vlanif12] vrrp vrid 2 virtual-ip 10.1.2.1 [SwitchB-Vlanif12] vrrp advertise send-mode 302 [SwitchB-Vlanif12] quit [SwitchB] interface vlanif 13 [SwitchB-Vlanif13] vrrp vrid 3 virtual-ip 10.1.3.1 [SwitchB-Vlanif13] vrrp advertise send-mode 303 [SwitchB-Vlanif13] quit [SwitchB] interface vlanif 14 [SwitchB-Vlanif14] vrrp vrid 4 virtual-ip 10.1.4.1 [SwitchB-Vlanif14] vrrp advertise send-mode 304 [SwitchB-Vlanif14] quit [SwitchB] interface vlanif 15 [SwitchB-Vlanif15] vrrp vrid 5 virtual-ip 10.1.5.1 [SwitchB-Vlanif15] vrrp advertise send-mode 305 [SwitchB-Vlanif15] quit
- Disable STP on SwitchA, SwitchB, SwitchC, and Switch.
# Disable global STP on SwitchA, SwitchB, SwitchC, and Switch. SwitchA is used as an example. The configurations of SwitchB, SwitchC, and the switch are similar to the configuration of SwitchA, and are not mentioned here. For details, see the configuration files.
[SwitchA] stp disable Warning: The global STP state will be changed. Continue?[Y/N]:y
- Verify the configuration.
# After the configuration is complete, run the display vrrp command on SwitchA. You can see that SwitchA is the master in VRRP group 1. VRRP group 1 is used as an example. Information of other VRRP groups is similar to information of VRRP group 1.
[SwitchA] display vrrp 1 Vlanif11 | Virtual Router 1 State : Master Virtual IP : 10.1.1.1 Master IP : 10.1.1.2 Send VRRP packet to subvlan : 301 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Track IF : GigabitEthernet1/0/1 Priority reduced : 100 IF state : UP Track IF : GigabitEthernet1/0/2 Priority reduced : 100 IF state : UP Create time : 2012-05-11 11:39:18 Last change time : 2012-05-26 11:38:58
# Run the display vrrp command on SwitchB. You can see that SwitchB is the backup. VRRP group 1 is used as an example.
[SwitchB] display vrrp 1 Vlanif11 | Virtual Router 1 State : Backup Virtual IP : 10.1.1.1 Master IP : 10.1.1.2 Send VRRP packet to subvlan : 301 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120 Preempt : YES Delay Time : 0 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Create time : 2012-05-11 11:39:18 Last change time : 2012-05-26 11:38:58
# Run the shutdown command on GE1/0/1 of SwitchA to simulate a link fault. Then run the display vrrp command on SwitchA and SwitchB. You can see that SwitchA is in Backup state, SwitchB enters the Master state, and the associated interface becomes Down.
[SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] shutdown [SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] display vrrp 1 Vlanif11 | Virtual Router 1 State : Backup Virtual IP : 10.1.1.1 Master IP : 10.1.1.3 Send VRRP packet to subvlan : 301 PriorityRun : 20 PriorityConfig : 120 MasterPriority : 100 Preempt : YES Delay Time : 20 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Track IF : GigabitEthernet1/0/1 Priority reduced : 100 IF state : DOWN Track IF : GigabitEthernet1/0/2 Priority reduced : 100 IF state : UP Create time : 2012-05-11 11:39:18 Last change time : 2012-05-26 14:12:38
[SwitchB] display vrrp 1 Vlanif11 | Virtual Router 1 State : Master Virtual IP : 10.1.1.1 Master IP : 10.1.1.3 Send VRRP packet to subvlan : 301 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 100 Preempt : YES Delay Time : 0 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Create time : 2012-05-11 11:39:18 Last change time : 2012-05-26 14:12:38
# Run the undo shutdown command on GE1/0/1 of SwitchA.
[SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] undo shutdown [SwitchA-GigabitEthernet1/0/1] quit
# After 20s, run the display vrrp command on SwitchA and SwitchB. You can see that SwitchA is restored as the master and SwitchB is restored as the backup, and the associated interface is in Up state.
[SwitchA] display vrrp 1 Vlanif11 | Virtual Router 1 State : Master Virtual IP : 10.1.1.1 Master IP : 10.1.1.2 Send VRRP packet to subvlan : 301 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Track IF : GigabitEthernet1/0/1 Priority reduced : 100 IF state : UP Track IF : GigabitEthernet1/0/2 Priority reduced : 100 IF state : UP Create time : 2012-05-11 11:39:18 Last change time : 2012-05-26 14:17:36
[SwitchB] display vrrp 1 Vlanif11 | Virtual Router 1 State : Backup Virtual IP : 10.1.1.1 Master IP : 10.1.1.2 Send VRRP packet to subvlan : 301 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120 Preempt : YES Delay Time : 0 s TimerRun : 1 s TimerConfig : 1 s Auth type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp Backup-forward : disabled Create time : 2012-05-11 11:39:18 Last change time : 2012-05-26 14:17:36
Configuration Files
Configuration file of SwitchA
# sysname SwitchA # vlan batch 11 to 15 101 to 180 301 to 305 400 # stp disable # vlan 11 aggregate-vlan access-vlan 101 to 116 301 vlan 12 aggregate-vlan access-vlan 117 to 132 302 vlan 13 aggregate-vlan access-vlan 133 to 148 303 vlan 14 aggregate-vlan access-vlan 149 to 164 304 vlan 15 aggregate-vlan access-vlan 165 to 180 305 # interface Vlanif11 ip address 10.1.1.2 255.255.255.0 vrrp vrid 1 virtual-ip 10.1.1.1 vrrp vrid 1 priority 120 vrrp vrid 1 preempt-mode timer delay 20 vrrp vrid 1 track interface gigabitethernet1/0/1 reduced 100 vrrp vrid 1 track interface gigabitethernet1/0/2 reduced 100 vrrp advertise send-mode 301 # interface Vlanif12 ip address 10.1.2.2 255.255.255.0 vrrp vrid 2 virtual-ip 10.1.2.1 vrrp vrid 2 priority 120 vrrp vrid 2 preempt-mode timer delay 20 vrrp vrid 2 track interface gigabitethernet1/0/1 reduced 100 vrrp vrid 2 track interface gigabitethernet1/0/2 reduced 100 vrrp advertise send-mode 302 # interface Vlanif13 ip address 10.1.3.2 255.255.255.0 vrrp vrid 3 virtual-ip 10.1.3.1 vrrp vrid 3 priority 120 vrrp vrid 3 preempt-mode timer delay 20 vrrp vrid 3 track interface gigabitethernet1/0/1 reduced 100 vrrp vrid 3 track interface gigabitethernet1/0/2 reduced 100 vrrp advertise send-mode 303 # interface Vlanif14 ip address 10.1.4.2 255.255.255.0 vrrp vrid 4 virtual-ip 10.1.4.1 vrrp vrid 4 priority 120 vrrp vrid 4 preempt-mode timer delay 20 vrrp vrid 4 track interface gigabitethernet1/0/1 reduced 100 vrrp vrid 4 track interface gigabitethernet1/0/2 reduced 100 vrrp advertise send-mode 304 # interface Vlanif15 ip address 10.1.5.2 255.255.255.0 vrrp vrid 5 virtual-ip 10.1.5.1 vrrp vrid 5 priority 120 vrrp vrid 5 preempt-mode timer delay 20 vrrp vrid 5 track interface gigabitethernet1/0/1 reduced 100 vrrp vrid 5 track interface gigabitethernet1/0/2 reduced 100 vrrp advertise send-mode 305 # interface Vlanif400 ip address 192.168.1.1 255.255.255.0 # interface Eth-Trunk1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 301 to 305 mode lacp # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 400 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 101 to 180 # interface GigabitEthernet1/0/3 eth-trunk 1 # interface GigabitEthernet1/0/4 eth-trunk 1 # ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 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 network 10.1.5.0 0.0.0.255 network 192.168.1.0 0.0.0.255 # return
Configuration file of SwitchB
# sysname SwitchB # vlan batch 11 to 15 101 to 180 200 301 to 305 # stp disable # vlan 11 aggregate-vlan access-vlan 101 to 116 301 vlan 12 aggregate-vlan access-vlan 117 to 132 302 vlan 13 aggregate-vlan access-vlan 133 to 148 303 vlan 14 aggregate-vlan access-vlan 149 to 164 304 vlan 15 aggregate-vlan access-vlan 165 to 180 305 # interface Vlanif11 ip address 10.1.1.3 255.255.255.0 vrrp vrid 1 virtual-ip 10.1.1.1 vrrp advertise send-mode 301 # interface Vlanif12 ip address 10.1.2.3 255.255.255.0 vrrp vrid 2 virtual-ip 10.1.2.1 vrrp advertise send-mode 302 # interface Vlanif13 ip address 10.1.3.3 255.255.255.0 vrrp vrid 3 virtual-ip 10.1.3.1 vrrp advertise send-mode 303 # interface Vlanif14 ip address 10.1.4.3 255.255.255.0 vrrp vrid 4 virtual-ip 10.1.4.1 vrrp advertise send-mode 304 # interface Vlanif15 ip address 10.1.5.3 255.255.255.0 vrrp vrid 5 virtual-ip 10.1.5.1 vrrp advertise send-mode 305 # interface Vlanif200 ip address 192.168.2.1 255.255.255.0 # interface Eth-Trunk1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 301 to 305 mode lacp # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 200 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 101 to 180 # interface GigabitEthernet1/0/3 eth-trunk 1 # interface GigabitEthernet1/0/4 eth-trunk 1 # ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 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 network 10.1.5.0 0.0.0.255 network 192.168.2.0 0.0.0.255 # return
Configuration file of SwitchC
# sysname SwitchC # vlan batch 200 300 400 # stp disable # interface Vlanif200 ip address 192.168.2.2 255.255.255.0 # interface Vlanif300 ip address 172.16.1.1 255.255.255.0 # interface Vlanif400 ip address 192.168.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 400 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 200 # interface GigabitEthernet1/0/3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 300 # ospf 1 area 0.0.0.0 network 172.16.1.0 0.0.0.255 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 # return
Configuration file of the switch
# sysname Switch # vlan batch 11 to 15 101 to 180 # stp disable # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 11 to 15 101 to 180 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 11 to 15 101 to 180 # return
- Example for Configuring Link Aggregation in Manual Mode When Switches Are Directly Connected
- Example for Configuring Link Aggregation in LACP Mode When Switches Are Directly Connected
- Example for Connecting an E-Trunk to a VPLS Network
- Example for Configuring an Eth-Trunk to Preferentially Forward Local Trafficin a CSS or Stack
- Example for Configuring an Eth-Trunk and Association Between VRRP and the Interface Status