Cisco & Networking · Lesson 08

Trunks, Native VLANs & 802.1Q

Learn how switches carry multiple VLANs across one physical link, how 802.1Q tagging preserves VLAN identity, and how native VLAN and allowed-VLAN mistakes can break large parts of a network.

Trunks have a much larger failure scope than ordinary access ports. This lesson emphasizes inspection, dependency mapping, narrow changes, and full verification before saving.

Lesson Snapshot

Core concepts6
Trunk flow stages6
Inspection commands8
Main goalCarry only required VLANs

Learning objectives

Understand trunk behavior before changing the link

01

Explain how 802.1Q trunks carry multiple VLANs across one physical link.

02

Distinguish tagged VLAN traffic from native VLAN traffic.

03

Understand allowed VLAN lists and why unnecessary VLAN carriage increases exposure.

04

Inspect trunk state safely before making configuration changes.

05

Recognize native VLAN mismatches, missing VLANs, and trunk-mode mistakes.

06

Verify required VLAN connectivity across multiple switches without opening unnecessary paths.

Core idea

One physical link can preserve many logical LANs

802.1Q tagging lets VLAN 10 remain VLAN 10 and VLAN 20 remain VLAN 20 as both cross the same inter-switch connection.

Competition warning

Trunk changes have wide impact

One incorrect allowed-VLAN or native-VLAN change can disconnect many users, servers, and management paths at once.

Core concepts

Six ideas behind 802.1Q trunking

Trunk

A switch link that can carry traffic for multiple VLANs across one physical interface.

802.1Q

The common Ethernet tagging standard that inserts VLAN information into frames so switches can preserve VLAN identity across trunk links.

Tagged VLAN

A VLAN whose frames cross the trunk with an 802.1Q tag identifying their VLAN membership.

Native VLAN

The VLAN associated with untagged traffic on an 802.1Q trunk. Native VLAN behavior must match on both ends of the link.

Allowed VLAN list

The set of VLANs permitted to cross a trunk. Restricting the list can reduce unnecessary Layer 2 exposure.

Trunk mismatch

A condition where two ends disagree about trunk mode, native VLAN, or allowed VLANs and cause connectivity or security problems.

Trunk flow

Follow one frame across two switches

01

Frame enters on an access port

A workstation sends a normal Ethernet frame into its assigned access VLAN.

02

Switch associates the frame with a VLAN

The access port tells the switch which VLAN the frame belongs to.

03

Frame reaches the trunk

If the destination path crosses another switch, the frame must traverse a trunk.

04

802.1Q preserves VLAN identity

The switch tags the frame for its VLAN unless the traffic belongs to the trunk's native VLAN.

05

Remote switch reads the tag

The receiving switch uses the VLAN tag to place the frame back into the correct VLAN context.

06

Frame exits through the correct local port

The remote switch forwards the frame toward the destination access port in the same VLAN.

802.1Q tag

What the trunk adds to Ethernet

TPID

Identifies the presence of an 802.1Q tag in the Ethernet frame.

Priority information

Includes quality-of-service related bits used for traffic priority.

DEI

Provides drop-eligibility information in the tag.

VLAN ID

Identifies which VLAN the frame belongs to on the trunk.

You do not need to memorize every bit position to troubleshoot a competition trunk. The important idea is that the tag preserves VLAN identity while the frame crosses a shared infrastructure link.

Access vs trunk

Know the link role before changing switchport mode

Typical role

Access

Endpoint-facing link for one ordinary data VLAN.

Trunk

Infrastructure link carrying multiple VLANs.

Frames

Access

Usually untagged to the endpoint.

Trunk

Usually tagged for non-native VLANs.

VLAN count

Access

One primary access VLAN.

Trunk

Multiple VLANs may be permitted.

Common peers

Access

PC, printer, server, camera, endpoint.

Trunk

Switch, router-on-a-stick interface, access point, hypervisor.

Failure scope

Access

Usually affects one endpoint or small local group.

Trunk

Can affect many VLANs and many users at once.

Cisco inspection

Inspect the trunk from multiple angles

show interfaces trunk

Display active trunk interfaces, native VLAN, allowed VLANs, and forwarding VLAN state.

show interfaces <interface> switchport

Inspect administrative and operational switchport mode, native VLAN, and trunk properties on one interface.

show running-config interface <interface>

Review the exact configuration on the suspected trunk.

show vlan brief

Confirm required VLANs exist locally on the switch.

show mac address-table

Observe learned MAC addresses and whether remote VLAN devices appear through the expected trunk.

show spanning-tree vlan <vlan-id>

Check whether spanning-tree state allows forwarding for the VLAN across the intended path.

show cdp neighbors detail

