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
Can this be used to actually speed up your network, or is this only if you want to limit it? (Or test other options)
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.
and after a reboot do it all again…
@Ray: or make it permanent
auto eth0
iface eth0 inet static
pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full
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”
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
thx guys, did use ur command, and lost network on my server.