Configuring and Troubleshooting Auto-Negotiation on the S5700
Introduction
This document introduces the auto-negotiation function and describes how to configure this function and rectify faults related to auto-negotiation.
Understanding Auto-Negotiation
Devices with different transmission capabilities exist on the network. Two devices must negotiate a proper data transmission capability to communicate. The auto-negotiation function provides an information exchange method for connected devices. After auto-negotiation is enabled, devices at both ends of a physical link can exchange information and automatically choose the same working parameters. In this way, the two devices can work at the maximum rate supported by both of them.
The duplex mode and rate of interfaces at both ends of a link are negotiated. If the negotiation succeeds, the two interfaces use the same duplex mode and rate. The auto-negotiation function takes effect only when both the connected devices support it. If the remote device does not support auto-negotiation or uses a different auto-negotiation mode. You can configure the connected interfaces to work in non-auto-negotiation mode, and forcibly set the same rate and duplex mode on the interfaces.
When the working mode of an interface is changed from auto-negotiation to non-auto-negotiation, the interface works at the maximum rate and uses the default duplex mode. For example, when a GE electrical interface works in auto-negotiation mode, the rate negotiated with the remote interface is 100 Mbit/s and the duplex mode is half-duplex. When the GE electrical interface is configured to work in non-auto-negotiation mode, the interface rate is restored to 1000 Mbit/s and the duplex mode is full-duplex.
- By default, auto-negotiation is enabled on GE optical interfaces and rate auto-negotiation is disabled. You can run the speed auto-negotiation command to enable rate auto-negotiation.
- After configuring the auto-negotiation function on an interface, if you remove and install a single optical fiber on the interface, the interface may be Up and the remote interface may be Down. You can run the shutdown and undo shutdown commands on the remote interface to make the remote interface go Up.
Configuring Auto-Negotiation
Procedure
- Run the system-view command to enter the system view.
- Run the interface interface-type interface-number command to enter the interface view.
- Run the negotiation auto command to configure the Ethernet interface to work in auto-negotiation mode.
By default, an Ethernet interface works in auto-negotiation mode.
Run the display interface [ interface-type [ interface-number ] ] command in any view or the display this interface command in the interface view to check the current interface status. Check the Negotiation field in the command output.
Troubleshooting Auto-Negotiation Faults
Fault Analysis 1: Why Cannot GE Interfaces at Both Ends of a Link Negotiate to Go Up at the Rate of 1000 Mbit/s After Auto-Negotiation Is Enabled?
1000BASE-T interfaces must use Category 5 enhanced cables or higher, and the four twisted pairs in the network cables are normal. In this case, interfaces at both ends can negotiate to go Up at the rate of 1000 Mbit/s. If the network cable is shaking, the RJ45 connector on an end is not properly connected, or the network cable is faulty, the interfaces at both ends cannot negotiate to go Up at the rate of 1000 Mbit/s, and can only negotiate to go Up at the rate of 100 Mbit/s. In this case, you can run the auto speed command in the interface view to force interfaces at both ends of the link to work at a specified rate.
In V200R005C00 and later versions, you can also run the set ethernet speed down-grade command in the system view to configure rate decrease auto-negotiation. After this command is run, when two connected GE electrical interfaces in auto-negotiation mode cannot go Up at the rate of 1000 Mbit/s, rates of the interfaces automatically decrease to 100 Mbit/s or 10 Mbit/s.
Fault Analysis 2: Why Is the Negotiated Rate Lower Than 1000 Mbit/s on Two Connected GE Electrical Interfaces Enabled with Auto-Negotiation?
Two devices are connected through two GE interfaces using a network cable. The two GE interfaces are configured to work in rate auto-negotiation mode. Because the network cable deteriorates and RJ45 connectors are faulty, the GE interfaces can only work at the rate of 100 Mbit/s or 10 Mbit/s. As a result, the finally negotiated rate of the interfaces is 100 Mbit/s or 10 Mbit/s.
You are advised to replace the network cable.
Fault Analysis 3: Why Do Two Auto-Negotiation-Enabled GE Interfaces Negotiate to Work at the Rate of 100 Mbit/s?
When the link between the two interfaces is unstable during auto-negotiation, negotiation packets are lost. The two interfaces negotiate a speed in a descending order of speeds (1000 Mbit/s -> 100 Mbit/s -> 10 Mbit/s). If they work at 100 Mbit/s after the negotiation, the reason is that the link between them is unstable. For example, the network cable is shaking, the RJ45 connector on an end is not properly connected, or the network cable is faulty. To make the two interfaces work at a specified speed, run the auto speed command on the interfaces.
Fault Analysis 4: How Can Packet Loss Be Avoided When Two Interfaces at Both Ends of a Link Work in Auto-Negotiation Mode and Half-Duplex Mode?
You can configure the local and remote devices to work in non-auto-negotiation mode, and set their duplex mode to full-duplex to avoid packet loss.
The configuration is as follows:
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo negotiation auto [HUAWEI-GigabitEthernet0/0/1] duplex full
Fault Analysis 5: Which Interface Attributes Are Affected After the Interface Auto-Negotiation Mode Is Changed?
When the auto-negotiation mode of an interface is changed from auto-negotiation to non-auto-negotiation, the default interface rate and duplex mode are restored. For example, when a GE electrical interface works in auto-negotiation mode, the rate negotiated with the remote interface is 100 Mbit/s and the duplex mode is half-duplex. After the interface is configured to work in non-auto-negotiation mode, the interface rate is restored to 1000 Mbit/s and the duplex mode is full-duplex.
You should change the auto-negotiation mode of both the local and remote interfaces. Otherwise, the interfaces may be Down.