Fundamentals 6 min read

Understanding Trunk, Hybrid, Access Ports and VLAN Tagging (Tag/Untag, PVID) on Huawei Switches

This article explains the definitions and interactions of Trunk, Hybrid, and Access ports, the concepts of VLAN tagging, untagging, and PVID, and demonstrates their behavior on Huawei switches through detailed configuration examples and traffic flow analysis.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Understanding Trunk, Hybrid, Access Ports and VLAN Tagging (Tag/Untag, PVID) on Huawei Switches

The article explains the relationships among Trunk, Hybrid, and Access ports and the VLAN tagging concepts of Tag, Untag, and PVID, focusing on Huawei switch implementations.

Definitions :

1. Trunk port : can carry packets of multiple VLANs simultaneously, typically used for links between switches.

2. Hybrid port : also carries multiple VLANs and can be used for switch‑to‑switch links or switch‑to‑server connections.

3. Access port : belongs to a single VLAN and is usually used to connect end devices such as computers.

4. Tag and Untag : a tag is the VLAN identifier attached to a packet; an untagged packet carries no VLAN ID.

5. PVID (Port VLAN ID): the VLAN ID assigned to an untagged port. When an untagged packet enters the switch, the switch adds the PVID as a tag; if the packet already carries a tag, the switch generally does not add another tag.

Port Tag and Untag Behavior :

If a port is configured as untagged, all packets forwarded out of that port are sent without a VLAN tag; incoming tagged packets lose their tag when passing through the untagged port. Conversely, a tagged (tagged) port adds a VLAN tag to any untagged packet that enters it, using the ingress port’s PVID as the VLAN ID.

Encapsulation Types :

• ISL : Cisco‑specific trunking where all packets are tagged.

• 802.1Q : Designed for compatibility with devices that do not support VLANs; it allows one VLAN to be untagged while the others are tagged.

Configuration Example (Huawei) :

[Switch-Ethernet0/1]int e0/1

[Switch-Ethernet0/1]port link-type hybrid

[Switch-Ethernet0/1]port hybrid pvid vlan 10

[Switch-Ethernet0/1]port hybrid vlan 10 20 untagged

[Switch-Ethernet0/2]int e0/2

[Switch-Ethernet0/2]port link-type hybrid

[Switch-Ethernet0/2]port hybrid pvid vlan 20

[Switch-Ethernet0/2]port hybrid vlan 10 20 untagged

With this configuration, PCs connected to e0/1 and e0/2 can communicate, but the traffic traverses different VLANs in each direction.

Traffic Flow Example :

When PC1 sends data, the packet is tagged with VLAN 10 (the PVID of e0/1) and entered into the switch. Because e0/2 allows VLAN 10, the switch forwards the packet to e0/2; since VLAN 10 is configured as untagged on e0/2, the switch strips the tag before delivering it to PC2, so the PC1→PC2 path uses VLAN 10.

Conversely, PC2’s reply is tagged with VLAN 20 (the PVID of e0/2). The switch forwards it to e0/1, where VLAN 20 is untagged, so the tag is removed before reaching PC1, making the PC2→PC1 path use VLAN 20.

networkingHybridswitchHuaweiVLANtrunkaccesspvid
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

login 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.