Debian or Ubuntu Linux permanent settings
Under Debian or Ubuntu Linux just create a script as follows:
# vi /etc/init.d/100Mbs
OR
$ sudo vi /etc/init.d/100Mbs
Append following lines:
#!/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 0Save and close the file. Setup executable permission:
# chmod +x /etc/init.d/100MbsOR$ sudo chmod +x /etc/init.d/100Mbs
Now run script when Debian or Ubuntu Linux boots up. Use update-rc.d command install System-V
style init script links:# update-rc.d 100Mbs defaultsOR# sudo update-rc.d 100Mbs defaults
Output:
Adding system startup for /etc/init.d/100Mbs ...
/etc/rc0.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc1.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc6.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc2.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc3.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc4.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc5.d/S20100Mbs -> ../init.d/100Mbs
Reboot the system to take effect or just type script name:
# /etc/init.d/100Mbs startOR$ sudo /etc/init.d/100Mbs start
Response by: jalal3623 points |
Assuming you want eth0 to be 100 meg full duplex ...
in /etc/sysconfig/network-scripts/ifcfg-eth0
add/ammend:
ETHTOOL_OPTS="speed 100 duplex full autoneg off"
|