Slow Internet on Ubuntu when using a switch

As usual internet was fast on ubuntu as it used to be till I needed to plug more PCs into the adsl route lying nearby. After connecting all computers and the adsl router to a switch I noticed that on one of the PC (Ubuntu 8.04) internet became really slow. Rest of the 2 PCs one on Ubuntu 8.10 and another on Ubuntu 8.04 had internet working fine. This slow internet PC was also the oldest of the 3 . After checking everything it was clear that the problem was related to ethernet.

Switching the speed to 10 and turning off autonegotiation was found to be the solution like this :

sudo ethtool -s eth0 duplex full speed 10 autoneg off

Apart from this the internet connection may be slow due to many reasons like hardware problem , same IP given to 2 machines , IPv6 issues etc.

The above line may be added to /etc/rc.local so that it gets executed every time the system starts.

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

ethtool -s eth0 duplex full speed 10 autoneg off

exit 0

Popularity: 1% [?]

Leave a Reply