Lessons · Network switches · what every port was doing
What every port was doing, before you unplug it
`show interfaces status` is one line per port -- description, link, VLAN, duplex, speed -- and printed before a swap it becomes the check afterwards.
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
Cables come out in a handful and go back in whatever order. Without a before, there is no after: a port that is quietly in the wrong VLAN looks exactly like a port that is right.
How to think about it
Print it, keep it, and compare line by line when the new box is up. Every port that was connected should be connected, in the same VLAN, at the same speed.
Worked example
enableIn.
configure terminalDescriptions are configuration, so they travel with the backup.
interface gi0/2One port.
description Reception printerWritten on the switch rather than on a label that falls off.
exitBack out.
exitAnd out of config mode.
show interfaces statusThe map. This is the page you take with you.
Your turn
Show every port's link state, VLAN and speed on one screen.
show interfaces
Console into a switch
The trap
Trusting the descriptions alone. They are what somebody typed when the port was patched, not what is plugged in now.