191
Usage guidelines
Use this feature only with dynamic MAC-based VLAN assignment.
Examples
# Disable GigabitEthernet 1/0/1 from forwarding packets that fail the exact MAC address match in its
PVID.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port pvid forbidden
Related commands
mac-vlan trigger enable
vlan precedence
Use vlan precedence to set the VLAN matching order.
Use
undo vlan precedence to restore the default.
Syntax
vlan precedence { mac-vlan | ip-subnet-vlan }
undo vlan precedence
Default
A port matches VLANs based on MAC addresses preferentially.
Views
Layer 2 Ethernet interface view
Predefined user roles
network-admin
Parameters
mac-vlan: Matches VLANs based on MAC addresses preferentially.
ip-subnet-vlan: Matches VLANs based on IP subnets preferentially.
Usage guidelines
This command takes effect only on MAC-based VLANs and IP subnet-based VLANs.
When you enable dynamic MAC-based VLAN assignment, configure the
vlan precedence
mac-vlan
command as a best practice to ensure the priority of MAC-based VLAN matching. If you
execute the
vlan precedence ip-subnet-vlan command, the command does not take effect.
Examples
# Configure GigabitEthernet 1/0/1 to match VLANs based on MAC addresses preferentially.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] vlan precedence mac-vlan
Related commands
mac-vlan trigger enable