The Layer-2 attributes of an Eth-Trunk interface define the link layer attributes of the interface.
To add an Eth-Trunk interface to a VLAN, configure Layer-2 functions for the Eth-Trunk interface.
Layer-2 Eth-Trunk interfaces are mainly used in trunk interfaces in VLANs to increase the bandwidth for communication between the VLANs of two devices.
system-view
interface eth-trunk trunk-id
portswitch
By default, the Eth-Trunk interface works in Layer-3 mode.
After the Eth-Trunk is switched to the Layer-2 mode, the Layer-3 tag and functions of the Eth-Trunk interface are displayed, and the Eth-Trunk interface uses a MAC address.
To add an Eth-Trunk interface to a VLAN, switch the Eth-Trunk interface from the Layer-3 mode to the Layer-2 mode. During the switching, only the shutdown, undo shutdown, and description commands can be run on the interface. If other command configurations exist on the interface, delete them.
The undo portswitch command switches an Eth-Trunk interface from the Layer-2 mode to the Layer-3 mode.
The minimum interval for running the portswitch and undo portswitch commands in consecutive order is 30s.
Changing the working mode of an Eth-Trunk interface has no impact on interface addition to the Eth-Trunk interface. Interfaces can be added to either a Layer-2 or Layer-3 Eth-Trunk interface.
detect-mode tap
After bypass detection is enabled, the device detects packets received on this interface and then discards them.
After configuring a Layer-2 Eth-Trunk interface, view the brief information about the interface, including the physical state, protocol state, and bandwidth utilization.
Example
Run the display interface eth-trunk command. The command output shows the Hash algorithm of an Eth-Trunk interface.
Eth-Trunk1 current state : UP
Line protocol current state : UP
Description : Eth-Trunk1 Interface
Route Port,Hash arithmatic : According to flow,Maximal BW: 2G, Current BW: 2G,
The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc09-9722
Physical is ETH_TRUNK
Last 300 seconds input rate 0 bytes/sec, 0 packets/sec
Last 300 seconds output rate 0 bytes/sec, 0 packets/sec
Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec
Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec
Input: 1 packets,3 bytes,
7 unicast,9 broadcast,8 multicasts
10 errors,5 drops,11 unknowprotocol
Output: 2 packets,4 bytes,
12 unicast,14 broadcast,13x multicasts
15 errors,6 drops
Input bandwidth utilization : 0.00%
Output bandwidth utilization : 0.00%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
GigabitEthernet 0/0/1 UP 1
GigabitEthernet 0/0/2 UP 1
-----------------------------------------------------
The Number of Ports in Trunk : 2
The Number of UP Ports in Trunk : 2
Run the display interface brief command. The command output shows the physical state, link-layer protocol status, bandwidth utilization of an Eth-Trunk interface and the number of error packets.
<sysname> display interface brief | begin Eth-Trunk PHY: Physical *down: administratively down ^down: standby (l): loopback (s): spoofing (b): BFD down (d): Dampening Suppressed InUti/OutUti: input utility/output utility Interface PHY Protocol InUti OutUti inErrors outErrors Eth-Trunk1 up up 0% 0% 0 0 GigabitEthernet 0/0/1 up up 0% 0% 0 0 GigabitEthernet 0/0/2 up up 0% 0% 0 0 Eth-Trunk1.1 up up 0% 0% 0 0