March 30, 2010 · Networking ·

This tutorial will explain how to change network card speed and duplex settings in ubuntu

Using ethtool

ethtool can be used to query and change settings such as speed, auto- negotiation and checksum offload on many network devices, especially Ethernet devices.

Install ethtool in ubuntu

sudo apt-get install ethtool

You can check the current Ethernet network card speed and duplex settings using the following command

sudo ethtool eth0

Where eth0 is the Ethernet network card interface

Turn off Auto-Negotiate feature using the following command

sudo ethtool -s eth0 autoneg off

ethtool Syntax

sudo ethtool -s eth0 speed [SPEED] duplex  [DUPLEX]

Example 1

This example will show you how to setup your ethernet network card speed 100 and full duplex

sudo ethtool -s eth0 speed 100 duplex full

Example 2

This example will show you how to setup your ethernet network card speed 10 and half duplex

sudo ethtool -s eth0 speed 10 duplex half

Sponsored Link

7 Comments to “How to change Ethernet network card speed and duplex settings in ubuntu”

  1. Matt says:

    Can this be used to actually speed up your network, or is this only if you want to limit it? (Or test other options)

  2. jordanwb says:

    Matt: This changes primarily how data is sent. For speed there are two (sometimes 3) options: 10 Megabits/second and 100 Megabits/second (1000 Megabit/second if you have a gigabit card).

    Duplexing controls whether or not you can send and receive data at the same time. Half duplex means you can send or receive data, but not both at the same time. Full duplex means you can send and receive at the same time.

    If you want to speed up your LAN, get gigabit switches and gigabit network cards for your machines.

  3. Ray says:

    and after a reboot do it all again…

  4. Rembo says:

    @Ray: or make it permanent

    auto eth0
    iface eth0 inet static
    pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full

  5. red says:

    Rembo says:
    NOVEMBER 11, 2010 AT 10:52 AM
    @Ray: or make it permanent

    auto eth0
    iface eth0 inet static
    pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full

    ##############################
    sudo gedit /etc/network/interfaces
    “debian , ubuntu , mint”
    “and then insert”

    auto eth0
    iface eth0 inet static
    pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full

    “where eth0 is the network interface”
    “and its done auto on reboot”

  6. Nehemoth says:

    In Debian (also Raspberry pi) this is the way to do it as per document
    /usr/share/doc/ethtool/README.Debian

    iface eth0 inet dhcp
    link-speed 100
    link-duplex full
    ethernet-autoneg off

    works like a charm

  7. arno says:

    thx guys, did use ur command, and lost network on my server.

Leave a Reply

  • Recent comments