There are many Cisco switch commands. These commands are divided into two main categories: show and configuration. A few of the more popular commands are listed below.
The "show" category of commands are used to observe the network. For example, if you want to see what hardware and software the switch is using type in "show version." To see how much RAM the system is currently using type "show running-config." To observe the last 10 commands given type "show history."
To find out information about a specific line use "show line console 0." If you want to observe all the files and directories in the memory use "show flash." And to see some information on all lines of the switch use "show line."
Let's continue on with just a few more show commands. If you'd like to view the configuration of the IP address for VLAN 1 then type "show interfaces VLAN 1." To show all the MAC addresses connected use "show mac-address-table." And finally, to see the information on all of the interfaces use "show interfaces."
Show commands are great to observe the network and troubleshoot issues. Now let's move on to commands that will change how the switch behaves. These fall under the configuration category of commands.
To change global configuration settings to the VLAN type "interface VLAN 1." To change settings to a specific interface use "Interface fast Ethernet 0/x." The IP address of any interface can be changed by typing "IP address."
"IP default-gateway" lets the user set the default gateway. The "Speed" command allows you to change the speed for the interface. "Duplex" is used to change the auto, full, and half duplex settings. "Configure terminal" is used to change the global configuration mode.
To assign a hostname to the Cisco switch type "hostname." To configure a specific line configuration use "Line console 0." These are just a few of the more popular commands that will allow you to troubleshoot and configure your network.