•
When the port receives a tagged frame, the port forwards the frame if the VLAN ID of the frame is
permitted by the port, or otherwise drops the frame.
Approach 2: Dynamic MAC-based VLAN
You can use dynamic MAC-based VLAN with access authentication (such as 802.1X authentication
based on MAC addresses) to implement secure, flexible terminal access. After configuring dynamic
MAC-based VLAN on the switch, you must configure the MAC address-to-VLAN entries on the access
authentication server.
When a user passes authentication of the access authentication server, the switch obtains VLAN
information from the server, generates a MAC address-to-VLAN entry by using the source MAC address
of the user packet and the VLAN information, and assigns the port to the MAC-based VLAN. When the
user goes offline, the switch automatically deletes the MAC address-to-VLAN entry, and removes the port
from the MAC-based VLAN.
Configuring MAC-based VLAN
NOTE:
•
MAC-based VLANs are available only on hybrid ports.
•
The MAC-based VLAN feature is mainly configured on the downlink ports of the user access devices. Do
not enable this function together with link aggregation.
Configuring static MAC-based VLAN assignment
Follow these steps to configure static MAC-based VLAN assignment:
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
Enter
Ethernet
interface
view or port
group view Enter port
group view
port-group manual
port-group-name
Use either command.
•
The configuration made in
Ethernet interface view applies
only to the current port.
•
The configuration made in port
group view applies to all ports in
the port group.
Configure the link type of the
port(s) as hybrid
port link-type
hybrid
Required
Configure the 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
Configuring dynamic MAC-based VLAN
104