Identify connected Cisco neighbors and interface relationships where CDP is enabled.

show interfaces status

Review physical link state and identify interfaces operating as trunks or access links on supported platforms.

Packet Tracer support varies

Some simulated switch models show fewer trunk fields or support a reduced command set. Use the closest available show commands and focus on operational trunk state, VLAN carriage, and end-to-end behavior.

Trunk configuration

Inspect first, then change the smallest necessary setting

01

Verify the peer

show cdp neighbors detail

Confirm the interface really connects to the expected switch or infrastructure device.

02

Inspect current trunk state

show interfaces GigabitEthernet0/24 switchport

Check administrative mode, operational mode, native VLAN, and negotiated behavior.

03

Inspect active trunks

show interfaces trunk

See which interfaces are actually trunking and what VLANs are carried.

04

Enter the interface

interface GigabitEthernet0/24

Work only on the confirmed infrastructure link.

05

Set trunk mode

switchport mode trunk

Configure the interface as a static trunk on platforms that support this command.

06

Restrict allowed VLANs

switchport trunk allowed vlan 10,20,30,99

Permit only the VLANs the topology actually requires.

07

Set native VLAN if required

switchport trunk native vlan 99

Use only when the design explicitly calls for a specific native VLAN and both ends will match.

08

Verify both ends

show interfaces trunk

Confirm trunk state, allowed VLANs, native VLAN, and forwarding behavior on both switches.

Allowed VLANs

Permit only what the path requires

Allowed does not mean active

A VLAN can be permitted on the trunk but still not exist or be active on the local switch.

Active does not mean forwarding

A VLAN can exist and be allowed yet still be blocked by spanning-tree or another condition.

More is not always better

Allowing every VLAN across every trunk increases unnecessary broadcast reach and expands the impact of mistakes.

Restrict carefully

Removing a required VLAN from the allowed list can disconnect an entire segment across the trunk.

Verify both directions

A trunk configuration must be logically compatible at both ends. Inspect both devices where possible.

Document dependencies

Before pruning a VLAN, identify downstream access ports, gateways, services, management paths, and wireless or virtualization dependencies.

Native VLAN

Untagged traffic still needs a shared interpretation

Untagged traffic

On a standard 802.1Q trunk, traffic belonging to the native VLAN is commonly sent untagged unless platform settings alter that behavior.

Both ends must agree

If one end uses native VLAN 99 and the other uses native VLAN 1, untagged frames can be interpreted as different VLANs.

Mismatch warnings matter

Cisco devices may report native VLAN mismatches through CDP or logs, which is valuable troubleshooting evidence.

Native VLAN is not automatically management

Some designs use a dedicated management VLAN, but the native VLAN role is separate from the question of management addressing.

Avoid assumptions about VLAN 1

Default behavior often involves VLAN 1, but the scenario may intentionally use another native VLAN.

Do not change one side alone

Changing native VLAN on only one trunk endpoint can create immediate inconsistency.

Operational state

Configured intent and actual behavior can differ

Operational trunk

The interface is actively carrying multiple VLANs as a trunk.

Administrative trunk, not operational trunk

The local configuration expects a trunk, but link state or peer configuration prevents active trunking.

Access mode

The interface carries one access VLAN and is not functioning as a trunk.

Dynamic mode

Some Cisco switch platforms support negotiation-based modes. Static trunk or access settings are often clearer in controlled competition environments.

Reading trunk output

Allowed, active, and forwarding are different states

Vlans allowed on trunk

The configured allowed list. These VLANs are permitted in principle.

Vlans allowed and active

The subset that is both allowed and present/active locally.

Vlans in spanning tree forwarding state and not pruned

The VLANs currently eligible to forward across that trunk.

Native VLAN

The VLAN associated with untagged traffic on that trunk.

Controlled examples

Configure with explicit scope and verification

Create a static inter-switch trunk

Commands

configure terminalinterface GigabitEthernet0/24description Uplink to SW2switchport mode trunkend

Verify

show interfaces trunk

Caution

Confirm the peer interface is also intended to trunk.

Restrict the trunk to required VLANs

Commands

configure terminalinterface GigabitEthernet0/24switchport trunk allowed vlan 10,20,30,99end

Verify

show interfaces trunk

Caution

Do not remove a VLAN until you confirm it is unnecessary on every dependent path.

Set an explicitly required native VLAN

Commands

configure terminalinterface GigabitEthernet0/24switchport trunk native vlan 99end

Verify

show interfaces GigabitEthernet0/24 switchport

Caution

Apply matching native VLAN settings to the peer trunk according to the authorized design.

Allowed-list commands

Understand whether you are adding, removing, or replacing

switchport trunk allowed vlan add 40

