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
enableThe # prompt.
configure terminalInto configuration mode.
vlan 999A VLAN with nothing in it, on purpose.
name NATIVE-UNUSEDThe name says what it is for, so nobody puts a desk in it.
exitOut.
interface gi0/1The uplink.
switchport mode trunkA trunk.
switchport trunk native vlan 999Untagged frames on this link now belong to 999, not to 1.
endOut.
show running-configThe 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
Console into a switch
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.