6–Configuring NIC Functionality in the Converged Network Adapter Configuring the NIC in a Linux Environment

Making Persistent Changes Using ethtool To make changes that are persistent across reboots, choose one of the following:

Edit the file /etc/sysconfig/networking-scripts/ifcfg-ethX, add required ETHTOOL_OPTS, and then restart the network interface. Note that ETHTOOL_OPTS is limited to specifying only those parameters that are configured with the -s flag.

1.Open the file /etc/sysconfig/network-scripts/ifcfg-ethXwith an editor in read/write mode. For example:

#vi /etc/sysconfig/network-scripts/ifcfg-eth0

2.Append the following text to the file:

ETHTOOL_OPTS=<any of the ethtool -s parameters>

3.Save the file /etc/sysconfig/network-scripts/ifcfg-eth0.

4.Stop the interface eth0. For example:

#/etc/sysconfig/network-scripts/ifdown eth0

5.Bring up the interface eth0. For example:

#/etc/sysconfig/network-scripts/ifup eth0

Add a udev rule for ethtool to modify other parameters like offload settings.

1.Create or open the file /etc/udev/rules.d/50-ethtool.rules in read/write mode using an editor. For example:

#vi /etc/udev/rules.d/50-ethtool.rules

2.Append the following text to the file. For example:

ACTION=="add", SUBSYSTEM=="net", NAME=="eth0", RUN+="/sbin/ethtool <any ethtool command line parameter"

Figure 6-25shows an example of udev rules usage. For more details on udev rules, refer to the manual page for udev using the man udev command.

Figure 6-25. udev Rule Example

3.Save the udev rules file and reboot the server.

6-36

FE0254601-00 A

Page 204
Image 204
Q-Logic 8100 SERIES manual # vi /etc/sysconfig/network-scripts/ifcfg-eth0, # /etc/sysconfig/network-scripts/ifdown eth0