How to change network card speed and duplex settings in ubuntu

Sponsored Link
If you want to change speed and duplex of your network card you have to use ethtool or mii-tool.

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

In ubuntu if you want to use mii-tool you have to install net-tools package.

Net-tools package includes the important tools for controlling the network subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp, nameif and route. Additionally, this package contains utilities relating to particular network hardware types (plipconfig, slattach, mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr).

In the upstream package ‘hostname' and friends are included. Those are not installed by this package, since there is a special "hostname*.deb".

Install required packages

sudo apt-get install ethtool net-tools

First you need to find the existing network card speed for this you can use the following command

ethtool eth0

Once you have the current speed and duplex details you can change using the following commands

If you want to setup eth0 10 or 100 or 1000 speed with ethtool try this

sudo ethtool -s eth0 autoneg off speed 10 duplex half

sudo ethtool -s eth0 autoneg off speed 100 duplex full

sudo ethtool -s eth0 autoneg off speed 1000 duplex full

If you want to make it permanent you have to add following lines to /etc/network/interfaces file

gksudo gedit /etc/network/interfaces

Add the following line

pre-up /usr/sbin/ethtool -s $IFACE autoneg off 100 duplex full

Save and exit the file

You need to restart networking services using the following command

sudo networking restart

Sponsored Link

Related posts

4 thoughts on “How to change network card speed and duplex settings in ubuntu

  1. Funny that this comes along a month after we had to manually set negotiation, duplex, and speed after the Cisco Router we use didn’t let the firewall auto-detect.

  2. Wont work here, I get the following when running ethtool eth0 in terminal…….and I did check that my wired connection is indeed eth0.

    Settings for eth0:
    Cannot get device settings: Operation not permitted
    Cannot get wake-on-lan settings: Operation not permitted
    Current message level: 0x00000033 (51)
    Cannot get link status: Operation not permitted

  3. thanx for howto but does not work for me on 14.04 maybe my NIC is damaged

    in any case

    sudo service network-manager restart

    is now the way to restart; the older way no longer works

Leave a comment

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