Hone

Lessons · Network switches · wiping the one that is leaving

Two files, in two places

`erase startup-config` clears NVRAM. The VLAN database is not in NVRAM -- it is a file on flash -- so it survives an erase and leaves with the 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

What is on a retired switch is a map of your network with the password hashes attached, and it is about to be in a courier's van.

How to think about it

Erase the startup config, delete the VLAN database, then reload so both take effect. And do it a week later, not on the night: until the new one has proved itself, the old one is your rollback.

Worked example

enable
In.
show flash:
Three files. The image, the config, and vlan.dat.
erase startup-config
NVRAM cleared. Notice what this did not touch.
show flash:
vlan.dat is still there, with your VLAN numbering in it.
delete flash:vlan.dat
The second file, in the second place.
show flash:
Now it is gone.
reload
And a restart, which is what makes both of them true.

Your turn

Clear the saved configuration out of NVRAM.

 startup-config

The trap

Erasing the startup config and calling the box clean. Your VLAN numbering is still on the flash, and so is everything it tells a stranger.

Practise wiping the one that is leaving on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.