169
vlan precedence
Description
Use the vlan precedence command to set the order of VLAN matching.
Use the undo vlan precedence command to restore the default.
By default, VLANs are matched based on MAC addresses preferentially.
This command only applies to VLANs based on a single MAC address and IP subnet-based VLANs.
If both the MAC-based VLAN function and the IP subnet-based VLAN function are created on a port,
MAC address-to-VLAN entries are matched preferentially, and the remaining VLAN entries (VLAN entries
based on a single MAC address and IP subnet-based VLANs) are matched as configured by the vlan
precedence command.
Syntax
vlan precedence { mac-vlan | ip-subnet-vlan }
undo vlan precedence
View
Layer 2 Ethernet port view, port group view
Default level
2: System level
Parameters
mac-vlan: Matches VLANs based on MAC addresses preferentially.
ip-subnet-vlan: Matches VLANs based on IP subnet settings preferentially.
Example
# Configure matching VLANs based on MAC addresses preferentially on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] vlan precedence mac-vlan
Protocol-based VLAN configuration commands
display protocol-vlan interface
Description
Use the display protocol-vlan interface command to display information about protocol-based VLANs for
the specified ports.
Syntax
display protocol-vlan interface { interface-type interface-number1 [ to interface-type interface-number2 ] |
all } [ | { begin | exclude | include } regular-expression ]