Hone

Lessons · Network switches · the native VLAN

The one VLAN on a trunk that goes untagged

A trunk tags every VLAN except its native one, which crosses the link with no tag at all.

Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.

What it is for

It is how a trunk can also carry traffic for a device that does not speak 802.1Q, and it is the setting that has to match on both ends or traffic silently changes VLAN.

How to think about it

Set it deliberately on both ends, to a VLAN with nothing on it. Leaving it at the default of 1 means untagged traffic lands in the VLAN where the control traffic lives.

Worked example

enable
The # prompt.
configure terminal
Into configuration mode.
vlan 999
A VLAN with nothing in it, on purpose.
name NATIVE-UNUSED
The name says what it is for, so nobody puts a desk in it.
exit
Out.
interface gi0/1
The uplink.
switchport mode trunk
A trunk.
switchport trunk native vlan 999
Untagged frames on this link now belong to 999, not to 1.
end
Out.
show running-config
The native vlan line sits under the interface, next to the trunk line, and it has to be typed on the switch at the other end too.

Your turn

Set the untagged VLAN on this trunk to 999.

switchport trunk  vlan 999

The trap

Changing it on one end only. Both switches accept the change and neither complains; the traffic just moves between VLANs, which is worse than it failing.

Practise the native VLAN on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.