change network card speed and duplex settings in ubuntu
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
If you want to setup eth0 10 or 100 or 1000 speed with ethtool try this
You need to restart networking services using the following command
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-toolsFirst you need to find the existing network card speed for this you can use the following command
ethtool eth0Once 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 halfIf you want to make it permanent you have to add following lines to /etc/network/interfaces file
sudo ethtool -s eth0 autoneg off speed 100 duplex full
sudo ethtool -s eth0 autoneg off speed 1000 duplex full
gksudo gedit /etc/network/interfacesAdd the following line
pre-up /usr/sbin/ethtool -s $IFACE autoneg off 100 duplex fullSave and exit the file
You need to restart networking services using the following command
sudo networking restart