[olug] Ethernet Auto-negotiation and Duplexing on Linux

Matthew G. Marsh mgm at midwestlinux.com
Mon Sep 8 17:57:50 UTC 2003


On Fri, 8 Aug 2003, Derek & Lisa wrote:

> Ethernet Auto-negotiation and Duplexing on Linux
>
> We recently had an issue where our Fiber provider informed us our Linux router
> had to be hard set to auto negotiate off, 10mbps full duplex.  The unit in
> question had old NE2000 complaint drivers/cards.   Currently there is
> approximately 20% bandwidth drop across this unit.  Turning autoneg off and
> settings the parameters manually is supposed to fix this throughput issue
> according to our fiber provider.  The unit is connected directly to their
> fiber equipment (starting with a Lucent switch) which apparently does not
> like auto-negotiation.
>
> Ethertool is a nifty utility that is supposed to allow you to set these
> parameters in the Ethernet device.  The alternative is to find the parameters
> for the proprietary device  to pass along to the driver, which is different
> for every driver.
>
> Ethertool was unable to set the autoneg, duplex, and speed options for the old
> NE2000 compatible NIC's.  I swapped the old NIC's out for new Intel 10/100
> cards and ethertool seems to function with the new NIC's.

Yep - I use either Intel eepros or Tulip chip cards. Both work well with
ethtool. I still use mii-tool to set mine but mii-tool has been superseded
by ethtool which supports a generic interface that multiple cards can tie
into. No more ioctls for everything...

> My two options are a) use ethertool to set the parameters or b) use the
> correct string for the Intel driver passed along in (/etc/modules?) directly
> to the card.
>
> I chose to use ethertool, and it claims it was able to pass the parameters
> along to the Ethernet device.
>
> My questions are, should I trust ethertool?  And, does anyone have experience
> with turning auto-negotiation off on an Ethernet device under Linux?

ethtool should work fine. I have used mii-tool for years in init scripts
to force specific duplex and speed settings as well as turning off
auto-negotiation (which is different from forcing duplex and speed - ie I
learned the hard way that you can still negotiate auto-negotiation even
though the card will only do one speed and duplex - that one burned me on
some old 3COM 10/100 switches way back when)

Don't forget to check your interface statistics:

ip -s -s link list dev {device}

to see what is truly happening.

--------------------------------------------------
Matthew G. Marsh,  President
Paktronix Systems LLC
1506 North 59th Street
Omaha  NE  68104
Phone: (402) 553-2288
Email: mgm at midwestlinux.com
WWW:  http://www.midwestlinux.com
--------------------------------------------------


More information about the OLUG mailing list