8-10
To do...
Use the command...
Remarks
Associate MAC addresses
with a VLAN
mac-vlan mac-address
mac-address
[
mask mac-mask
]
vlan vlan-id
[
priority priority
]
Required
Enter interface view
interface interface-type
interface-number
Required.
Configure the link type of
the port as hybrid
port link-type
hybrid
Required
Assign the current hybrid
port to the specified
MAC-based VLANs
port hybrid
vlan
vlan-id-list
{
tagged
|
untagged
}
Required
By default, a hybrid port only permits
packets of VLAN 1 to pass through.
Enable MAC-based VLAN
mac-vlan enable
Required
Disabled by default
Displaying and Maintaining VLAN
To do...
Use the command…
Remarks
Display VLAN information
display
vlan
[
vlan-id1
[
to
vlan-id2
] |
all
|
dynamic
|
reserved
|
static
]
Available in any view
Display VLAN interface information
display interface vlan-interface
[
vlan-interface-id
]
Available in any view
Display MAC address-to-VLAN
entries
display mac-vlan
{
all
|
dynamic
|
mac-address mac-address
[
mask
mac-mask
] |
static
|
vlan vlan-id
}
Available in any view
Display all interfaces with MAC-based
VLAN enabled
display mac-vlan interface
Available in any view
Display hybrid or trunk ports on the
AP
display port
{
hybrid
|
trunk
}
Available in any view
Clear statistics on a port
reset counters interface
[
interface-type
[
interface-number
] ]
Available in user view
You can use the
reset counters interface
command to clear statistics on a VLAN interface. For more
information, see
Ethernet Interface
in the
Layer 2 – LAN Switching Command Reference
.
VLAN Configuration Example
Network requirements
As shown in
:
z
AP connects to Device B through a trunk port Ethernet 1/0/1;
z
The default VLAN ID of Ethernet 1/0/1 is 100;
z
Ethernet 1/0/1 allows packets from VLAN 2, VLAN 6 through VLAN 50, and VLAN 100 to pass
through.