Weblog
Thoughts which doesn't affect the world's peace

ethtool – your NIC’s best friend

Having your network interface card auto-negotiate the connection speed sometimes causes big troubles in terms of data packet loss. Your best friend in such situations is ethtool which is really easy to use, once you get to know it.

You can simply list your current NIC configuration with the following command (asuming you would like to view your eth0 interface):

ethtool eth0
It will list information similar to this:
Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Advertised auto-negotiation: Yes
    Speed: 100Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 2
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000001 (1)
    Link detected: yes
To set the connection speed to 10 Mbps full duplex, you will have to do the following:
ethtool -s eth0 speed 10 duplex full autoneg off
Note that you have to turn autonegotiation off (with autoneg off at the end of the command), or it will still auto negotiate 100 Mbps/Full Duples.

Comments are closed.