[nSLUG] ethernet and the modern linux

George N. White III gnwiii at gmail.com
Fri Sep 26 08:34:46 ADT 2008

On Fri, Sep 26, 2008 at 12:42 AM, Mike Spencer <mspencer at tallships.ca> wrote:
> Someone made apologetic noises about the recent lengthy exchange on a
> network admin topic (see Subject:) not explicitly Linux-related.
> No apology needed: Thanks, George, Daniel and others for calling my
> attention to ethtool.  My "network" is pretty Mickey-Mouse compared to
> biz and research sites but I keep hitting this problem with getting
> various ethernet cards, some of them kinda old, to talk to the
> router. With ethtool I can force speed 10 on eth0 when autoneg fails
> and get things working.
> Now I have to experiment with ethtool and see what else I can do that
> I didn't know about.  Maybe I can even get everybody to do 100baseT.

I changed the subject heading, as the issue of ethernet configuration deserves
a separate thread.  The reason I was looking at powerline communications is
that I have learned to distrust ethernet, especially at times of stress such as
a power outage.

Some subtopics:

1.  autonegotiation considered harmful

     a) it doesn't always work on system boot (e.g., autoneg
failed...using half duplex)

     b) even if it worked at boot, systems sometimes do autoneg while
running, and
         things break (tcp connections)

    In stable environment where you want systems to run 7/24, it is
probably better to
    used fixed configurations.

2.  udev considered harmful

In the good old days with unix, you could force the settings by
building a custom kernel.
With linux, network cards are generally supported using modules.
Until recently, you could pass
options to control the settings when the module was loaded.   You can
also use ethtool to
make changes after the module is loaded, but these changes may be lost
after a network
"event".   I'm not sure what causes the "events".  On SGI IRIX I see
random "ethernet
cable is disconnected" type messages.  They occur a different times
for different machines
connected to the same switch, so may not be associated with spanning
tree reconfiguration.
Modern linux systems use udev and network manager to dynamically bring
interfaces up and
down.  This make sense for a laptop that moves around, but not for
systems that never move.
If the permanent connections really were permanent,
NetworkManager+udev wouldn't matter, but if the system things the
cable is unplugged, it seems to restart the interface.   If you rely
on some
boot-time script to turn off autoneg, then this may result in the
interface going back to the
default configuration with autoneg that fails.

3.  full duplex considered harmful

One view is that a network where systems think the cable is
disconnected is broken and should
be fixed.   My view is that shit happens, and we should configure
systems to be robust.   Apple,
who have lots of experience with a tightly controlled list of network
interfaces, recommend settings switches to force half-duplex, which is
what you get when autoneg fails.    Full duplex sounds nice,
and does make a difference with systems that have traffic patterns
where send and receive volumes
are both high, such as a multiuser unix box doing file and mail
serving, running X11 apps, etc.
These days, such boxes have multiple gigabit interfaces.   I recall
some discussions where it was claimed that full duplex was a fraud
since the hardware (this was several years ago) couldn't actually
handle the traffic volumes for 100Mbit full duplex, and that gigabit
was best configured for half-duplex.

George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

More information about the nSLUG mailing list