R0106-HP MSR Router Series Layer 2 - LAN Switching Command Reference(V7)

73
[Sysname] vlan 2
[Sysname-vlan2] port gigabitethernet 2/1/1 to gigabitethernet 2/1/3
Related commands
display vlan
port access vlan
Use port access vlan to assign an access port to the specified VLAN.
Use undo port access vlan to restore the default.
Syntax
port access vlan vlan-id
undo port access vlan
Default
All access ports belong to VLAN 1.
Views
Layer 2 Ethernet interface view
Predefined user roles
network-admin
Parameters
vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
Usage guidelines
Before you assign an access port to a VLAN, make sure the VLAN has been created.
Examples
# Assign GigabitEthernet 2/1/1 to VLAN 3.
<Sysname> system-view
[Sysname] vlan 3
[Sysname-vlan3] quit
[Sysname] interface gigabitethernet 2/1/1
[Sysname-GigabitEthernet2/1/1] port access vlan 3
port hybrid pvid
Use port hybrid pvid to configure the PVID of a hybrid port.
Use undo port hybrid pvid to configure the PVID of a hybrid port as 1.
Syntax
port hybrid pvid vlan vlan-id
undo port hybrid pvid
Default
The PVID of a hybrid port is the ID of the VLAN to which the port belongs when its link type is access.