Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs.
2. Add interfaces to the VLAN.
Procedure
Step 1 Configure the Router.
# Create VLAN 2.
<Huawei> system-view
[Huawei] sysname Router
[Router] vlan 2
[Router-vlan2] quit
# Set the link type of Ethernet 2/0/1 to trunk and add Ethernet 2/0/1 to VLAN 2.
[Router] interface ethernet 2/0/1
[Router-Ethernet2/0/1] port link-type trunk
[Router-Ethernet2/0/1] port trunk allow-pass vlan 2
[Router-Ethernet2/0/1] quit
# Set the link type of Ethernet 2/0/2 to trunk and add Ethernet 2/0/2 to VLAN 2.
[Router]interface ethernet 2/0/2
[Router-Ethernet2/0/2] port link-type trunk
[Router-Ethernet2/0/2] port trunk allow-pass vlan 2
[Router-Ethernet2/0/2] quit
# Create VLAN 3.
[Router] vlan 3
[Router-vlan3] quit
# Set the link type of Ethernet 2/0/3 to trunk and add Ethernet 2/0/3 to VLAN 3.
[Router] interface ethernet 2/0/3
[Router-Ethernet2/0/3] port link-type trunk
[Router-Ethernet2/0/3] port trunk allow-pass vlan 3
[Router-Ethernet2/0/3] quit
# Set the link type of Ethernet 2/0/4 to trunk and add Ethernet 2/0/4 to VLAN 3.
[Router] interface ethernet 2/0/4
[Router-Ethernet2/0/4] port link-type trunk
[Router-Ethernet2/0/4] port trunk allow-pass vlan 3
[Router-Ethernet2/0/4] quit
Step 2 Verify the configuration.
Ping any host in VLAN 3 from a host in VLAN 2. The ping operation fails, indicating that
Department 1 and Department 2 are isolated from Department 3 and Department 4.
Ping any host in Department 2 from a host in Department 1. The ping operation is successful,
indicating that Department 1 and Department 2 can communicate with each other.
Huawei AR530&AR550 Series Industrial Switch Routers
Configuration Guide - Ethernet Switching
3 VLAN Configuration
Issue 01 (2014-11-30) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
105