Command Reference VLAN Commands
Native VLAN packets going out on the hybrid port are not tagged with VLAN ID. Packets not tagged
with VLAN ID coming in on the hybrid port are taken as native VLAN packets.
The following example configures VLAN 20 as the native VLAN for hybrid port GigabitEthernet 0/1.
Ruijie(config-if-GigabitEthernet 0/1)#interface gigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)#switchport mode hybrid
Ruijie(config-if-GigabitEthernet 0/1)#switchport hybrid native
vlan 20
Use this command to specify a L2 interface (switch port) mode. You can specify this interface to be an
access port or a trunk port or a servicechain port. Use the no or default form of this command to
restore the default setting.
switchport mode { access | trunk | hybrid | uplink }
Configures the switch port as an access port.
Configures the switch port as a trunk port.
Configures the switch port as a hybrid port.
Configures the switch port as an uplink port.
By default, the switch port is an access port.
Interface configuration mode.
If a switch port is an access port, the port can be added only to one VLAN. You can run the
switchport access vlan command to specify the VLAN to which the port belongs.
If a switch port is a trunk port, the port is added to all VLANs by default. You can also run the
switchport trunk allowed command to add the port to or remove the port from a specified VLAN.
If a switch port is an uplink port, the port is added to all VLANs by default. Different from the trunk
port, the uplink port sends packets with a tag carried, that is, the tag of packets from default VLANs