Skip to main content

Autonegotiation and duplex mismatch theory

Introduction to autonegotiation

For any 10/100 or 10/100/1000 interfaces (that is, interfaces that can run at different speeds), Cisco Catalyst switches default to a setting of duplex auto and speed auto. As a result, those interfaces attempt to automatically determine the speed and duplex setting to use. Alternatively, you can configure most devices, switch interfaces included, to use a specific speed and/or duplex.

In practice, using autonegotiation is easy: just leave the speed and duplex at the default setting, and let the switch port negotiate what settings to use on each port. However, problems can occur due to unfortunate combinations of configuration.

Autonegotiation is a signaling mechanism and procedure used by Ethernet over twisted pair by which two connected devices choose common transmission parameters, such as speed, duplex mode, and flow control. In this process, the connected devices first share their capabilities regarding these parameters and then choose the highest performance transmission mode they both support.

Autonegotiation is defined in Clause 28 of IEEE 802.3 and was originally an optional component in the Fast Ethernet standard. It is backwards compatible with the normal link pulses (NLP) used by 10BASE-T. The protocol was significantly extended in the Gigabit Ethernet standard, and is mandatory for 1000BASE-T over UTP. In the OSI model, autonegotiation resides in the physical layer.

History

Understanding the motivation for autonegotiation: upgrading to new and faster Ethernet standards becomes a problem because both ends have to use the same standard. For example, if you replace an old PC with a new one, the old one might have been using 100BASE-T while the new one uses 1000BASE-T. The switch port on the other end of the link needs to now use 1000BASE-T, so you upgrade the switch. If that switch had ports that would use only 1000BASE-T, you would need to upgrade all the other PCs connected to the switch. So, having both PC network interface cards (NIC) and switch ports that support multiple standards/speeds makes it much easier to migrate to the next better standard.

In 1995, the Fast Ethernet standard was released. Because this introduced a new speed option for the same wires, it included a means for connected network adapters to negotiate the best possible shared mode of operation. The autonegotiation protocol included in IEEE 802.3 clause 28 was developed from a patented technology by National Semiconductor known as NWay. The company gave a letter of assurance for anyone to use their system for a one time license fee. Another company has since bought the rights to that patent.

The first version of the autonegotiation specification, in the 1995 IEEE 802.3u Fast Ethernet standard, was implemented differently by different manufacturers leading to interoperability issues. These problems led many network administrators to manually set the speed and duplex mode of each network interface. However, the use of manually set configuration may also lead to duplex mismatches. Duplex mismatch is difficult to diagnose because the network is nominally working; Simple programs used for network tests such as ping report a valid connection. However, network performance is significantly impacted.

On an Ethernet connection, a duplex mismatch is a condition where two connected devices operate in different duplex modes, that is, one operates in half duplex while the other one operates in full duplex. The effect of a duplex mismatch is a link that operates inefficiently. Duplex mismatch may be caused by manually setting two connected network interfaces at different duplex modes or by connecting a device that performs autonegotiation to one that is manually set to a full duplex mode.

The autonegotiation specification was improved in the 1998 release of IEEE 802.3. This was followed by the release of the IEEE 802.3ab Gigabit Ethernet standard in 1999 which specified mandatory autonegotiation for 1000BASE-T. Autonegotiation is also mandatory for 1000BASE-TX and 10GBASE-T implementations. Currently, most network equipment manufacturers recommend using autonegotiation on all access ports and enable it as a factory default setting.

Function under working conditions

Autonegotiation can be used by devices that are capable of more than one transmission rate, different duplex modes (half and full), and different transmission standards at the same speed (though in practice only one standard at each speed if widely supported).

During autonegotation, each device declares its technology abilities, that is, its possible modes of operation. The best common mode is chosen, with higher speed preferred over lower, and full duplex preferred over half duplex at the same speed.

The protocol messages flow outside the normal Ethernet electrical frequencies as out-of-band signals over the UTP cable.

Priority

Upon receipt of the technology abilities of the other device, both devices decide the best possible mode of operation supported by both devices. Among the modes that are supported by both devices, each device chooses the one that is highest priority. The priority among modes is as follows:

  1. 40GBASE-T full duplex
  2. 25GBASE-T full duplex
  3. 10GBASE-T full duplex
  4. 5GBASE-T full duplex
  5. 2.5GBASE-T full duplex
  6. 1000BASE-T full duplex
  7. 1000BASE-T half duplex
  8. 100BASE-T2 full duplex
  9. 100BASE-TX full duplex
  10. 100BASE-T2 half duplex
  11. 100BASE-T4 half duplex
  12. 100BASE-TX half duplex
  13. 10BASE-T full duplex
  14. 10BASE-T half duplex

Parallel detection

Parallel detection is used when a device that is capable of autonegotiation is connected to one that is not. This happens if a device does not support autonegotiation or autonegotiation is disabled on a device. In this condition, the autonegotiation protocol defines some rules (defaults) that nodes should use as defaults when autonegotiation fails (that is, when a node tries to use autonegotiation but hears nothing from the device). The rules:

  • Speed: Use your slowest supported speed (often 10 Mbps)
  • Duplex: If your speed = 10/100, use half-duplex. Otherwise, use full duplex.

Disabling autonegotiation is not always a bad idea. For instance, many network engineers disable autonegotiation on links between switches and simply configure the desired speed and duplex on both switches. However, mistakes can happen when one device on an Ethernet predefines speed and duplex (and disables autonegotiation), while the device on the other end attempts autonegotiation. In that case, the link might not work at all, or it might just work poorly.

Configuring both the speed and duplex on a Cisco Catalyst switch interface disables autonegotation.

Cisco switches can make a better choice than that base IEEE speed default because Cisco switches can actually sense the speed used by other nodes, even without IEEE autonegotiation. As a result, Cisco switches use this slightly different logic to choose the speed when autonegotiation fails:

  • Speed: Sense the speed (without using autonegotiation), but if that fails, use IEEE defaults (slowest supported, often 10)
  • Duplex: If your speed = 10/100, use half-duplex. Otherwise, use full duplex (IEEE defaults).

Ethernet interfaces using speeds faster than 1 Gbps always use full duplex.

Duplex mismatch

A duplex mismatch occurs when two connected devices are configured in different duplex modes. The use of parallel detection, when one device disables autonegotiation or is manually configured on speed/duplex, can lead to a duplex mismatch. 

In such conditions, the autonegotiation device correctly detects the speed of operation, but is unable to correctly detect the duplex mode. As a result, it sets the correct speed but assumes half-duplex mode.