Due to hardware restrictions of switches, some Ethernet interfaces work in only Layer 2 or Layer 3 mode, whereas other Ethernet interfaces can work in both Layer 2 and Layer 3 modes. An Ethernet interface works as a Layer 2 interface in Layer 2 mode and a Layer 3 interface in Layer 3 mode.
To switch between Layer 2 and Layer 3 modes on multiple interfaces, run the portswitch batch command in the system view.
Only interfaces on the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
IP addresses can be assigned to Ethernet interfaces in Layer 3 mode.
By default, an Ethernet interface works at Layer 2 and belongs to VLAN 1. An interface is not removed from VLAN 1 immediately after being switched to Layer 3 mode. It is removed from VLAN 1 only when Layer 3 protocols are Up.
You can configure Layer 2 and Layer 3 modes of an Ethernet interface in the Ethernet interface view or system view. When the configurations in the two views differ, the latest configuration takes effect.
Run the display interface [ interface-type [ interface-number ] ] command in any view or the display this interface command in the interface view to check the current interface status. The interface is a Layer 2 interface if the Switch Port field is displayed in the command output and is a Layer 3 interface if the Route Port field is displayed.