Forcing NIC Speed and Duplex on OES Linux

Novell Cool Solutions: Tip
By Dave Bogdan

Digg This - Slashdot This

Updated: 10 Nov 2005


Forcing NIC Speed and Duplex on OES Linux


Since mii-tool seems a bit inconsistant in OES I've started using the tool to permanently set speed and duplex, I found that the following process works well for my needs.

Edit the NIC's configuration file at:

/etc/sysconfig/network/ifcfg-eth-id-<card's PCI ID>

and add:

POST_UP_SCRIPT=settings-id-<card's PCI ID>
to it.

Then create a script in /etc/sysconfig/network/scripts (The script can have any name) such as force100full and add the ethtool command with switches to it. For example:

ethtool -s eth0 duplex full speed 100 autoneg off

Make sure you chmod +x the script.

Next time the network services are restarted or the box is restarted this script is run and the NIC is set correctly.

You can of course type the above command at a shell prompt to force the NIC to use the correct settings immediately without restarting services.

Update: 10 Nov 2005

* NOTE* Sometimes this does not work properly and you need to create a symlink to the above file in /etc/sysconfig/network/if-up.d It might be a good idea to create this symlink regardless.

cd to the /etc/sysconfig/network/if-up.d directory and type ln -s /etc/sysconfig/network/scripts/force100full

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© Micro Focus