CLI ReferenceInterface Configuration Commands Interface Configuration Commands
switchport
In the interface configuration mode, you can use switchport without any
parameter to configure an interface to work in Layer 2 mode. Use the no
switchport command without any parameter to configure it as Layer 3 interface.
All the interfaces work in Layer 2 mode by default.
Interface configuration mode.
This command applies only to physical interfaces. The switchport command is
used to disable and re-enable an interface. In this status, the device will send the
information to indicate the connect status. If the interface switches from Layer 2 to
Layer 3 mode, all the attributes in Layer 2 mode will be cleared.
Ruijie(config-if)# switchport
Show the interface information.