2-4Assigning an Ethernet Port to a VLANYou can assign an Ethernet port to a VLAN in Ethernet port view or VLAN view.z You can assign an access port to a VLAN in either Ethernet port view or VLAN view.z You can assign a trunk port or hybrid port to a VLAN only in Ethernet port view.1) In Ethernet port viewFollow these steps to assign an Ethernet port to one or multiple VLANs:To do… Use the command… RemarksEnter system view system-view —Enter Ethernet port view interface interface-typeinterface-number —Access port port access vlan vlan-idTrunk port port trunk permit vlan{ vlan-id-list | all }Assign thecurrent portto one ormultipleVLANs Hybrid port port hybrid vlan vlan-id-list{ tagged | untagged }OptionalBy default, all Ethernet portsbelong to VLAN 1.When assigning an access or hybrid port to a VLAN, make sure the VLAN already exists.2) In VLAN viewFollow these steps to assign one or multiple access ports to a VLAN in VLAN view:To do… Use the command… RemarksEnter system view system-view —Enter VLAN view vlan vlan-idRequiredIf the specified VLAN does notexist, this command creates theVLAN first.Assign the specified accessport or ports to the currentVLANport interface-listRequiredBy default, all ports belong toVLAN 1.