Adding a port to a VLAN associates the port with the VLAN.
A port connecting a switch to a PC must be configured as an access or a hybrid port.
The port trunk allow-pass vlan command is invalid on access ports.
A port connecting one switch to another must be configured as a trunk or hybrid port.
The port default vlan command cannot be used on trunk ports.
Run port default vlan vlan-id
A port is added to a specified VLAN.
To add ports to a VLAN in batches, run the port porttype { portbegin [ to portend ] } &<1-10> command in the VLAN view.
The input port format must be correct. The port number following to must be greater than the port number before to. If a group of ports are specified, ensure that these ports are of the same type and all specified ports exist.
In one port command, a maximum of 10 groups of ports can be specified by using to.
Run commit
The configuration is committed.
Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }
The ports are added to specified VLANs.
Run commit
The configuration is committed.