Section 2.5: Switch Port Configuration
2.5.1: Port Description
Switch ports can have a text description added to their configuration which can be used to identify them. This description is only a comment field and is displayed when the switch configuration is shown.
To assign a port comment or description on an IOS-based switch use the following command in interface configuration mode:
Switch(config-if)# description description_str±ng
If the description string has embedded spaces, the entire string must be enclosed between quotation marks. To remove a description, use the no description interface configuration command.
To assign a port description on a CLI- based switch use the following command:
Switch(enable) set port name module_number/port_number descript±on_str±ng
The description_string in this command must be less than 21 characters long, and can have embedded spaces. To remove a port description, use the same command but omit the descr±pt±on_str±ng.
2.5.2: Port Speed
Switch ports can be assigned a specific speed through switch configuration commands. Ethernet ports can be set to speeds of 10, 100, and Auto for autonegotiate mode. Gigabit Ethernet ports are set to a speed of 1000 and 10Gigabit Ethernet ports are set to a speed of 10000. Token Ring ports can be set to speeds of 4, 16, and Auto for autosensing mode.
To assign port speed on an IOS-based switch, specify the port speed using the following interface configuration command:
Switch(config-if)# speed { 10 | 100 | auto }
IOS-based switches do not support Token Ring therefore there is no 4 or 16 speed setting. However, CLI-based switches support Ethernet, Fast Ethernet and Token Ring. For this reason there are two commands that can be used to set port speeds on CLI-based switches. For Ethernet and Fast Ethernet ports, use the following command:
Switch(enable) set port speed module_number/port_number { 10 | 100 | auto }
2.5.3: Ethernet Port Mode
Ethernet-based switch ports can also be assigned a specific link mode, half-duplex, full-duplex, or autonegotiated mode. Autonegotiation is only allowed on Fast Ethernet and Gigabit Ethernet ports. In this mode, full-duplex operation will be attempted first, and then half duplex if full duplex was not successful. The autonegotiation process repeats whenever the link status changes.
To set the link mode on an IOS-based switch port, use the following command in interface configuration mode:
Switch(config-if)# duplex { auto | full | half }
If the port is not automatically enabled or activated, you must use the no shutdown interface configuration command. You can use the show interface command to view the current speed and duplex state of a port.
Use the following command to set the link mode on a CLI-based switch:
Switch(enable) set port duplex module_number/port_number { full | half }
If the port is not automatically enabled or activated, use the set port enable command. You can use the show port command to view the current speed and duplex status of a port on a CLI-based switch.