Assigning an access port to a VLAN

You can assign an access port to a VLAN in VLAN view or interface view.

Make sure the VLAN has been created.

Assign one or multiple access ports to a VLAN in VLAN view

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter VLAN view.

vlan vlan-id

N/A

3. Assign one or multiple access ports to the VLAN.

port interface-list

By default, all ports belong to VLAN 1.

Assign an access port to a VLAN in interface view

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter interface view.

  • Enter Layer 2 Ethernet interface view:interface interface-type interface-number

  • Enter Layer 2 aggregate interface view:
    interface bridge-aggregation
    interface-number

N/A

3. Set the port link type to access.

port link-type access

By default, all ports are access ports.

4. (Optional.) Assign the access port to a VLAN.

port access vlan vlan-id

By default, all access ports belong to VLAN 1.