By default, Cisco switches will auto-negotiate the speed and duplex settings. When you connect a device (either a switch, router, or a workstation) to a port on a Cisco switch, the negotiation process will occur and the devices will agree on the transmission parameters. Most of the today’s network adapters support this function.
Consider the following example network:
In the picture above you see a network of a hub, a switch, and a workstation. All three devices have auto-negotiation turned on. Because hubs can only operate in half duplex, the switch and hub will negotiate to use the speed of 100 Mbps and half-duplex. The workstation on the right is capable of 100 Mbps and supports full duplex, so the devices will use these parameters to communicate.
We can verify the speed and duplex settings using the show interface command on SW1:
SW1#show interface Fa0/1 FastEthernet0/1 is up, line protocol is up (connected) Hardware is Lance, address is 0009.7c66.6401 (bia 0009.7c66.6401) ... Half-duplex, 100Mb/s ... SW1#show int fa0/2 FastEthernet0/2 is up, line protocol is up (connected) Hardware is Lance, address is 0009.7c66.6402 (bia 0009.7c66.6402) ... Full-duplex, 100Mb/s ...
As you can see from the output above, the interface Fa0/1 will use the speed of 100 Mbps and half-duplex. The Fa0/2 interface will use the same speed, but it will use the full duplex communication.
It is recommended that devices on both sides of a link should have the auto-negotiation setting turned on, or both sides should have it off. If you encounter a device that has speed and duplex parameters manually configured, you can use the interface mode speed and duplex commands to set the duplex and speed settings, e.g.:
SW1(config)#int Fa0/3 SW1(config-if)#speed 100 SW1(config-if)#duplex full
When one device uses autonegotiation and the other one has disabled it, the device using autonegotiation will choose the default duplex setting based on the current speed. The defaults are:
- If the speed is not known, 10 Mbps and half duplex settings will be used.
And If the device successfully senses the speed without IEEE autonegotiation, by just looking at the signal on the cable.
- If the speed is 10 or 100 Mbps, use half duplex.
- If the speed is 1,000 Mbps or faster, use full duplex.