Example for Configuring an Inter-Chassis Eth-Trunk to Preferentially Forward Traffic Through Local Member Interfaces
Networking Requirements
As shown in Figure 3-24, SwitchB and SwitchC are connected through stack cables to increase the total capacity of devices. The two switches functions as a logical switch. SwitchB functions as the master switch and SwitchC as the backup switch.
To implement backup between devices and improve reliability, physical interfaces on the two switches are added to an Eth-Trunk. Traffic from two VLANs, VLAN 2 and VLAN 3, is forwarded through both the two interfaces 10GE1/0/1 and 10GE1/0/2 when the network runs properly. This provides high bandwidth use efficiency between devices and low traffic forwarding efficiency.
To improve traffic forwarding efficiency, each interface should only forward traffic from one VLAN (in this example, 10GE1/0/1 forwards traffic from VLAN 2 and 10GE1/0/2 forwards traffic from VLAN3). To achieve this goal, configure the Eth-Trunk to preferentially forward local traffic.
Configuration Roadmap
The configuration roadmap is as follows:
Create an Eth-Trunk to implement link aggregation.
Add member interfaces to the Eth-Trunk.
Enable the Eth-Trunk to preferentially forward local traffic so that traffic is forwarded by member interfaces on the local device.
Configure Layer 2 forwarding to implement Layer 2 connectivity.
Procedure
- Create an Eth-Trunk and specify the allowed VLANs.
# Configure the stack. In this example, SwitchB is the master switch.
<HUAWEI> system-view [~HUAWEI] sysname SwitchB [*HUAWEI] commit [~SwitchB] vlan batch 2 3 [*SwitchB] interface eth-trunk 1 [*SwitchB-Eth-Trunk1] port link-type trunk [*SwitchB-Eth-Trunk1] port trunk allow-pass vlan 2 3 [*SwitchB-Eth-Trunk1] commit [~SwitchB-Eth-Trunk1] quit
# Configure SwitchA.
<HUAWEI> system-view [~HUAWEI] sysname SwitchA [*HUAWEI] commit [~SwitchA] vlan batch 2 3 [*SwitchA] interface eth-trunk 1 [*SwitchA-Eth-Trunk1] port link-type trunk [*SwitchA-Eth-Trunk1] port trunk allow-pass vlan 2 3 [*SwitchA-Eth-Trunk1] commit [~SwitchA-Eth-Trunk1] quit
- Add member interfaces to the Eth-Trunk.
# Configure the stack.
[~SwitchB] interface 10GE 1/1/0/1 [~SwitchB-10GE1/1/0/1] eth-trunk 1 [*SwitchB-10GE1/1/0/1] quit [*SwitchB] interface 10GE 2/1/0/1 [*SwitchB-10GE2/1/0/1] eth-trunk 1 [*SwitchB-10GE2/1/0/1] quit [*SwitchB] commit
# Configure SwitchA.
[~SwitchA] interface 10GE 1/0/1 [~SwitchA-10GE1/0/1] eth-trunk 1 [*SwitchA-10GE1/0/1] quit [*SwitchA] interface 10GE 1/0/2 [*SwitchA-10GE1/0/2] eth-trunk 1 [*SwitchA-10GE1/0/2] quit [*SwitchA] commit
- In the stack, configure the Eth-Trunk to preferentially forward local traffic.
[~SwitchB] interface eth-trunk 1 [~SwitchB-Eth-Trunk1] undo local-preference disable [*SwitchB-Eth-Trunk1] commit [~SwitchB-Eth-Trunk1] quit
- Configure Layer 2 forwarding.
# Configure the stack.
[~SwitchB] interface 10GE 1/1/0/2 [~SwitchB-10GE1/1/0/2] port link-type trunk [*SwitchB-10GE1/1/0/2] port trunk allow-pass vlan 2 [*SwitchB-10GE1/1/0/2] quit [*SwitchB] interface 10GE 2/1/0/2 [*SwitchB-10GE2/1/0/2] port link-type trunk [*SwitchB-10GE2/1/0/2] port trunk allow-pass vlan 3 [*SwitchB-10GE2/1/0/2] quit [*SwitchB] commit
# Configure SwitchD.
<HUAWEI> system-view [~HUAWEI] sysname SwitchD [*HUAWEI] commit [~SwitchD] vlan 2 [*SwitchD-vlan2] quit [*SwitchD] interface 10GE 1/0/1 [*SwitchD-10GE1/0/1] port link-type trunk [*SwitchD-10GE1/0/1] port trunk allow-pass vlan 2 [*SwitchD-10GE1/0/1] quit [*SwitchD] interface 10GE 1/0/2 [*SwitchD-10GE1/0/2] port link-type trunk [*SwitchD-10GE1/0/2] port trunk allow-pass vlan 2 [*SwitchD-10GE1/0/2] quit [*SwitchD] commit
# Configure SwitchE.
<HUAWEI> system-view [~HUAWEI] sysname SwitchE [*HUAWEI] commit [~SwitchE] vlan 3 [*SwitchE-vlan3] quit [*SwitchE] interface 10GE 1/0/1 [*SwitchE-10GE1/0/1] port link-type trunk [*SwitchE-10GE1/0/1] port trunk allow-pass vlan 3 [*SwitchE-10GE1/0/1] quit [*SwitchE] interface 10GE 1/0/2 [*SwitchE-10GE1/0/2] port link-type trunk [*SwitchE-10GE1/0/2] port trunk allow-pass vlan 3 [*SwitchE-10GE1/0/2] quit [*SwitchE] commit
- Verify the configuration.
After the configuration is complete, run the display eth-trunk membership command in any view. You can view information about Eth-Trunk member interfaces.
The display on the stack is used as an example.
[~SwitchB] display eth-trunk membership 1 Trunk ID: 1 Used Status: Valid Type: Ethernet Working Mode: Normal Number Of Ports in Trunk: 2 Number Of Up Ports in Trunk: 2 Operating Status: up Interface 10GE1/1/0/1, valid, operate up, weight=1, Interface 10GE2/1/0/1, valid, operate up, weight=1,
Configuration Files
Configuration file of the stack
# sysname SwitchB # vlan batch 2 to 3 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 2 to 3 # interface 10GE1/1/0/1 eth-trunk 1 # interface 10GE1/1/0/2 port link-type trunk port trunk allow-pass vlan 2 # interface 10GE2/1/0/1 eth-trunk 1 # interface 10GE2/1/0/2 port link-type trunk port trunk allow-pass vlan 3 # return
Configuration file of SwitchA
# sysname SwitchA # vlan batch 2 to 3 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 2 to 3 # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # return
Configuration file of SwitchD
# sysname SwitchD # vlan batch 2 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 2 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 2 # return
Configuration file of SwitchE
# sysname SwitchE # vlan batch 3 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 3 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 3 # return