Displaying and maintaining VLANs
Execute display commands in any view and reset commands in user view.
Task
Display VLAN interface information.
Display VLAN information.
Display brief VLAN information.
Display hybrid ports or trunk ports on the
device.
Clear statistics on a port.
Port-based VLAN configuration example
Network requirements
As shown in
•
Host A and Host C belong to Department A. VLAN 100 is assigned to Department A.
•
Host B and Host D belong to Department B. VLAN 200 is assigned to Department B.
Configure port-based VLANs so that only hosts in the same department can communicate with each
other.
Figure 51 Network diagram
Configuration procedure
Configure Device A:
1.
# Create VLAN 100, and assign HundredGigE 1/0/1 to VLAN 100.
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA-vlan100] port hundredgige 1/0/1
[DeviceA-vlan100] quit
# Create VLAN 200, and assign HundredGigE 1/0/2 to VLAN 200.
[DeviceA] vlan 200
[DeviceA-vlan200] port hundredgige 1/0/2
Figure
51:
Command
display interface vlan-interface [ interface-number ] [ brief
[ description | down ] ]
display vlan [ vlan-id1 [ to vlan-id2 ] | all | dynamic | reserved
| static ]
display vlan brief
display port { hybrid | trunk }
reset counters interface vlan-interface [ interface-number ]
145