
93
port
Syntax
port
interface-list
undo port
interface-list
View
VLAN view
Default level
2: System level
Parameters
interface-list
: Specifies an interface list, in the format of
interface-list
= {
interface-type interface-number
[
to
interface-type interface-number
] }&<1-10>, where
interface-type interface-number
specifies an
interface by its type and number and &<1-10> indicates that you can specify up to 10 ports or port
ranges.
Description
Use
port
to assign the specified access ports to the VLAN.
Use
undo port
to remove the specified access ports from the VLAN.
By default, all ports are in VLAN 1.
This command is only applicable on access ports.
By default, all ports are access ports. However, you can manually configure the port type. For more
information, see "
You cannot assign Layer 2 aggregate interfaces to a VLAN.
Related commands:
display vlan
.
Examples
# Assign GigabitEthernet 1/0/1 to VLAN 2.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] port gigabitethernet 1/0/1
port access vlan
Syntax
port access vlan
vlan-id
undo
port
access vlan
View
Ethernet interface view
Default level
2: System level