Change the speed and duplex settings of an Ethernet card

# apt-get install ethtool net-tools

# ethtool eth0
or
# mii-tool eth0

add a pre-up line to /etc/network/interfaces. Something like this:
iface eth0 inet static
pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full autoneg off
address ...

OR

Debian init script:
# sudo vi /etc/init.d/100Mbs

#!/bin/sh
ETHTOOL="/usr/sbin/ethtool"
DEV="eth0"
SPEED="100 duplex full"
case "$1" in
start)
echo -n "Setting eth0 speed 100 duplex full...";
$ETHTOOL -s $DEV speed $SPEED;
echo " done.";;
stop)
;;
esac
exit 0

# chmod +x /etc/init.d/100Mbs

# update-rc.d 100Mbs defaults

# /etc/init.d/100Mbs start

, , , , ,

No comments yet.

Leave a Reply

*

Powered by recycled bites and bytes.