Configuration Roadmap
The configuration roadmap is as follows:
1. Add Ethernet interfaces to the VLAN.
2. Configure VLANIF interfaces.
Procedure
Step 1 Configure the Router.
# Create VLANs.
<Huawei> system-view
[Huawei] sysname Router
[Router] vlan batch 10 20
# Add interfaces to the VLANs.
[Router] interface ethernet 2/0/1
[Router-Ethernet2/0/1] port link-type trunk
[Router-Ethernet2/0/1] port trunk allow-pass vlan 10 20
[Router-Ethernet2/0/1] quit
# Assign IP addresses to the VLANIF interfaces.
[Router] interface vlanif 10
[Router-Vlanif10] ip address 10.10.10.1 24
[Router-Vlanif10] quit
[Router] interface vlanif 20
[Router-Vlanif20] ip address 10.10.20.1 24
[Router-Vlanif20] quit
Step 2 Configure SwitchA.
# Create VLANs.
<Huawei> system-view
[Huawei] sysname SwitchA
[SwitchA] vlan batch 10 20
# Add interfaces to the VLANs.
[SwitchA] interface ethernet 2/0/1
[SwitchA-Ethernet2/0/1] port link-type access
[SwitchA-Ethernet2/0/1] port default vlan 10
[SwitchA-Ethernet2/0/1] quit
[SwitchA] interface ethernet 2/0/2
[SwitchA-Ethernet2/0/2] port link-type access
[SwitchA-Ethernet2/0/2] port default vlan 20
[SwitchA-Ethernet2/0/2] quit
[SwitchA] interface ethernet 2/0/3
[SwitchA-Ethernet2/0/3] port link-type trunk
[SwitchA-Ethernet2/0/3] port trunk allow-pass vlan 10 20
[SwitchA-Ethernet2/0/3] quit
Step 3 Verify the configuration.
# On PC1 in VLAN 10, configure the default gateway address as the IP address of VLANIF 10
(in this example: 10.10.10.1/24).
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.
107