Fundamentals 7 min read

Understanding Huawei Switch Port VLAN Modes: Access, Trunk, and Hybrid Explained

This article explains the differences in VLAN handling on Huawei switches, detailing the IEEE 802.1Q frame format, the role of PVID, and the specific behaviors of access, trunk, and hybrid port modes, including configuration commands and traffic processing rules.

Open Source Linux
Open Source Linux
Open Source Linux
Understanding Huawei Switch Port VLAN Modes: Access, Trunk, and Hybrid Explained

Huawei switches differ from other brands in VLAN port configuration; this article details the VLAN attributes of Huawei switch ports.

IEEE 802.1Q VLAN frame format

VLAN frame format
VLAN frame format

The tag is the VLAN tag.

Fields:

TPID is fixed 0x8100, indicating a VLAN tag.

PRI is priority (0‑7).

CFI: 0 for standard format, 1 for non‑standard.

VLAN ID: the VLAN number, range 1‑4094.

PVID (Port VLAN ID) is a basic port attribute, default 1, and can be set manually.

Huawei port modes

Huawei switch ports support three modes: access , trunk , and hybrid .

Access mode

Access mode icon
Access mode icon

When receiving frames:

If the frame has a VLAN tag and its VLAN ID matches the port's PVID, the frame is forwarded; otherwise it is dropped.

If the frame has no VLAN tag, the port adds a VLAN tag with the PVID and forwards it.

When sending frames:

The port only sends frames whose VLAN ID equals the PVID; the VLAN tag is stripped before transmission.

Example configuration:

[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 10

This sets the port to access mode with PVID 10. The port can send and receive frames with VLAN ID 10; untagged frames are tagged with VLAN ID 10 on ingress.

Trunk mode

Trunk mode icon
Trunk mode icon

When receiving frames:

Untagged frames are tagged with the port's PVID; if the PVID is in the allowed VLAN list, the frame is forwarded, otherwise dropped.

Tagged frames are forwarded only if their VLAN ID is in the allowed VLAN list; otherwise dropped.

When sending frames:

The port can send frames belonging to allowed VLANs. If a frame's VLAN ID equals the PVID, the tag is stripped; otherwise the tag is kept.

Example configuration:

[Huawei-GigabitEthernet0/0/4]port link-type trunk
[Huawei-GigabitEthernet0/0/4]port trunk pvid vlan 5
[Huawei-GigabitEthernet0/0/4]port trunk allow-pass vlan 10 20 30

This configures a trunk port with PVID 5 and allowed VLANs 10, 20, 30.

Hybrid mode

Hybrid mode icon
Hybrid mode icon

When receiving frames:

Untagged frames are tagged with the PVID; if the PVID is in the allowed VLAN list, the frame is forwarded, otherwise dropped.

Tagged frames are forwarded only if their VLAN ID is in the allowed VLAN list; otherwise dropped.

When sending frames:

The port can send frames from allowed VLANs; it can be configured to send tagged or untagged frames per VLAN.

Example configuration:

[Huawei-GigabitEthernet0/0/6]port hybrid pvid vlan 10
[Huawei-GigabitEthernet0/0/6]port hybrid tagged vlan 10 20 30
[Huawei-GigabitEthernet0/0/6]port hybrid untagged vlan 100 200 300

This sets a hybrid port with PVID 10 and allowed VLANs 10, 20, 30 (tagged) and 100, 200, 300 (untagged).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Network ConfigurationVLANHuawei SwitchAccess ModeHybrid ModeTrunk Mode
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.