Hone

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

enable
In.
configure terminal
This is what a restore does, one line at a time.
interface gi0/3
A port from the old configuration.
switchport mode access
An ordinary desk port.
switchport access vlan 30
The switch says it out loud: the VLAN did not exist, so it made one.
exit
Out of the port.
do show vlan brief
VLAN0030. That is the switch's own placeholder, not your name for it.
vlan 30
Same VLAN, now on purpose.
name FINANCE
The step the backup could not do for you.
end
Done.
show vlan brief
FINANCE. Now the list matches the paper.

Your turn

List the VLANs and which ports are in them.

show  brief

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.