Using the ethtool utility one cannot set autoneg off for ethernet cards
Environment
- Red Hat Enterprise Linux (RHEL) (all versions)
- Network card at 1Gbps or 10Gbps or faster
Issue
-
When trying to set auto-negotiation off on a gigabit ethernet card, the following error pops up, why ?
# ethtool -s eth1 autoneg off Cannot set new settings: Invalid argument not setting autoneg -
We need to speed and duplex values and Link Speed for 10G NIC on RHEL. However the settings are not getting accepted.
Resolution
Change the speed/duplex the device advertises with the ethtool command.
The manual page explains all options. A short exerpt of relevant information:
-s --change
Allows changing some or all settings of the specified network device.
All following options only apply if -s was specified.
advertise N
Sets the speed and duplex advertised by autonegotiation. The argument
is a hexadecimal value using one or a combination of the following:
0x020 1000baseT Full
0x1000 10000baseT Full
To set 1000baseT Full Duplex, use the command:
ethtool --change ethX advertise 0x020
This is a runtime command and can be persisted across reboots as described at:
Root Cause
- Auto-negotiation is required for almost all ethernet interfaces faster than 100Mbps
- It is not recommended or supported to disable auto negotiation or these faster interfaces.
- The relevant sections of the standard are quoted in the Diagnostic Steps section below.
Diagnostic Steps
The following are the relevant portions of the IEEE 802.3 specification.
Note that item a in both sections 28D.5 (1000Base-T) and 28D.6 (10GBASE-T) indicate that auto-negotiation is mandatory.
The rest of the text just gives you so information on why. You can find the full specification at:
From section 2 of the standard:
28D.5 Extensions required for Clause 40 (1000BASE-T)
Clause 40 (1000BASE-T) makes special use of Auto-Negotiation and requires additional MII registers. This use is summarized below. Details are provided in 40.5.
a) Auto-Negotiation is mandatory for 1000BASE-T (see 40.5.1).
b) 1000BASE-T requires an ordered exchange of Next Page messages (see 40.5.1.2), or optionally an exchange of an
Extended Next Page message
c) 1000BASE-T parameters are configured based on information provided by the exchange of Next Page messages.
d) 1000BASE-T uses MASTER and SLAVE to define PHY operations and to facilitate the timing of transmit and receive
operations. Auto-Negotiation is used to provide information used to configure MASTER-SLAVE status (see 40.5.2).
e) 1000BASE-T transmits and receives Next Pages for exchange of information related to MASTER-SLAVE operation. The
information is specified in MII registers 9 and 10 (see 32.5.2 and 40.5.1.1), which are required in addition to
registers 0-8 as defined in 28.2.4.
f) 1000BASE-T adds new message codes to be transmitted during Auto-Negotiation (see 40.5.1.3).
g) 1000BASE-T adds 1000BASE-T full duplex and half duplex capabilities to the priority resolution table (see 28B.3)
and MII Extended Status Register (see 22.2.2.4).
h) 1000BASE-T is defined as a valid value for “x” in 28.3.1 (e.g., link_status_1GigT.) 1GigT represents that the
1000BASE-T PMA is the signal source.
28D.6 Extensions required for Clause 55 (10GBASE-T)
Clause 55 (10GBASE-T) makes special use of Auto-Negotiation and requires additional MDIO registers. This use is summarized below. Details are provided in 55.6.
a) Auto-Negotiation is mandatory for 10GBASE-T.
b) Extended Next Page support is mandatory for 10GBASE-T.
c) 10GBASE-T requires an exchange of an Extended Next Page message.
d) 10GBASE-T parameters are configured based on information provided by the exchange of an Extended Next Page
message.
e) 10GBASE-T uses MASTER and SLAVE to define PHY operations and to facilitate the timing of transmit and receive
operations. Auto-Negotiation is used to provide information used to configure MASTER-SLAVE status.
f) 10GBASE-T transmits and receives an Extended Next Page for exchange of information related to MASTER-SLAVE
operation. The information is specified in 45.2.7.
g) 10GBASE-T adds new message codes to be transmitted during Auto-Negotiation.
h) 10GBASE-T adds 10GBASE-T full duplex capabilities to the priority resolution table (see 28B.3).
i) 10GBASE-T is defined as a valid value for “x” in 28.3.1 (e.g., link_status_10GigT.) 10GigT represents that the
10GBASE-T PMA is the signal source.
j) 10GBASE-T supports Asymmetric Pause as defined in Annex 28B.
From Section 3 of the standard:
40.1.3 Operation of 1000BASE-T
. . . . .
A 1000BASE-T PHY can be configured either as a MASTER PHY or as a SLAVE PHY. The MASTER-SLAVE relationship between two stations sharing a link segment is established during Auto-Negotiation (see Clause 28, 40.5, and Annex 28C).
. . . .
40.5 Management interface
1000BASE-T makes extensive use of the management functions provided by the MII Management Interface (see 22.2.4), and the communication and self-configuration functions provided by Auto-Negotiation (Clause 28).
40.5.1 Support for Auto-Negotiation
All 1000BASE-T PHYs shall provide support for Auto-Negotiation (Clause 28) and shall be capable of operating as MASTER or SLAVE.
Auto-Negotiation is performed as part of the initial set-up of the link, and allows the PHYs at each end to advertise their capabilities (speed, PHY type, half or full duplex) and to automatically select the operating mode for communication on the link. Auto-negotiation signaling is used for the following two primary purposes for 1000BASE-T:
a) To negotiate that the PHY is capable of supporting 1000BASE-T half duplex or full duplex transmission.
b) To determine the MASTER-SLAVE relationship between the PHYs at each end of the link.
c) To negotiate EEE capabilities as specified in 28C.12.
This relationship is necessary for establishing the timing control of each PHY. The 1000BASE-T MASTER PHY is clocked from a local source. The SLAVE PHY uses loop timing where the clock is recovered from the received data stream.
From section 4 of the standard:
55.1.3 Operation of 10GBASE-T
. . . .
A 10GBASE-T PHY can be configured either as a MASTER PHY or as a SLAVE PHY. The MASTER-SLAVE relationship between two stations sharing a link segment is established during Auto-Negotiation (see Clause 28, 55.6, Annex 28B, Annex 28C, and Annex 28D).
. . . .
55.6 Management interfaces
10GBASE-T makes extensive use of the management functions that may be provided by the MDIO (Clause 45), and the communication and self-configuration functions provided by Auto-Negotiation (Clause 28). Additional Auto-Negotiation requirements are set forth within this subclause.
55.6.1 Support for Auto-Negotiation
All 10GBASE-T PHYs shall provide support for Auto-Negotiation (Clause 28) and shall be capable of operating as MASTER or SLAVE. All 10GBASE-T PHYs shall provide support for Extended Next Pages as defined in 28.2.3.4.2 and shall support and use optimized FLP Burst to FLP burst timing as defined in 28.2.1.1.1, and nlp_link_test_min_timer and link_fail_inhibit_timer as defined in 28.3.2.
Auto-Negotiation is performed as part of the initial set-up of the link, and allows the PHYs at each end to advertise their capabilities (speed, PHY type, half or full duplex) and to automatically select the operating mode for communication on the link. Auto-Negotiation signaling is used for the following primary purposes for 10GBASE-T:
a) To negotiate that the PHY is capable of supporting 10GBASE-T transmission.
b) To determine the MASTER-SLAVE relationship between the PHYs at each end of the link.
c) To determine whether the local PHY performs PMA training pattern reset.
d) To determine whether the local PHY supports the EEE capability.
e) To determine whether the local PHY supports the fast retrain capability.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.