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
mdc-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 Ten-GigabitEthernet 1/0/1 to match VLANs based on MAC addresses preferentially.
<Sysname> system-view [Sysname] interface ten-gigabitethernet 1/0/1 [Sysname-Ten-GigabitEthernet1/0/1] vlan precedence mac-vlan
Related commands
mac-vlan trigger enable