Command Reference VLAN Commands
will not be deleted. You can run the switchport trunk allowed command to add the port to or remove
the port from a specified VLAN.
If a switch port is a hybrid port, the port is added to all VLANs by default. Different from a trunk port, a
hybrid port can be added to a VLAN in tag or untag mode by running the switchport hybrid allowed
command.
The following example configures port 1 as an access port.
Ruijie(config)#int g 0/1
Ruijie(config-if-GigabitEthernet 0/1)#switchport mode access
The following example configures port 1 as a trunk port.
Ruijie(config)#int g 0/1
Ruijie(config-if-GigabitEthernet 0/1)# switchport mode trunk
The following example configures port 1 as an uplink port.
Ruijie(config)#int g 0/1
Ruijie(config-if-GigabitEthernet 0/1)# switchport mode uplink
The following example configures port 1 as a hybrid port.
Ruijie(config)#int g 0/1
Ruijie(config-if-GigabitEthernet 0/1)# switchport mode hybrid
Configures an interface as a statics access port
and assigns it to a VLAN.
Specifies a native VLAN and the allowed-VLAN
list for the trunkport.
4.8 switchport trunk allowed vlan
Use this command to add the trunk/uplink port to the VLAN or remove a trunk/uplink port from the
VLAN. Use the no or default form of the command to restore the default setting.
switchport trunk allowed vlan { all | { add vlan-list | remove vlan-list | except vlan-list | only
vlan-list } }
no switchport trunk allowed vlan
default switchport trunk allowed vlan
Adds the trunk/uplink port to all VLANs.
Adds the trunk/uplink port to the VLAN.