Lessons · Network switches · checking the VLANs came out right
Check the VLANs, because they are what is missing
A restored port asks for its VLAN and the switch creates it on the spot, named VLAN0030. The number came back. The name never left the old box.
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
`show vlan brief` is the one screen where the gap between a configuration backup and a working switch is visible, and it is visible as a name nobody chose.
How to think about it
Read the list against what you printed before the swap. Numbers first, then names, then which ports are in each.
Worked example
enableIn.
configure terminalThis is what a restore does, one line at a time.
interface gi0/3A port from the old configuration.
switchport mode accessAn ordinary desk port.
switchport access vlan 30The switch says it out loud: the VLAN did not exist, so it made one.
exitOut of the port.
do show vlan briefVLAN0030. That is the switch's own placeholder, not your name for it.
vlan 30Same VLAN, now on purpose.
name FINANCEThe step the backup could not do for you.
endDone.
show vlan briefFINANCE. Now the list matches the paper.
Your turn
List the VLANs and which ports are in them.
show brief
Console into a switch
The trap
Seeing 30 in the list and moving on. The number forwards traffic and tells the next engineer nothing.
Practise checking the VLANs came out right on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.