ETHTOOL_OPTS Example

All the network interfaces used with DNCA must be configured for full duplex mode. Full duplex mode ensures maximum usage of the network interfaces for capturing packets and delivering Discover hits to the Discover Transport Service.

You can add a variable named ETHTOOL_OPTS to the ifcfg file for a network interface to force its duplex mode. You usually must do it if the device auto-negotiates itself into half duplex. Following is the sample line that sets the ETHTOOL_OPTS variable to force the network interface into full duplex at 1 gigabit.


ETHTOOL_OPTS="autoneg off duplex full speed 1000"



You must specify the duplex and speed together and in the order that is listed. Auto-negotiation must be disabled first, and then the duplex and speed can be set. The duplex and speed must be set together to ensure the network interface's device driver does not reset either the duplex or the speed when it is changed.

With the ETHTOOL_OPTS variable defined in the ifcfg file for a network interface, the ifup command runs the ethtool utility and passes it the options that are defined by the variable. For example, if you edited ifcfg-eth0 with the previous example, then ifup runs the command:


ethtool -s eth0 ${ETHTOOL_OPTS}



The command gives the following output:


ethtool -s eth0 autoneg off duplex full speed 1000



The changes that you make to the ifcfg file for a network interface takes effect only when the ifup script runs, which is usually when the machine boots up. You can run the ethtool command manually to take effect immediately. For example:


ethtool -s eth0 autoneg off duplex full speed 1000