Perhaps you are asked to configure a switch port or see what MAC address is on what port. Maybe this isn’t something you do every day and need a refresher course on the most basic Cisco switch administration tasks. Let’s find out how to perform some basic Cisco switch administration tasks.
Before you can administer the switch you are going to need some basic information:
One option to configure the switch might be a web-based administration interface. If this is the case, basic configurations aren’t going to be that difficult and perhaps you don’t need much more help. On the other hand, GUI interfaces aren’t always available, but on Cisco IOS switches, the Cisco IOS Command Line Interface (CLI) always is. Plus, in a GUI interface, you won’t be able to configure every possible configuration as you can with the CLI. For that reason, I encourage you to use the IOS CLI. The Cisco IOS CLI will be used in this article to perform several common switch administration tasks.
Just like on a router, the most common switch IOS command is to show the switch’s configuration. This will show you the configuration for the entire switch, including all the Ethernet ports on the switch. To see switch configuration, just type show running-config, like this:
Most of the time you are going to a switch, you want to troubleshoot a switch port, or change a switch port configuration. The quickest way to see the status of your switch ports is to use the show interfaces status, like this:
This command shows each port: if the port is connected to the device, the VLAN the port is in, the port duplex, the port speed, and port type. This is an excellent quick way to see status for your switch ports.
Say that you see that interface Fa0/21 is set to auto (auto negotiate) for its speed but it needs to be set to 10Mb/sec. To change the speed of any port, you go to interface configuration mode and use the speed command, like this:
On this switch, the possible speeds for the 10/100 Ethernet ports are auto, 10, and 100. On the Gigabit Ethernet ports, you can only tell the switch to either negotiate port speed or not to negotiate port speed. Once the speed is configured to 10Mb, you can verify it with the show interfaces fa0/21 status, like this:
As you can see, the speed is now set to 10. To change the duplex of a port, you perform the same steps but use the duplex command. Duplex can be set to auto, full, or half.
To enable and disable interfaces, you use the no shutdown and the shutdown command in interface configuration mode. Here is an example:
Notice how when the port was shutdown, console messages appear that told you the administrative state had changed to down, and the line protocol changed to down. When the port was enabled (no shutdown), the link went down, then the line when up, then the line protocol changed to up.
You could now do a show interfaces status to see the state of the interface.
Here is what we have learned: