26
port
Use
port
to assign the specified access ports to the VLAN.
Use
undo port
to remove the specified access ports from the VLAN.
Syntax
port interface-list
undo port interface-list
Default
All ports are in VLAN 1. All ports are access ports. However, you can manually configure the port
type. For more information, see "
Views
VLAN view
Default command level
2: System level
Parameters
interface-list
: Specifies an interface list, in the format of
interface-list
= {
interface-type
interface-number1
[
to
interface-type interface-number2
] }&<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.
Usage guidelines
This command is only applicable on access ports.
You cannot assign Layer 2 aggregate interfaces to a VLAN.
Examples
# Assign Ethernet 1/1 through Ethernet 1/3 to VLAN 2.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] port ethernet 1/1 to ethernet 1/3
Related commands
display vlan
port access vlan
Use
port access vlan
to assign the access ports 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 and do not belong to any other VLAN.
Views
Ethernet interface view, Layer 2 aggregate interface view