Lessons · Network switches · putting the VLAN names back
Putting the VLAN names back
After a restore in the default mode the VLANs exist as numbers with default names, because a port assignment creates them and the name was never in the file.
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
VLAN0010 forwards exactly as STAFF did, so nothing is broken and nothing is labelled. The cost lands six months later on whoever has to work out what VLAN0010 was for.
How to think about it
Take `show vlan brief` off the old box before it goes, and retype the names on the new one. It is thirty seconds against an afternoon.
Worked example
enableIn.
configure terminalA port assignment on its own.
interface gi0/2One port.
switchport access vlan 10The switch makes VLAN 10 because a port asked for it, and says so.
exitOut.
exitAnd out.
show vlan briefVLAN0010: the default name, which is what a restore leaves you.
configure terminalNow put the name back.
vlan 10The same VLAN.
name STAFFNamed properly.
exitOut.
exitAnd out.
show vlan briefSTAFF. This is the step nobody writes down.
Your turn
Give VLAN 10 the name STAFF.
STAFF
Console into a switch
The trap
Assuming the restore brought them because the ports are in the right VLANs. The numbers travelled; the names did not.