Hone

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

enable
The # prompt.
configure terminal
Into configuration mode.
vlan 10
A VLAN for people.
name STAFF
Named.
exit
Out.
interface gi0/2
A desk port, which is in VLAN 1 because everything is.
switchport mode access
Access.
switchport access vlan 10
And out of VLAN 1.
end
Out.
show vlan brief
Gi0/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 

The trap

Trying to delete VLAN 1 to force the issue. The switch refuses, because parts of its own operation depend on it existing.

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