Assigning an Ethernet Port to a VLAN
You can assign an Ethernet port to a VLAN in Ethernet port view or VLAN view.
You can assign an access port to a VLAN in either Ethernet port view or VLAN view.
You can assign a trunk port or hybrid port to a VLAN only in Ethernet port view.
1)
In Ethernet port view
Follow these steps to assign an Ethernet port to one or multiple VLANs:
To do...
Enter system view
Enter Ethernet port view
Assign the
current port
to one or
multiple
VLANs
When assigning an access or hybrid port to a VLAN, make sure the VLAN already exists.
2)
In VLAN view
Follow these steps to assign one or multiple access ports to a VLAN in VLAN view:
To do...
Enter system view
Enter VLAN view
Assign the specified access
port or ports to the current
VLAN
Use the command...
system-view
interface interface-type
interface-number
Access port
port access vlan vlan-id
port trunk permit vlan
Trunk port
{ vlan-id-list | all }
port hybrid vlan vlan-id-list
Hybrid port
{ tagged | untagged }
Use the command...
system-view
vlan vlan-id
port interface-list
—
—
Optional
By default, all Ethernet ports
belong to VLAN 1.
—
Required
If the specified VLAN does not
exist, this command creates the
VLAN first.
Required
By default, all ports belong to
VLAN 1.
2-4
Remarks
Remarks