Why doesn’t my Linux machine auto-negotiate correctly?

This one can be frustrating. I travel between networks alot, and I cannot predict the condition of the network equipment to which I’ll be physically connecting (when I’m not wireless).

Many, many times, it’s Cisco switches; and for some reason, with Cisco my laptop (and other machines for that matter) does not auto-negotiate the 100Mb Full Duplex that it should (this used to happen all the time with Solaris boxes I worked with too, so don’t just blame Linux). It will often negotiate half-duplex on the computer end, and upon investigation of the switch, the switch believes it has negotiated full-duplex. Not alot of goodness ensues…

Anyway, I encourage you to memorize the following. You might need it as often as I do! This command will disable auto-negotiation and set your interface to 100FD. Life will be good (this command assumes the interface in question is eth0)….

ethtool -s eth0 autoneg off speed 100 duplex full

If you just want to check what your interface is set to (or negotiated) use this command:

ethtool eth0

…and of course, you should always verify with “man ethtool”… trust, but verify…

😉

Follow-up: By the way, if you’re wondering why I don’t just use “mii-tool“, it’s because that tool has been deprecated and is no longer being (or soon will no longer be) provided with some distros. Of course, some older NICs require “mii-tool“, so you might need to install it if that’s the case for you….

1 Comment

  1. Steve

    Just used this and it worked great. I was doing a bunch of updates over the weekend and the NIC set itself back to auto for some reason…

Leave a Comment

Your email address will not be published. Required fields are marked *