Show port status
Almost every time you switch to the switch, you must troubleshoot the switch port or change the switch port configuration. The quickest way to display the status of each switch port is to show show interfaces status :
This command is displayed: if the port is connected to the device, the VLAN is IN, displayed with the speed and model of the port. This is the fastest and best way to know the status of each switch port.
Change the speed and duplex of the interface
Interface Fa0 / 21 with the speed set to auto. However, this speed needs to be set to 10Mb / sec. To change the speed of the ports, go to interface configuration mode and use the speed command :
On this switch, the speed of 10/100 Ethernet ports is set to auto, 10 and 100. On the Gigabit Ethernet port you can only adjust the switch with the port speed being able or not able to detect the speed yourself. Once the speed is configured to 10Mb, you can check the interface Fa0 / 21 again like:
As you can see, the speed has been set to 10. To change the speed of both directions of the port, you perform the same step, but use the duplex command. Duplex can be set to auto , full or half .
Turn off and turn on interfaces
To enable or disable interfaces, you use the no shutdown / shutdown command in interface configuration mode. Here is an example:
Note that when the port is shut down, the communication message appears telling you that the management status has been changed to down , the line protocol is also converted to down . When the port is turned on, the line protocol will switch to up .
Now you can display the interface status to see its status.