Lessons · Network switches · the VLAN that made itself
The VLAN that made itself
Putting a port into a VLAN that does not exist creates it, with a default name, and the switch tells you it did.
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 reason a typo does not fail loudly. `switchport access vlan 200` when you meant 20 does not error; it quietly builds VLAN 200 and moves the desk into an empty network.
How to think about it
Read the line the switch prints. '% Access VLAN does not exist. Creating vlan 200' is not information, it is a warning that you have just typed a number nobody planned.
Worked example
enableThe # prompt.
configure terminalInto configuration mode.
interface gi0/3A port.
switchport mode accessAccess mode.
switchport access vlan 200% Access VLAN does not exist. Creating vlan 200. The command succeeded, and that is the problem.
endOut.
show vlan brief200 VLAN0200 active Gi0/3. A VLAN nobody asked for, with a machine-generated name, and one desk stranded in it.
Your turn
Look at the VLAN table to find the one that appeared by accident.
show brief
Console into a switch
The trap
Reading the message as a confirmation. It is the switch telling you the number you typed was new to it, which on a planned network almost always means it was wrong.