Command Reference VLAN Commands
4 VLAN Commands
4.1 add
Use this command to add one or a group Access interface into current VLAN. Use the no or default
form of the command to remove the Access interface.
add interface { interface-id | range interface-range }
no add interface { interface-id | range interface-range }
default add interface { interface-id | range interface-range }
Layer-2 Ethernet interface or layer-2 AP port.
Range of the Layer-2 Ethernet interface or layer-2 AP port.
All layer-2 Ethernet interfaces are in the VLAN1.
This command is only valid for the access port.
The configuration of this command is the same as specifying the VLAN to which interface belongs in
the interface configuration mode (that is the switchport access vlan vlan-id command). For the two
commands of adding the interface to the VLAN, the command configured later will overwrite the one
configured before and take effect.
The configuration of adding the layer-2 AP into current VLAN through this command will only take
effect for the layer-2 AP port, but not for the member port of the layer-2 AP port.
The following example adds the interface GigabitEthernet 0/10 to VLAN20.
Ruijie# configure terminal
SwitchA(config)#vlan 20
SwitchA(config-vlan)#add interface GigabitEthernet 0/10
Ruijie# show interface GigabitEthernet 0/10 switchport
Interface Switchport Mode Access Native Protected VLAN lists
---------- -------- ----- ----- ---- ---------- -------
GigabitEthernet 0/10 enabled ACCESS 20 1 Disabled ALL
The following example adds the interface range GigabitEthernet 0/1-10 to VLAN200.
Ruijie# configure terminal
SwitchA(config)#vlan 200
SwitchA(config-vlan)#add interface range GigabitEthernet 0/1-10
Ruijie# show vlan