I’ve seen network issues crop up regularly in a network engineer’s day-to-day work, and when they do, it’s mostly the result of misconfigured or mismanaged devices. I can tell you that, in my experience, auto-negotiation issues are among the most common problems I have seen in a network, and that’s a good thing because they can be easy to find (if you understand how it works and know where to look) and can be quickly remediated.
In this blog post, we will discuss what is auto negotiation in ethernet devices, and then we will take a look at how ethernet devices negotiate and decide the best network settings for the interfaces.
What is auto-negotiation in Networking in Ethernet devices?
Auto-negotiation in networking refers to the capability of Ethernet devices like ethernet switches, routers, servers, etc to automatically determine and configure their link settings, such as speed and duplex mode, without any manual intervention. It is an important feature that allows devices to establish a common communication protocol and optimize network performance.
When two Ethernet devices are connected, they initiate the auto-negotiation process by exchanging a series of electrical signals called Fast Link Pulses (FLPs). During this process, the devices communicate their capabilities, including supported speeds (such as 10 Mbps, 100 Mbps, or 1 Gbps) and duplex modes (half-duplex or full-duplex).
Once the devices exchange their capabilities, they will negotiate and agree upon the highest common speed and duplex mode that both devices support. For example, if one device supports 1 Gbps full-duplex and the other supports only 100 Mbps half-duplex, they will agree to operate at 100 Mbps half-duplex since it is the highest common denominator.
Auto-negotiation also allows devices to automatically detect and configure other important settings, such as flow control mechanisms like Pause frames. These mechanisms help manage network congestion by allowing devices to pause the transmission of data temporarily when the receiving device cannot keep up.
In summary, auto-negotiation simplifies the process of connecting Ethernet devices by automatically configuring their link settings. It ensures that devices communicate effectively and efficiently by establishing a common protocol, optimizing network performance, and maintaining compatibility between different devices on the network.
What is the history of Auto-negotiation?
Auto-negotiation was first introduced in 1995 by IEEE.
IEEE 802.3u standard clause 28 (for Fast Ethernet) and IEEE standard 802.3z Standard clause 37 (for Gigabit Ethernet).
It was initially an optional component in the Fast Ethernet standard. However, it is backward compatible with the Normal Link Pulses (NLP) used by 10BASE-T.
Later, the auto-negotiation protocol was further extended to the gigabit Ethernet specification and is mandatory for 1000BASE-T Gigabit Ethernet over twisted pair.
Two core configuration components determined by auto-negotiation in Ethernet:-
Let us take a look at the two main components determined by auto-negotiation.
What are Speed and Duplex on an interface?
Speed is the rate of the interface, commonly listed in Megabits per second (Mbps) or Gigabit per second (Gbps). And Duplex is a term used to describe how data is transmitted via an interface, shown as half-duplex or full-duplex.
Ethernet speeds commonly used include 10, 100, and 1,000 Mbps. Ethernet with a throughput of one Gigabit per second is known as Gigabit Ethernet. Nowadays, switches already support 10 Gbps Ethernet and 100 Gbps as well.
Duplex can be half-duplex or full-duplex. Only one piece of data can be sent or received at a time using a half-duplex interface. For example, conversations carried out using a two-way radio are typically conducted in the half-duplex mode. Each party must press a button to speak and is unable to listen in a while doing so. In contrast, a full-duplex interface allows data to be sent and received in real-time. For example, a discussion on a telephone is full-duplex.
How Auto-Negotiation Works
If you want to use auto-negotiation, you need to run on both sides of the link to work. For example, suppose one side of a link is running auto-negotiation, but the other side isn’t. Autonegotiation can’t figure out the speed or duplex configuration of the other side. If auto-negotiation is running on both sides of the link, the two devices decide which speed and duplex mode is best for them. Each interface lists the speeds and duplex modes it can work, and the best match is chosen (higher speeds and full-duplex are preferred).
Please note: Auto-negotiation is not a magical thing or AI (Artificial Intelligence) and does not get enabled automatically. For auto-negotiation to work, you should always manually ensure that it is enabled on both sides of the network device’s ports. If it is enabled on one side and disabled on the other, then auto-negotiation will not work.
You need to understand an essential feature within auto-negotiation called Parallel detection, which has the following benefits:-
- Parallel detection starts when the auto-negotiation process fails to discover auto-negotiation on the opposite end of the link. Then, it sends the received signal to the local 10Base-T, 100Base-TX, and 100Base-T4 drivers. If any of these drivers recognize the signal, the interface is tuned to that speed.
- Parallel detection only considers the link speed, not the supported duplex modes. However, ethernet modes have different levels of support for duplex, so this is a factor to keep in mind.
- Parallel detection also allows the speed of the link to be set up on older systems that don’t have auto-negotiation capability. This ensures backward compatibility.
Let us understand the speed and duplex support of common ethernet connection types:-
Ethernet Connection Types | Full Duplex Support |
---|---|
10Base-T | The 10base-T device has no support for full-duplex, although some 10Base-T supports Full duplex. |
100Base-T | Fast Ethernet standard supports Full-Duplex, but the default mode is half-duplex. |
1000Base-T | 1000Base-Tx and Fiber Gig Interfaces fully support Full-duplex, better than 10Base-T and 100Base-T. You should always set gigabit Ethernet to auto-negotiation. |
10 Gigabit | 10G connectivity is usually hardware-driven and supports Full duplex. 10 Gigabit (10G) connections rely on fiber transceivers or specific copper connections that differ from standard RJ-45 Ethernet connections. |
100 Gigabit | 100G, 200G, and beyond connectivity is hardware-driven and supports Full duplex. 100 Gigabit (100G) connections require fiber transceivers called QSFPs. |
Ethernet auto-negotiation takes place when the following events occur:
- Link is first connected
- A device at either end of the link is powered on
- A device is being initialized or reset
- A request for renegotiation is made
What are auto-negotiation optional Capabilities:-
Apart from speed and duplex, auto-negotiation also provide other optional capabilities like:-
- Flow control
- Remote Fault Indication
- Physical Management Interface
- Asymmetric or Symmetric Pause capabilities
- Automatic Media Detection Interface or (MDI)
- Media Detection Interface Crossover (MDIX) cable detection
Reasons When Auto-Negotiation Fails
Auto-negotiation fails when the speed and duplex settings of the connecting nodes are different.
For example:-
- The link is 100/full on one side and auto-negotiation on the other.
- One side is 100/full, and the other is 100/half.
Let’s dig deeper and understand why it happens and take an example where one side is full-duplex, and the other side is half-duplex.
When one side of a link is full-duplex and the other is half-duplex. The full-duplex side will become super busy and keep on sending frames continuously because the full-duplex sends frames without checking the RX line. However, the half-duplex side of the link will only broadcast if the RX line is available. As a result, it will have trouble transmitting and have a high number of late collisions, appearing slow on the network. Half-duplex interfaces show late collisions, while full-duplex interfaces do not—also, neither full-duplex nor half-duplex interfaces record failures.
Auto-negotiation Best Practices
- One basic rule: You should always configure both sides of the link partner ports with the same set of commands.
- If one side of the link partner is set to auto-negotiation, the other must also be configured.
- If one side is 100/full, make sure the other is too.
- Make the speed and duplex configuration the same on both sides of the link.
Auto-negotiation configuration Steps:-
For Cisco IOS software:-
On Cisco switches, auto-negotiation is already turned on by default. There are commands in IOS that let you set the speed and duplex mode yourself.
But you have to set speed first before setting up the duplex, otherwise, the switch port will give the below error.
Switch-2900(config-if)#duplex half
Duplex can not be set until speed is set to non-auto value
Also, modern cisco switches may give you more warnings about trying to set up half duplex on gigabit ports.
SW-3850(config-if)#duplex half
% Duplex cannot be set to half when speed auto-negotiation subset contains 1Gbps
To change the speed of the interface, type speed. If the interface has already been set up, you can bring it back to auto-negotiation by using the auto keyword:
Switch-3850(config-if)#speed ?
10 Force 10 Mbps operation
100 Force 100 Mbps operation
1000 Force 1000 Mbps operation
auto Enable AUTO speed configuration –> This is the auto-negotiation mode
After setting speed, you can set duplex.
Switch-3850(config-if)#duplex ?
auto Enable AUTO duplex configuration –> This is the auto-negotiation mode
full Force full duplex operation
half Force half-duplex operation
For Cisco NXOS software:-
NX-OS commands are the same as the IOS:
Nexus-5K(config)#int e1/5
Nexus-5K(config-if)#speed ?
10 Force 10 Mbps operation
100 Force 100 Mbps operation
1000 Force 1000 Mbps operation
auto Enable AUTO speed configuration –> This is the auto-negotiation mode
NX-5K(config-if)#
NX-5K(config-if)#speed 1000
NX-5K(config-if)#duplex full
What Is the summarized Process of Auto-Negotiation on Ethernet?
- First of all, two link partners send a Fast link pulse burst containing link code words, but no acknowledge bit is set.
- Within 6 to 17 pulses of the initial received FLP burst, stations identify one another as auto-negotiable.
- After the successful identification, the station waits for three consistent, complete, and consecutive FLP bursts.
- The station enters the “acknowledge detect” state and begins transmitting FLP bursts with link code words within the acknowledge bit set.
- After receiving three complete, consecutive, and consistent FLP bursts containing a set of acknowledge bits, the station enters complete acknowledge mode. Next, it transmits six to eight FLP bursts within the acknowledge bit set containing link code words.
- The station optionally participates in the next page exchange after transmitting 6 to 8 FLP bursts.
- Stations resolve HCD technology and negotiate to the link if it is supported after completing the next page exchange. On the contrary, no links are formed if no standard technology is shared.
Conclusion
As networks and network hardware keep getting better, faster links with better negotiation protocols will likely make negotiation problems a thing of the past. That said, I still see routers made 20 years ago in use. Knowing what is auto negotiation in Ethernet and how auto-negotiation works will be a valuable skill for many years to come, though. Please share this article so that it reaches other network engineers.
Frequently Asked Questions:-
How do I turn off auto-negotiation on Ethernet?
To stop auto-negotiation, you must manually configure the link speed to 10, 100, or 1000 Mbps, set no-auto-negotiation, and save the settings.
Why is auto-negotiation not recommended?
Auto-negotiation problems are widespread. They happen when link speed and duplex are not correctly configured, which causes dropped packets, slower throughput, and session drops.
That is why you should manually set the speed and duplex mode of the Ethernet ports. So that it won’t try to figure out what speed and duplex mode it should be set at by itself.
- NETGEAR Nighthawk CM3000 Cable Modem Review - December 27, 2024
- NETGEAR Nighthawk CM1200 Review: Is It Worth It - December 25, 2024
- NETGEAR Cable Modem CM600 Review - December 22, 2024