Auto-Negotiation

Automatic speed and duplex configuration between network devices.

The Pre-Autonegotiation Era: The Headache of Manual Configuration

Imagine connecting two people who speak different languages. Without a common language or a translator, they can't communicate. In the early days of twisted-pair Ethernet, network devices faced a similar problem. A single Ethernet port could support a variety of operational modes. For example, a modern port on a switch might be capable of operating at:

  • 10 Mbps, 100 Mbps, or 1000 Mbps (1 Gbps) speeds.
  • In either or mode.

Before auto-negotiation became standard, network administrators had to manually configure the settings on both ends of a link to match perfectly. If you configured a switch port for "100 Mbps, full-duplex," you had to walk over to the user's computer and manually set their network card to the exact same "100 Mbps, full-duplex."

This manual process was a major source of network problems. A simple mistake such as a duplex mismatch (one side full, the other half) or a speed mismatch (one side 100 Mbps, the other 10 Mbps) would result in a link that either worked extremely poorly, with massive error rates, or didn't work at all. Troubleshooting these issues was tedious and time-consuming. A better, automated solution was needed.

What is Autonegotiation?

Autonegotiation is a networking procedure (standardized in IEEE 802.3u) that allows two connected Ethernet devices to automatically find and agree upon the best possible mode of operation. It's an automated "handshake" that happens in the first few milliseconds after a cable is plugged in or a device is powered on.

The goal of this negotiation is to establish a link that uses the highest common performance level that both devices support. If a new high-end laptop (supporting 1 Gbps, full-duplex) is connected to an older switch (which only supports up to 100 Mbps, full-duplex), the autonegotiation process will ensure they agree to communicate at 100 Mbps, full-duplex, the best mode they both share. This "plug and play" functionality is what makes modern Ethernet so user-friendly.

The Negotiation Process: How It Works

The autonegotiation process uses a special signal called the Fast Link Pulse (FLP) burst. This is a sequence of pulses sent by each device as soon as it detects a link partner on the other end of the cable. The FLP is distinct from the normal data traffic signals, so it doesn't interfere with older devices that don't support autonegotiation.

  1. Step 1: Link Detection
    When a device is connected, it sends out a simple electrical signal called a Normal Link Pulse (NLP) to detect if another device is active on the other end.
  2. Step 2: Advertising Capabilities
    Upon detecting a link partner, each device begins sending a series of Fast Link Pulse (FLP) bursts. The FLP burst is not just a pulse; it's a 16-bit word that acts like a "menu" of the device's capabilities. It lists all the modes it can support (e.g., 100Base-TX Full Duplex, 100Base-TX Half Duplex, 10Base-T Full Duplex, etc.).
  3. Step 3: Comparing Menus and Finding the Best Match
    Each device receives and decodes the FLP burst from its partner. It compares the partner's "menu" with its own. The devices then follow a standardized priority list to determine the best possible shared mode. The priority is always given to the highest performing mode that both devices advertised.

The Priority Hierarchy

The selection rule is standardized to avoid confusion. The highest priority is given to the highest speed, with full-duplex being preferred over half-duplex at each speed. For twisted-pair Ethernet, the priority order is generally:

  1. 1000Base-T Full Duplex
  2. 1000Base-T Half Duplex
  3. 100Base-TX Full Duplex (Highest common denominator in our example)
  4. 100Base-TX Half Duplex
  5. 10Base-T Full Duplex
  6. 10Base-T Half Duplex

For instance, if your PC advertises it can do everything up to 1000Base-T, and the switch port advertises it can only do up to 100Base-TX Full, they will both select 100Base-TX Full as the operating mode.

Duplex Mismatch: The Most Common Autonegotiation Problem

Autonegotiation works flawlessly in the vast majority of cases. However, it can lead to a specific, hard-to-diagnose problem if it fails or is misconfigured. The most infamous issue is the duplex mismatch.

This problem typically occurs when an administrator manually configures one side of the link (e.g., the switch port to 100 Full) but leaves the other side (e.g., the PC) set to Auto.

  • The manually configured side (the switch) does not perform autonegotiation; it simply starts operating in 100 Full mode. It does not send out FLP bursts.
  • The other side (the PC) is set to Auto. It sends out its FLP bursts, but receives no FLP bursts in response.
  • Since autonegotiation fails (because one side refused to participate), the PC falls back to a "safe" default mode. According to the standards, if autonegotiation fails but a valid carrier signal is detected, the device should set its mode to half-duplex for the detected speed.

The Resulting Mismatch

The link comes up, but in a disastrous state:

  • The switch port is operating in full-duplex mode. It feels free to send data at any time, even while it's receiving.
  • The PC's network card is operating in half-duplex mode. It expects to use CSMA/CD and assumes that when it is sending, the line should be quiet.

When the PC starts transmitting, and the switch happens to transmit at the same time, the PC's half-duplex logic sees this as a collision. It will stop, run its backoff algorithm, and retransmit, even though no actual collision occurred on the wire. This results in extremely poor network performance, with high error counts on the interface, low throughput, and frequent disconnects, especially under heavy load.

The Golden Rule

To avoid duplex mismatches, the golden rule of network configuration is: Either let both sides autonegotiate, or manually configure both sides. Never mix a manual configuration with an automatic one.

    Auto-Negotiation | Teleinf Edu