A trunk port is a switch port that carries traffic for multiple VLANs over a single link, using IEEE 802.1Q tagging to label each frame with its VLAN. It is used for links between switches, and between a switch and a router or access point, while an access port carries only one VLAN and is used for end devices such as PCs and printers.
Key takeaways
- A trunk port carries many VLANs on one link; an access port carries one VLAN for one end device.
- 802.1Q tagging adds a 4-byte tag to each frame, and the native VLAN is the one VLAN whose frames travel untagged.
- A misconfigured trunk is a security hole: change the native VLAN off VLAN 1, allow only needed VLANs, and disable trunk negotiation on access ports.
A network with one cable per VLAN would need a lot of cables. A trunk port solves that: it lets several virtual networks share one physical link, with each frame labeled so the switch at the other end knows where it belongs. It is one of the most useful — and most commonly misconfigured — settings in switching.
What is a trunk port?
A trunk port is a switch port configured to carry traffic for multiple VLANs over a single link. It is a point-to-point link between a switch and another networking device — usually another switch, a router, or a wireless access point — and it uses IEEE 802.1Q tagging to keep the VLANs separate on the shared cable.
Cisco's documentation puts it plainly: an access port can have only one VLAN configured on it, while a trunk port can have two or more VLANs configured on it and carry traffic for several VLANs simultaneously. All Layer 2 switching ports maintain MAC address tables, and a port cannot function as both an access port and a trunk port at the same time.
Trunks are how VLANs extend across a network. Without them, a VLAN would be trapped on a single switch, and every VLAN that needed to reach another switch would need its own cable. Our guide to securing your Wi-Fi covers the home side of the same segmentation idea.
How does VLAN tagging work?
VLAN tagging uses the IEEE 802.1Q standard. When a frame leaves a trunk port, the switch inserts a 4-byte tag into the Ethernet frame header carrying the VLAN ID, so the receiving switch knows which VLAN the frame belongs to. When the frame reaches its destination access port, the switch removes the tag before delivering it to the end device, which never sees the tag.
The tag is what makes sharing possible. Without it, a switch receiving frames from several VLANs on one cable would have no way to tell them apart, and traffic from one VLAN could leak into another. With it, each frame is labeled at the door and sorted on arrival.
TP-Link's tagging guide makes the same point in plain terms: an untagged port, commonly called an access port, typically carries one VLAN and removes the tag before forwarding, while a tagged port, commonly called a trunk port, can carry multiple VLANs and keeps the tags so receiving equipment can distinguish the traffic. See TP-Link's tagged vs untagged VLAN guide for a worked example.
Trunk port vs access port: what is the difference?
The difference is how many VLANs the port carries, whether frames are tagged, and what is normally connected to it. An access port is simple and safe by default; a trunk port is powerful and must be configured deliberately.
| Access port | Trunk port | |
|---|---|---|
| VLANs carried | One | Two or more, often many |
| Frame tagging | Untagged — tag removed before delivery | Tagged with 802.1Q, except the native VLAN |
| Connects to | End devices: PCs, printers, cameras, phones | Switches, routers, firewalls, access points |
| Default VLAN | The one assigned VLAN, or VLAN 1 if none is set | All VLANs by default on many switches — restrict this |
| Typical risk | Low — one VLAN can be reached | Higher — misconfiguration can expose many VLANs |
| Configuration | Set the access VLAN | Set trunk mode, native VLAN and allowed VLAN list |
There is also a third type on some vendors' switches, the hybrid port, which can carry both tagged and untagged traffic for multiple VLANs. It is useful in mixed environments, but it adds complexity and is easier to get wrong, so use it only where a plain trunk or access port genuinely does not fit.
What is the native VLAN?
The native VLAN is the one VLAN whose frames travel over a trunk port without a tag. When a trunk port receives an untagged frame, it assigns that frame to the native VLAN, and when it sends a native VLAN frame across the trunk, it sends it untagged. Every other VLAN on the trunk is tagged.
On Cisco switches the native VLAN defaults to VLAN 1, the default VLAN that also carries management traffic on many networks. That default is the root of the most common trunk security problem, covered below.
The native VLAN exists for compatibility: it lets a trunk carry traffic from devices that do not understand tagging, and it carries control traffic such as spanning tree and discovery protocols. In a clean design, the native VLAN is an unused VLAN ID that carries no user traffic at all, so untagged frames arriving on a trunk have nowhere useful to go.
Where are trunk ports used?
Trunk ports appear in three places: switch-to-switch uplinks, switch-to-access-point links carrying multiple SSIDs, and switch-to-router or switch-to-firewall links serving several network segments. In each case, one physical link replaces many, and the VLAN tags keep the segments separate.
A common small-business example is a single access point broadcasting three Wi-Fi networks — staff, guest and IoT — with each network on its own VLAN. The link from the access point to the switch is a trunk carrying all three VLANs, and the link from the switch to the router is another trunk, so the router can apply different firewall rules to each network.
In a data center, trunks carry VLANs between switches in the same rack and between racks, and to virtualization hosts where each virtual machine sits on its own VLAN. The same principle applies at every scale: one link, many labeled networks.
How do you configure a trunk port?
Configuration differs by vendor, but the steps are the same on Cisco, TP-Link Omada and most managed switches. The example below uses Cisco IOS commands, as documented in Cisco's Ethernet switch port guide.
- Create the VLANs first. A trunk cannot carry a VLAN that does not exist on the switch.
- Set the port mode explicitly. Use
switchport mode trunkon the trunk port, andswitchport mode accesswithswitchport nonegotiateon access ports, so no port can negotiate its way into trunking. - Set the native VLAN to an unused ID. For example,
switchport trunk native vlan 999, where VLAN 999 carries no user traffic. - Allow only the VLANs that need to cross. Use
switchport trunk allowed vlan 10,20,30instead of allowing all VLANs. - Verify with
show interface trunk. Check the mode, the native VLAN and the allowed list on both ends of the link — both ends must agree.
On TP-Link Omada and similar systems the same settings appear as tagged and untagged port membership and a PVID (port VLAN ID) setting, which is the equivalent of the native VLAN for untagged frames. The names differ; the concepts do not.
What are the security risks of trunk ports?
Trunk ports are a security risk when they are left in their default state. Two attacks exploit that state, and both are well documented: switch spoofing and double tagging, together known as VLAN hopping.
In switch spoofing, an attacker connected to an access port uses the Dynamic Trunking Protocol (DTP) to negotiate the port into trunk mode, and suddenly receives tagged frames for every VLAN on the switch. The fix is to set access ports to access mode explicitly and disable negotiation with switchport nonegotiate.
In double tagging, an attacker on the native VLAN crafts a frame with two 802.1Q tags: an outer tag matching the native VLAN and an inner tag for the target VLAN. The first switch strips the outer tag because the native VLAN travels untagged, and the next switch forwards the frame into the target VLAN.
Network World documents this attack and its fix: tag the native VLAN explicitly, or move it to an unused VLAN and remove it from the trunk, as explained in Network World's native VLAN guidance.
Both attacks are one-way in the double-tagging case — the attacker can send into the target VLAN but cannot easily receive replies — but one-way is enough for DHCP starvation, ARP spoofing and single-direction packet injection. The defense is the same in both cases: explicit modes, a moved native VLAN, and a restricted allowed list.
What are the common trunk port mistakes?
The most common mistake is allowing all VLANs on every trunk. A trunk that carries VLANs it does not need gives an attacker more networks to reach and makes troubleshooting harder. Allow only the VLANs that must cross that link, and review the list when networks change.
The second is leaving the native VLAN on VLAN 1, or using the native VLAN for user traffic. The native VLAN should be an unused ID, and it should not be assigned to any access port.
The third is a native VLAN mismatch: the two ends of a trunk configured with different native VLANs. Traffic then leaks between VLANs, and spanning tree and discovery protocols misbehave. The symptom is usually intermittent connectivity that is hard to diagnose, which is why verifying both ends with show interface trunk is part of every trunk change.
The fourth is leaving DTP enabled on access ports, which invites switch spoofing. And the fifth is forgetting that a trunk port by default is a member of all VLANs in the VLAN database on many Cisco switches — so a newly created VLAN can silently start crossing trunks you never intended it to use.
The bottom line
A trunk port is a switch port that carries multiple VLANs over one link, with 802.1Q tags keeping them apart and the native VLAN carrying untagged traffic. Used deliberately, it is how VLANs scale across a network; left in its default state, it is a VLAN hopping risk.
Configure trunks explicitly, move the native VLAN off VLAN 1, allow only the VLANs you need, and verify both ends of every link. You can check whether your own network exposes unexpected services with our free what is my IP tool.
For the wider picture, our small business cybersecurity checklist covers network segmentation alongside backups, updates and MFA.
Frequently asked questions
What is a trunk port in simple terms?
A trunk port is a switch port that carries traffic for several VLANs at once over a single cable. Each frame is tagged with its VLAN number, so the switch at the other end knows which network it belongs to.
What is the difference between a trunk port and an access port?
An access port belongs to one VLAN and sends frames without a tag, for end devices such as PCs and printers. A trunk port carries multiple VLANs, tags frames with 802.1Q, and connects switches to switches, routers or access points.
What is the native VLAN on a trunk port?
The native VLAN is the one VLAN whose frames travel over a trunk without a tag. All untagged traffic on the trunk is treated as belonging to the native VLAN. By default on Cisco switches it is VLAN 1, which should be changed for security.
What is 802.1Q tagging?
IEEE 802.1Q is the standard for VLAN tagging. It inserts a 4-byte tag into the Ethernet frame carrying a VLAN ID, so a switch can tell which VLAN a frame belongs to when several VLANs share one link.
Can a trunk port be a security risk?
Yes. A trunk left in auto-negotiation mode can be tricked into becoming a trunk by an attacker, and a native VLAN left on VLAN 1 enables double-tagging VLAN hopping attacks. Hardening means setting trunk mode explicitly, changing the native VLAN, and allowing only needed VLANs.
How many VLANs can a trunk port carry?
A trunk can carry many VLANs, up to the switch's limit — typically hundreds or thousands of VLAN IDs, since 802.1Q supports VLAN IDs 1 to 4094. In practice you should allow only the VLANs that actually need to cross that link.
Do I need a trunk port for a home network?
Usually not. A home network with one network needs no VLANs at all. You need a trunk only when you segment your network into VLANs — for example a guest network and an IoT network — and need them to cross a link between a switch and a router or access point.
What is a hybrid port?
A hybrid port, found on some vendors' switches, can carry both tagged and untagged traffic for multiple VLANs. It is more flexible than a trunk or access port, but it is also easier to misconfigure, so it is best used only where that flexibility is genuinely needed.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against Cisco's Layer 2 switching documentation, TP-Link's VLAN tagging guide and Network World's native VLAN guidance.
How we write and fact-check →