How to configure a Layer 2 interface as a Layer 3 interface on a switch

12

By default, Ethernet interfaces on switches work as Layer 2 interfaces.Run the undo portswitch command to configure the Ethernet interfaces as Layer 3 interfaces.

For switches in V200R003C00 and earlier versions:
Only Layer 2 Ethernet interfaces on the S5700HI, S5710EI, and S5710HI can be configured as Layer 3 interfaces.
After an Ethernet interface is configured as a Layer 3 interface, the interface cannot be configured with an IP address.
For switches in V200R005C00 and later versions:
Only Layer 2 Ethernet interfaces on the S5700HI, S5710EI, S5710HI, S5700EI, S5720EI, S5720HI, S6700EI, and S6720EI can be configured as Layer 3 interfaces.
After an Ethernet interface is configured as a Layer 3 interface, the interface can be configured with an IP address.

Other related questions:
Configuring Layer 2/Layer 3 switchover on the firewall
Perform as follows to configure Layer 2/Layer 3 interface switching on the USG2000&5000&6000: system-view [USG] interface GigabitEthernet 1/0/1 [USG-GigabitEthernet1/0/1] undo portswitch //Switch the interface from Layer 2 mode to Layer 3 mode. [USG-GigabitEthernet1/0/1] portswitch //Switch the interface from Layer 3 to Layer 2. Note: 1. If the device interface attribute specifies that the interface is a Layer 2 interface, the interface cannot be switched to Layer 3 mode. This command applies only to interfaces that support Layer 2/Layer 3 switching. 2. When you use this command to perform Layer 2/Layer 3 mode switching, the interface can contain only the attribute information (such as shutdown and description configurations) so that the mode switching can take effect. If the interface already has service configurations (such as port link-type trunk), clear all these configurations of the interface and then run this command.

Configuring the VLANIF interface on the firewall
Configure the VLANIF interface on the USG as follows: [FW] vlan 10 [FW-vlan-10] quit [FW] interface Vlanif 10 [FW-Vlanif10] quit [FW] interface GigabitEthernet 0/0/1 [FW-GigabitEthernet0/0/1] portswitch [FW-GigabitEthernet0/0/1] port link-type trunk [FW-GigabitEthernet0/0/1] port trunk permit vlan 10 [FW-GigabitEthernet0/0/1] quit

Do Ethernet interfaces on CE series switches support switching between Layer 2 and Layer 3 modes
Ethernet interfaces on all CE series switches, except the CE6810LI, support switching between Layer 2 and Layer 3 modes. By default, Ethernet interfaces on CE series switches work in Layer 2 mode. 1. Switching Layer 2 interface to Layer 3 mode: Run the undo portswitch command in the interface view to switch a Layer 2 interface to Layer 3 mode. Before switching, delete all non-default configurations from the interface. 2. Switching Layer 3 interface to Layer 2 mode: Run the portswitch command in the interface view to switch a Layer 3 interface to Layer 2 mode. Before switching, delete all Layer 3 service configurations from the interface.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top