Lessons · Network switches · VLAN 1
VLAN 1 is not a good place to live
Every port is in VLAN 1 out of the box, and control traffic uses it, so leaving user devices there mixes management with everything else.
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 the default that quietly becomes the design. A network where everything is in VLAN 1 has no separation at all, and no one decided that; it just never got changed.
How to think about it
Move users into a numbered VLAN, move management into another, and leave VLAN 1 with as little on it as you can. Never delete it: the switch will not let you.
Worked example
enableThe # prompt.
configure terminalInto configuration mode.
vlan 10A VLAN for people.
name STAFFNamed.
exitOut.
interface gi0/2A desk port, which is in VLAN 1 because everything is.
switchport mode accessAccess.
switchport access vlan 10And out of VLAN 1.
endOut.
show vlan briefGi0/2 has moved to STAFF. The other seven ports are still on the default line, which is what an unconfigured switch looks like.
Your turn
Move this desk port off the default VLAN and into 10.
switchport access vlan
Console into a switch
The trap
Trying to delete VLAN 1 to force the issue. The switch refuses, because parts of its own operation depend on it existing.