1-15
To do... Use the command… Remarks
Display MAC address-to-VLAN
entries
display mac-vlan { all | dynamic |
mac-address mac-address [ mask
mac-mask ] | static | vlan vlan-id }
Available in any view
Display all interfaces with
MAC-based VLAN enabled
display mac-vlan interface
Available in any view
Display protocol information
and protocol indexes of the
specified VLANs
display protocol-vlan vlan { vlan-id
[ to vlan-id ] | all }
Available in any view
Display protocol-based VLAN
information on specified
interfaces
display protocol-vlan interface
{ interface-type interface-number [ to
interface-type interface-number ] | all }
Available in any view
Display IP subnet-based VLAN
information and IP subnet
indexes of specified VLANs
display ip-subnet-vlan vlan { vlan-id
[ to vlan-id ] | all }
Available in any view
Display the IP subnet-based
VLAN information and IP
subnet indexes of specified
ports
display ip-subnet-vlan interface
{ interface-list | all }
Available in any view
Clear statistics on a port
reset counters interface
[ interface-type [ interface-number ] ]
Available in user view
The reset counters interface command can be used to clear statistics on a VLAN interface. For more
information, refer to Ethernet Interface Commands in the Access Volume.
VLAN Configuration Example
Network requirements
z Device A connects to Device B through a trunk port GigabitEthernet 1/0/1;
z The default VLAN ID of GigabitEthernet 1/0/1 is 100;
z GigabitEthernet 1/0/1 allows packets from VLAN 2, VLAN 6 through VLAN 50, and VLAN 100 to
pass through.
Figure 1-4 Network diagram for port-based VLAN configuration
Configuration procedure
1) Configure Device A
# Create VLAN 2, VLAN 6 through VLAN 50, and VLAN 100.
<DeviceA> system-view