display mac-vlan

Use display mac-vlan to display MAC-to-VLAN entries.

Syntax

display mac-vlan { all | dynamic | mac-address mac-address [ mask mac-mask ] | static | vlan vlan-id }

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

all: Specifies all MAC-to-VLAN entries.

dynamic: Specifies dynamically configured MAC-to-VLAN entries.

mac-address mac-address: Specifies the MAC address in the MAC-to-VLAN entry. The format of the mac-address argument is H-H-H.

mask mac-mask: Specifies the mask for matching MAC addresses in MAC-to-VLAN entries. For the mac-mask argument, the high-order bits must be consecutive 1s in binary notation or consecutive Fs in hexadecimal notation. The default value is ffff-ffff-ffff.

static: Specifies statically configured MAC-to-VLAN entries.

vlan vlan-id: Specifies the VLAN in MAC-to-VLAN entries. The value range for the vlan-id argument is 1 to 4094.

Examples

# Display all MAC-to-VLAN entries.

<Sysname> display mac-vlan all
The following MAC VLAN entries exist:
State: S - Static, D - Dynamic

MAC address        Mask                VLAN ID   Dot1q      State
0008-0001-0000     ffff-ff00-0000      5         3          S
0002-0001-0000     ffff-ffff-ffff      5         3          S&D

Total MAC VLAN entries count: 2

Table 17: Command output

Field

Description

S - Static

Statically configured MAC-to-VLAN entries.

D - Dynamic

Dynamically configured MAC-to-VLAN entries.

MAC address

MAC address of the MAC-to-VLAN entry.

Mask

MAC address mask of the MAC-to-VLAN entry.

VLAN ID

VLAN ID of the MAC-to-VLAN entry.

Dot1q

802.1p priority of the VLAN in the MAC-to-VLAN entry.

State

State of a MAC-to-VLAN entry:

  • S—The MAC-to-VLAN entry is configured statically.

  • D—The MAC-to-VLAN entry is dynamically issued by the authentication server.

  • S&D—The MAC-to-VLAN entry is configured both statically and dynamically.

Related commands

mac-vlan mac-address