Purpose of auto-negotiation
The earlier Ethernet adopts the 10 Mbit/s half-duplex mode; therefore, mechanisms such as CSMA/CD are required to guarantee system stability. With development of technologies, the full-duplex mode and 100M Ethernet emerge, which greatly improve the Ethernet performance. How to achieve the compatibility between the earlier and new Ethernet networks becomes a new problem.
The auto-negotiation technology is introduced to solve this problem. In auto-negotiation, the devices on two ends of a link can choose the same operation parameters by exchanging information. The main parameters to be negotiated are mode (half-duplex or full-duplex), speed, and flow control. After the negotiation succeeds, the devices on two ends operate in the negotiated mode and rate.
The auto-negotiation of duplex mode and speed is defined in the following standards:
100M Ethernet standard: IEEE 802.3u
In IEEE 802.3u, auto-negotiation is defined as an optional function.
Gigabit Ethernet standard: IEEE 802.3z
In IEEE 802.3z, auto-negotiation is defined as a mandatory and default function.
Principle of auto-negotiation
Auto-negotiation is an Ethernet procedure by which two connected devices choose common transmission parameters. It allows a network device to transmit the supported operating mode to the peer and receives the operating mode from the peer. In this process, the connected devices first share their capabilities regarding these parameters and then choose the highest performance transmission mode they both support.
When no data is transmitted over a twisted pair on an Ethernet network, pulses of high frequency are transmitted at an interval of 16 ms to maintain the connections at the link layer. These pulses form a Normal Link Pulse (NLP) code stream. Some pulses of higher frequency can be inserted in the NLP to transmit more information. These pulses form a Fast Link Pulse (FLP) code stream, as shown in Figure 1. The basic mechanism of auto-negotiation is to encapsulate the negotiation information into FLP.
Similar to an Ethernet network that uses twisted pair cables, an Ethernet network that uses optical modules and optical fibers also implements auto-negotiation by sending code streams. These code streams are called Configuration (C) code streams. Different from electrical interfaces, optical interfaces do not negotiate traffic transmission rates and they work in duplex mode. Optical interfaces only negotiate flow control parameters.
If auto-negotiation succeeds, the Ethernet card activates the link. Then, data can be transmitted on the link. If auto-negotiation fails, the link is unavailable.
If one end does not support auto-negotiation, the other end that supports auto-negotiation adopts the default operating mode, which is generally 10 Mbit/s half-duplex.
In other cases, two connected devices do not always send auto-negotiation code streams. Auto-negotiation does not use special packets or bring additional protocol costs.
Auto-negotiation rules for interfaces
If a local interface works in auto-negotiation mode and the remote interface works in a non-auto-negotiation mode, the negotiated working mode of the local interface depends on the working mode of the remote interface.