[CentOS] Hard-set network via ifup scripts...

Wed Sep 5 01:22:10 UTC 2007
Les Mikesell <lesmikesell at gmail.com>

Ray Van Dolson wrote:
> Anyone know off the top of their head the "right" way to hard set a
> link automatically to 100Mbps Full Duplex, etc using the ifup or ifcfg
> files?
> Don't see options in the scripts that might cover this, but maybe
> there's a more elegant way to do it than to do something in rc.local or
> hack up the ifup files myself...

You can add a line like:

ETHTOOL_OPTS="speed 100 duplex full autoneg off"

to the /etc/sysconfig/network-scripts/ifcfg-eth? files.  But note that 
if you hard set one side of a link you must do the same on the other 
(switch) side or it will take the lack of negotiation to mean that it 
must assume half duplex.

   Les Mikesell
     lesmikesell at gmail.com