Add VLAN 40 to an existing allowed list without replacing the entire list on supported IOS versions.

switchport trunk allowed vlan remove 40

Remove VLAN 40 from the allowed list on supported IOS versions.

switchport trunk allowed vlan 10,20,30

Set the allowed list to exactly the VLANs shown, replacing the previous list.

switchport trunk allowed vlan all

Permit all supported VLANs across the trunk.

Replacing the list is high impact

The command without add or remove may replace the entire allowed list. Recheck all required VLANs before using it on a production-like competition topology.

Spanning-tree context

A trunk can exist without forwarding every VLAN

Trunking and spanning-tree interact

A VLAN can be correctly configured on a trunk yet still not forward on that interface if spanning-tree blocks the path.

Blocked is not broken

Spanning-tree blocking can be intentional loop prevention rather than a fault.

Check per VLAN when supported

Different VLANs can have different spanning-tree states depending on platform and mode.

Do not force forwarding blindly

Changing spanning-tree simply because a trunk port is blocked can create loops and widespread outages.

Trunk negotiation

Know when the device is negotiating instead of obeying a static role

Dynamic Trunking Protocol

Some Cisco switches can negotiate trunk formation using DTP.

Dynamic auto

A passive mode that can form a trunk if the peer actively negotiates.

Dynamic desirable

An active mode that attempts to form a trunk with a compatible peer.

Static mode is easier to audit

In controlled lab and competition environments, explicit access or trunk configuration often reduces ambiguity.

Platform support varies

Packet Tracer models and modern switch families may expose different DTP commands and defaults.

Security reasoning

Reduce unnecessary trunk exposure without breaking dependencies

Minimize unnecessary VLAN carriage

A trunk should carry the VLANs required by the topology, not every VLAN by default when tighter scope is practical.

Keep unused access ports out of trunk mode

Endpoint ports should not accidentally negotiate or operate as trunks.

Protect management paths

If the management VLAN must cross a trunk, verify it deliberately because removing it can lock out remote administration.

Do not rely on native VLAN changes alone

Changing the native VLAN is not a substitute for broader switch security and proper allowed-VLAN design.

Static roles reduce ambiguity

Explicitly configured access and trunk roles are easier to audit than relying on dynamic negotiation.

Verify before saving

A trunk change can impact many VLANs, so test required paths before persisting the configuration.

Troubleshooting

Use the failure pattern to narrow the trunk problem

VLAN 10 works across the trunk but VLAN 20 does not

Verify VLAN 20 exists on both switches, is allowed on the trunk, is active, and is not blocked by spanning-tree.

No VLANs work across an expected inter-switch link

Check physical state, operational trunk mode, peer configuration, encapsulation support, and whether the wrong interface was configured.

Hosts in the same VLAN work locally on each switch but not across switches

Inspect the trunk, allowed VLAN list, VLAN existence, and spanning-tree state for that VLAN.

CDP reports a native VLAN mismatch

Compare native VLAN configuration on both ends before changing either side.

One trunk carries unexpected VLANs

Review the allowed VLAN list and confirm which downstream dependencies actually require those VLANs.

A trunk is up but MAC addresses for one remote VLAN never appear

Check allowed/active VLAN state, downstream endpoint activity, VLAN presence, and whether spanning-tree is forwarding.

Evidence-based reasoning

Diagnose the trunk before broadening it

Gi0/24 carries VLANs 10 and 20, but VLAN 30 is missing

Weak response

Convert every switchport to trunk mode.

Better reasoning

Inspect the existing trunk and allowed VLAN list. The issue may be limited to VLAN 30 being absent, inactive, or blocked.

A trunk allows VLANs 1-4094

Weak response

Leave it because more VLANs means better connectivity.

Better reasoning

Determine which VLANs are actually required and reduce unnecessary carriage only after mapping dependencies.

CDP reports native VLAN 99 on one side and VLAN 1 on the other

Weak response

Ignore it because native VLANs do not matter.

Better reasoning

Treat it as a real mismatch. Compare both interfaces and align them with the documented design.

A trunk is up, but one VLAN is not forwarding

Weak response

The physical link must be bad.

Better reasoning

Check VLAN existence, allowed state, active state, and spanning-tree forwarding for the affected VLAN.

An endpoint-facing port is operating as a trunk

Weak response

Leave it because the endpoint currently works.

Better reasoning

Confirm the endpoint role. If it should be a normal access device, explicitly configure the correct access mode and VLAN.

A management VLAN is removed from the trunk allowed list

Weak response

Continue configuring remotely to see what happens.

Better reasoning

Recognize the risk of management lockout. Preserve console access and restore required management connectivity deliberately.

