137
the relationship between a group of MAC addresses and a VLAN, and a priority value. Another table
contains the MAC address-to-VLAN entries configured without the
mask
keyword specified. A MAC
address-to-VLAN entry of this type describes the relationship between a single MAC address and a
VLAN, and a priority value. The system adds/removes MAC address-to-VLAN entries to/from the two
tables according to the configuration.
After associate MAC addresses with a VLAN, if you specifies the 802.1p priority value corresponding to
the specified MAC address, you still need to use the qos trust dot1p command in interface view to
configure the interface to use the 802.1p priority in incoming packets for priority mapping. For details
about this command, see the
ACL and QoS Command Reference
.
Examples
# Associate a single MAC address 0-1-1 with VLAN 100 and 802.1p priority 7.
<Sysname> system-view
[Sysname] mac-vlan mac-address 0-1-1 vlan 100 priority 7
# Associate the MAC addresses with the high-order six hexadecimal digits being 111122 with VLAN 100
and 802.1p priority 4.
<Sysname> system-view
[Sysname] mac-vlan mac-address 1111-2222-3333 mask ffff-ff00-0000 vlan 100 priority 4
mac-vlan trigger enable
Syntax
mac-vlan trigger enable
undo mac-vlan trigger enable
View
Layer 2 Ethernet port view
Default level
2: System level
Parameters
None
Description
Use the
mac-vlan trigger enable
command to enable MAC-based dynamic port assignment. The port
configured with this command will be dynamically assigned to VLANs based on the source MAC
addresses of the received packets.
Use the
undo mac-vlan trigger enable
command to restore the default.
By default, MAC-based dynamic port assignment is not enabled.
After receiving a packet with an unknown source MAC address, a port submits the packet to the CPU. If
the source MAC address matches a MAC address-to-VLAN mapping (whose mask is all Fs) maintained
by the device, the device dynamically learns the source MAC address and assigns the receiving port to
the corresponding VLAN. Then, subsequent packets with this source MAC address can be directly
forwarded through the port. If the MAC address does not match any MAC address-to-VLAN mapping or
matches only a MAC address-to-VLAN mapping whose mask is not all Fs, the device will not dynamically
learn the MAC address and assign the receiving port to the corresponding VLAN.