Displaying and maintaining vlan, Vlan configuration example, Network requirements – H3C Technologies H3C WX6000 Series Access Controllers User Manual
Page 66: Network diagram, Configuration procedure, 11 vlan configuration example
7-11
Displaying and Maintaining VLAN
To do...
Use the command…
Remarks
Display the information about
specific VLANs
display
vlan [ vlan-id1 [ to vlan-id2 ] |
all
| dynamic | reserved | static ]
Available in any view
Display the information about a
VLAN interface
display
interface Vlan-interface
[ vlan-interface-id ]
Available in any view
Display all the ports with MAC
address-based VLAN enabled.
display mac-vlan interface
Available in any view
Display the information about
specific MAC address-to-VLAN
entries
display mac-vlan
{ all | dynamic |
mac-address
mac-addr | static | vlan
vlan-id
}
Available in any view
Clear the statistics on a VLAN
interface
reset counters interface
Vlan-interface
[ vlan-interface-id ]
Available in user view
VLAN Configuration Example
Network requirements
z
AC connects to Device through Trunk port GigabitEthernet 0/0/1;
z
The default VLAN ID of the port is 100;
z
This port allows packets from VLAN 2, VLAN 6 through VLAN 50, and VLAN 100 to pass through.
Network diagram
Figure 7-4
Network diagram for port-based VLAN configuration
Configuration procedure
1) Configure
AC
# Create VLAN 2, VLAN 6 through VLAN 50, and VLAN 100.
[AC] vlan 2
[AC-vlan2] quit
[AC] vlan 100
[AC-vlan100] quit
[AC] vlan 6 to 50
Please wait... Done.
# Enter GigabitEthernet 0/0/1 port view.
[AC] interface GigabitEthernet 0/0/1
# Configure GigabitEthernet 0/0/1 as a Trunk port and configure its default VLAN ID as 100.
[AC-GigabitEthernet0/0/1] port link-type trunk
[AC-GigabitEthernet0/0/1] port trunk pvid vlan 100
# Configure GigabitEthernet 0/0/1 to deny the packets of VLAN 1 (by default, the packets of VLAN 1 are
permitted on all the ports).
[AC-GigabitEthernet0/0/1] undo port trunk permit vlan 1