HP MSR2000/3000/4000 Router Series Layer 2 - LAN Switching Configuration Guide

61
Task Command
Display VLAN information.
display vlan [ vlan-id1 [ to vlan-id2 ] | all | dynamic |
reserved | static ]
Display VLAN interface information.
display interface vlan-interface [ vlan-interface-id ] [ brief
[ description ] ]
Display hybrid ports or trunk ports on the
device.
display port { hybrid | trunk }
Clear statistics on a port. reset counters interface vlan-interface [ vlan-interface-id ]
Port-based VLAN configuration example
Network requirements
As shown in Figure 19, Host A and Host C belong to Department A, and access the enterprise network
through different devices. Host B and Host D belong to Department B. They also access the enterprise
network through different devices.
To ensure communication security and avoid broadcast storms, VLANs are configured in the enterprise
network to isolate Layer 2 packets of different departments. VLAN 100 is assigned to Department A, and
VLAN 200 is assigned to Department B.
Make sure hosts within the same VLAN can communicate with each other: Host A can communicate with
Host C, and Host B can communicate with Host D.
Figure 19 Network diagram
Configuration procedure
1. Configure Router A:
# Create VLAN 100, and assign port Ethernet 2/1 to VLAN 100.
<RouterA> system-view
[RouterA] vlan 100
[RouterA-vlan100] port ethernet 2/1
[RouterA-vlan100] quit
# Create VLAN 200, and assign port Ethernet 2/2 to VLAN 200.
[RouterA] vlan 200
[RouterA-vlan200] port ethernet 2/2
[RouterA-vlan200] quit