Huawei S5700 VLAN Configuration: Step-by-Step Guide for Network Engineers

If you’re managing a Huawei campus network, the S5700 series is one of the most widely deployed switches you’ll encounter. VLAN configuration is a fundamental task — whether you’re segmenting departments, isolating guest traffic, or building a multi-tenant environment. This guide walks through the complete VLAN setup on a Huawei S5700 using VRP (Versatile Routing Platform) CLI.

Lab Topology

For this guide, we’ll use a simple but realistic scenario:

  • Switch: Huawei S5700-28C-EI
  • VLAN 10 — IT Department (ports GE0/0/1 – GE0/0/5)
  • VLAN 20 — HR Department (ports GE0/0/6 – GE0/0/10)
  • VLAN 99 — Management
  • GE0/0/24 — Uplink trunk to core switch or router

Step 1 — Enter System View

On Huawei VRP, all configuration is done in system-view (equivalent to Cisco’s global config mode):


<Huawei> system-view
[Huawei]

Set a meaningful hostname first:


[Huawei] sysname SW-CORE-01
[SW-CORE-01]

Step 2 — Create VLANs

Create all VLANs in batch using the VLAN range syntax — much faster than creating them one by one:


[SW-CORE-01] vlan batch 10 20 99

Add descriptive names to each VLAN (highly recommended for documentation):


[SW-CORE-01] vlan 10
[SW-CORE-01-vlan10] name IT-Department
[SW-CORE-01-vlan10] quit

[SW-CORE-01] vlan 20
[SW-CORE-01-vlan20] name HR-Department
[SW-CORE-01-vlan20] quit

[SW-CORE-01] vlan 99
[SW-CORE-01-vlan99] name Management
[SW-CORE-01-vlan99] quit

Verify your VLANs were created:


[SW-CORE-01] display vlan summary

Step 3 — Configure Access Ports

Access ports carry traffic for a single VLAN — used for connecting end devices (PCs, printers, IP phones).

Configure GE0/0/1 through GE0/0/5 as VLAN 10 access ports using port-group for efficiency:


[SW-CORE-01] port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/5
[SW-CORE-01-port-group] port link-type access
[SW-CORE-01-port-group] port default vlan 10
[SW-CORE-01-port-group] quit

Configure GE0/0/6 through GE0/0/10 for VLAN 20:


[SW-CORE-01] port-group group-member GigabitEthernet 0/0/6 to GigabitEthernet 0/0/10
[SW-CORE-01-port-group] port link-type access
[SW-CORE-01-port-group] port default vlan 20
[SW-CORE-01-port-group] quit

Huawei vs Cisco: Cisco uses

switchport mode access
+
switchport access vlan 10
. Huawei uses
port link-type access
+
port default vlan 10
. The concept is identical, only the syntax differs.

Step 4 — Configure the Trunk Port

The trunk port (GE0/0/24) carries multiple VLANs to the upstream core switch or router. Configure it to allow VLANs 10, 20, and 99:


[SW-CORE-01] interface GigabitEthernet 0/0/24
[SW-CORE-01-GigabitEthernet0/0/24] port link-type trunk
[SW-CORE-01-GigabitEthernet0/0/24] port trunk allow-pass vlan 10 20 99
[SW-CORE-01-GigabitEthernet0/0/24] port trunk pvid vlan 99
[SW-CORE-01-GigabitEthernet0/0/24] description Uplink-to-Core
[SW-CORE-01-GigabitEthernet0/0/24] quit

Important:

port trunk pvid vlan 99
sets the native VLAN (untagged VLAN) on the trunk — equivalent to Cisco’s
switchport trunk native vlan 99
. Make sure both ends of the trunk match the same PVID to avoid STP issues.

Step 5 — Configure Management VLAN Interface

To remotely manage the switch via SSH or Telnet, assign an IP address to the Management VLAN interface (VLANIF):


[SW-CORE-01] interface Vlanif 99
[SW-CORE-01-Vlanif99] ip address 192.168.99.10 255.255.255.0
[SW-CORE-01-Vlanif99] description Management-Interface
[SW-CORE-01-Vlanif99] quit

[SW-CORE-01] ip route-static 0.0.0.0 0.0.0.0 192.168.99.1

Step 6 — Verify the Configuration

Always verify before moving on. These are your essential verification commands:


# Show all VLANs and their assigned ports
display vlan

# Show VLAN summary
display vlan summary

# Check a specific interface configuration
display interface GigabitEthernet 0/0/1

# Show all interface VLAN assignments at a glance
display port vlan

# Check trunk port allowed VLANs
display interface GigabitEthernet 0/0/24

# Verify management interface
display interface Vlanif 99

Step 7 — Save the Configuration

Don’t forget — unsaved config is lost on reboot:


[SW-CORE-01] save
Warning: The current configuration will be written to the device. Continue? [Y/N]:y

Troubleshooting Common VLAN Issues

🔴 Devices in the same VLAN can’t communicate


# Check if port is actually in the correct VLAN
display port vlan GigabitEthernet 0/0/1

# Check if the port link type is set correctly
display interface GigabitEthernet 0/0/1 | include link-type

Common cause: Port is still in default VLAN 1. Verify

port default vlan 10
was applied and the interface was not reset.

🔴 Trunk not passing certain VLANs


# Check which VLANs are allowed on the trunk
display interface GigabitEthernet 0/0/24

# Check VLAN exists on both switches
display vlan summary

Common cause: VLAN not created on one end, or not explicitly added to

port trunk allow-pass vlan
. Note that Huawei does NOT allow all VLANs on a trunk by default — you must explicitly add them.

🔴 Cannot ping management IP from network


# Verify VLANIF is up/up
display interface Vlanif 99

# Check default route
display ip routing-table

Common cause: VLANIF 99 is down because no physical port is active in VLAN 99. Add a port to VLAN 99 or ensure the management workstation is on a port that can reach VLAN 99 via trunk.

Complete Command Reference

TaskHuawei S5700 Command
Create single VLAN
vlan 10
Create multiple VLANs
vlan batch 10 20 30 99
Name a VLAN
name IT-Department
Set access port
port link-type access
Assign VLAN to access port
port default vlan 10
Set trunk port
port link-type trunk
Allow VLANs on trunk
port trunk allow-pass vlan 10 20 99
Set native VLAN on trunk
port trunk pvid vlan 99
Configure VLAN IP (management)
interface Vlanif 99
→
ip address x.x.x.x mask
Show all VLANs
display vlan
Show port VLAN assignments
display port vlan
Show interface details
display interface GE0/0/1
Save config
save

Conclusion

VLAN configuration on the Huawei S5700 follows a clean, logical structure once you understand the VRP syntax differences from Cisco. The key points to remember: use

port link-type
for port mode,
port default vlan
for access assignment,
port trunk allow-pass vlan
for trunk VLANs, and always
save
when done.

Need help designing or migrating a Huawei campus network? Check out my consulting services.

Scroll to Top