Here is a collection of my most used and favourite commands with a brief description of what they do. If you haven’t used them before then hopefully you will find these useful! :-)
1. show interface fax/x – this gives you some really in depth information about the switch port. The most used thing for myself here would be the CRC section to check for errors on the port. Example below:
2. show interface fa0/8 status - this will tell you the status of the port. It will show if you have a cable connected and will say ‘connect’ under status or if it has no cable plugged in and will be ‘notconnect’. Will also show the VLAN, Duplex & Speed settings and the Type of connection.
3. show mac address-table | i - insertMAC (in the format of xxxx.xxxx.xxxx)Handy for troubleshooting. If you know the MAC address you can track down which VLAN it is in and the port it's attached to. This is good if the ports aren’t labelled with a description.
4. show logging - this shows what’s going on with various elements of the switching environment, can show flapping ports etc. This is also a good one for troubleshooting.
5. show clock & show version - Show clock relates strongly to the above show logging command. The show logging will give a time stamp and if you want to work out when a particular event happened and the clock is nonsensical then show clock will give you the time set on the switch. The event might have happened sooner than what you thought.
Show version is mostly used for checking the firmware on the switch and the uptime of the device. I use this all the time to figure out whether there has been power outages or circuit outages.
Example below shows both commands:
6. show vlan - this will show you which ports belong to which VLAN and will also show the VLANs that are currently setup on the switch. Unlike the example below, you should name your VLANs to make everyone’s life easier!
7. show run - No example for this as one as the output is the entire configuration of the switch. To narrow your search down you can also use pole include to refine the output i.e show run | i 192.168.8.8
8. show arp - useful for finding any IP addresses that are associated with the MAC address that you are troubleshooting.
9. show run interface fa0/8 - very handy command and one of my favourites. This saves you trawling through the running configuration, if you know the interface number then just show run on that interface to show only the config of that interface!
10. show interface description - Arguably my top command. As long as the descriptions are there, clear and useful (which they should be) then this allows you to find what you need quickly! Normally proceeded this would be show run interface fa0/8 to show how the interface is configured.
WHAT ARE YOU FAVOURITE COMMANDS? LEAVE A COMMENT BELOW :)