[nSLUG] linux home or workplace automation and Universal Powerline Bus

Daniel Morrison draker at gmail.com
Sat Sep 20 21:15:32 ADT 2008


2008/9/20 George N. White III <gnwiii at gmail.com>:

> We have unexplained network outages way too
> often.  The system logs have 1-2 "ethernet cable
> unplugged" events a week, sometimes followed
> by reconnecting with half-duplex, so things bog
> down until I run "sudo ethtool eth0 autoneg off
> duplex full speed 100".   We have been setting
> the ports on the switch to full-100, but Apple
> wants us to change that to half-100 because
> that is the the default when autonegotiation
> fails.

Just a note on this point.  100BaseT can autonegotiate, or it can be
manually fixed, but not both.  By this I mean that BOTH ENDS must be
configured the same way: both autonegotiate, or both exlicitly set, e.g.
100Mbit full-duplex.

If you set one side manually, and leave the other to autonegotiate, then
the negotiation will fail, and the device will fall back to its default.
If this happens to match what you set on the other end you're lucky -- if
it doesn't, you get a duplex mismatch.

So if you do:

   ethtool eth0 autoneg off duplex full speed 100

make sure you do it on the switch side also, and make sure it's committed
on the switch and added to the saved configuration on the system.

I think the best option is to set auto-negotiation on everywhere, unless
there is a specific bug with some vendor's equipment, in which case set
the best rate at both ends, and document it!

If you rely on the failed auto-negotiation default, you may find
unexpected problems as vendors change their 'defaults'.

Another idea: be wary of network loops.  If you have Cisco equipment, then
STP (spanning tree protocol) is on by default.  This is good, because it
will avoid taking down your network if you have a loop.  But it's bad
because it makes each port take 30-40 seconds to come up after it's
plugged in.

Should, for example, an employee occasionally, during the working day,
feel the need to 'plug in' a switch on their desk that actually is already
plugged in, then there may be a 30-40 second 'pause' in some areas of your
network as the STP sorts things out.

Or, if for some reason (power glitch?) some intermediate switch or
transceiver flickers out for a moment, it may take the devices on either
side 30-40 seconds to re-enable the link.

So STP is a bit like auto-negotiate -- best if left on everywhere, but
reasonable to turn off in particular circumstances, e.g. a special fibre
link to another location, in which there'll never (did I say never?) be a
loop, but which might be subject to power flickers (e.g. a repeater
somewhere).

(STP is also good for failover.  If you have a stack of switches in a
closet with a backbone structure, make sure STP is enabled on those
backbone ports, and then loop the top one back to the bottom one.  STP
will automatically find the optimum configuration, and down one of the
links.  Now if one switch dies the previously downed link opens up, and
everyone (except those on the failed switch, of course!) still has
connectvitiy to everywhere else).

Hope this lends a few thoughts...

-D.



More information about the nSLUG mailing list