2-8
Configuring a MAC-Based VLAN
Configuration prerequisites
Create a VLAN before configuring the VLAN as a protocol-based VLAN.
Configuration procedure
Follow these steps to configure a MAC-based VLAN:
To do... Use the command... Remarks
Enter system view
system-view
—
Associate MAC addresses
with a VLAN
mac-vlan mac-address
mac-address
vlan
vlan-id
[
priority
priority ]
Required
Enter Ethernet interface view
interface
interface-type
interface-number
Required.
In Ethernet interface view, the
subsequent configurations apply only
to the current port.
Configure the link type of the
port(s) as hybrid
port link-type
hybrid
Required
Configure the current hybrid
port(s) to permit packets of
specific MAC-based VLANs to
pass through
port hybrid
vlan
vlan-id-list
{
tagged
|
untagged
}
Required
By default, a hybrid port only permits
the packets of VLAN 1 to pass
through.
Enable MAC-based VLAN
mac-vlan enable
Required
Disabled by default
Displaying MAC-Based VLAN Configuration
To do... Use the command…
Display MAC address-to-VLAN
entries
display mac-vlan
{
all
|
dynamic
|
static
|
vlan
vlan-id
}
Display all interfaces with
MAC-based VLAN enabled
display mac-vlan interface
Configuring a Protocol-Based VLAN
The contents of this section are only applicable to the S3100-EI series among S3100 series switches.