Unsafe shortcuts

Trunk changes that can break many networks at once

Allowing every VLAN on every trunk

Expands broadcast reach and creates unnecessary Layer 2 exposure across the topology.

Removing VLANs from allowed lists without mapping dependencies

Can disconnect users, servers, wireless networks, management, or routed gateway paths.

Changing native VLAN on only one end

Creates a mismatch that can misclassify untagged traffic.

Turning endpoint ports into trunks

Can expose multiple VLANs where only one should be present.

Ignoring spanning-tree state

You may misdiagnose an intentional blocked path as a trunk failure.

Saving immediately after trunk changes

A broad connectivity mistake can become persistent before required VLAN paths are verified.

Practice scenarios

Choose the safest next trunk action

VLAN 10 works across SW1-SW2, but VLAN 20 hosts only work locally.

Check VLAN 20 existence, allowed VLAN list, and spanning-tree state on the inter-switch trunk.

show interfaces trunk lists VLAN 30 as allowed but not active.

Verify VLAN 30 exists and is active locally. Allowed status alone does not prove the VLAN is operational.

One side uses native VLAN 99 and the other uses native VLAN 1.

Treat this as a trunk mismatch. Align both ends with the documented topology.

An endpoint port unexpectedly appears as a trunk.

Confirm the connected device role. If it is a normal endpoint, explicitly configure access mode and the correct access VLAN.

A teammate wants to use allowed vlan all to fix a missing VLAN.

Identify the specific required VLAN instead. Broadly allowing all VLANs can hide the real issue and increase exposure.

A trunk is operational, but the management subnet becomes unreachable after pruning VLANs.

Check whether the management VLAN was removed. Restore only the required management path and verify before continuing.

Verification

Prove the trunk carries only the required VLANs

Peer role

Both ends of the link are intended infrastructure peers.

Operational mode

The interface is actually trunking, not merely configured to try.

Native VLAN

Both ends use the same native VLAN according to the design.

Allowed VLANs

Every required VLAN is permitted and unnecessary VLANs are not carried without reason.

Active VLANs

Required VLANs exist and are active on the relevant switches.

Spanning-tree

Required VLANs are forwarding across the intended path.

MAC learning

Remote endpoint MAC addresses appear through the expected trunk.

End-to-end traffic

Same-VLAN hosts communicate across switches and required management remains reachable.

Defensive lab

Build, break, and repair a fictional inter-switch trunk

01

Build a fictional topology with SW1 and SW2 connected by one uplink, with VLANs 10 STAFF, 20 STUDENTS, and 99 MANAGEMENT.

02

Place one Staff and one Student endpoint on each switch using access ports.

03

Configure the inter-switch link as a trunk and allow VLANs 10,20,99.

04

Verify same-VLAN communication across the trunk while Staff and Student traffic remain in separate broadcast domains.

05

Remove VLAN 20 from the allowed list on one trunk and observe the specific failure that results.

06

Use show interfaces trunk and show vlan brief to identify why VLAN 20 fails while VLAN 10 still works.

07

Restore VLAN 20, then introduce a native VLAN mismatch and inspect the resulting warnings or behavior available in Packet Tracer.

08

Correct the mismatch, verify all required VLANs, and document final trunk state before saving.

Lesson checklist

Before moving on

01

I can explain what an 802.1Q trunk does.

02

I understand how VLAN tags preserve VLAN identity across switch links.

03

I know that native VLAN traffic is handled differently from ordinary tagged VLAN traffic.

04

I verify native VLAN configuration on both ends of a trunk.

05

I understand the difference between allowed, active, and forwarding VLANs.

06

I can inspect trunk state with Cisco IOS show commands.

07

I do not allow every VLAN across every trunk without reason.

08

I do not remove VLANs before mapping downstream dependencies.

09

I understand that spanning-tree can block a trunk path intentionally.

10

I recognize the risk of accidentally trunking an endpoint-facing port.

11

I verify same-VLAN connectivity across switches after trunk changes.

12

I preserve required management connectivity before saving the configuration.

Reflection

Check your reasoning

Question 1

Why does an inter-switch trunk need VLAN tags?

Question 2

What is the difference between an allowed VLAN and a forwarding VLAN?

Question 3

Why can a native VLAN mismatch cause confusing behavior?

Question 4

Why is allowing every VLAN on every trunk usually a poor default?

Question 5

How can spanning-tree make a correctly configured trunk appear to fail for one VLAN?

Question 6

What should you verify before removing a VLAN from a trunk allowed list?

Carry this forward

A trunk is a shared transport path for multiple VLANs. Always check mode, allowed VLANs, native VLAN, active state, spanning-tree, and downstream dependencies before changing it.