Description:
ethtool is a command used to query and set Nic parameters.
Summary:
Ethtool ethx // query basic ethx network port settings
Ethtool-H // display the ethtool Command help (HELP)
Ethtool-I ethx // query ethx network port information
Ethtool-D ethx // query the registration information of the ethx network port
Ethtool-r ethx // reset the ethx network port to the Adaptive Mode
Ethtool-s ethx // query the ethx network port receiving and receiving packet statistics
Ethtool-s ethx [speed 10 | 100 | 1000] /// set the network port rate to 10/100/1000 m
[Duplex half | Full] /// sets the network port half/Full Duplex
[Autoneg on | off] // sets whether the network port is self-negotiated
[Port TP | AuI | BNC | MII] // sets the network port type
[Phyad N] \
[Xcvr internal | exteral] \
[Wol p | u | M | B | A | G | S | D...] \
[Sopass XX: YY: ZZ: AA: BB: CC] \
[Msglvl N]
Example:
1) [root @ Linux/] # ethtool eth1
Settings for eth1:<p>_ ICMs</p> <br>
<br>
<br>
<br>
<br>
<br>
Advertised link modes: 10 BaseT/half 10 BaseT/full
100 Baset/half 100 Baset/full
1000 Baset/full
Advertised auto-negotiation: Yes
Speed: 1000 MB/S
Duplex: full
Port: Twisted Pair
Phyad: 0
Transceiver: Internal
Auto-negotiation: On
Supports wake-on: umbg
Wake-on: d
Link detected: Yes
2) [root @ Linux/] # ethtool-I eth1
Driver: e1000
Version: 5.0.43-K1
Firmware-version: N/
Bus-Info: 06:08. 1
3) [root @ Linux/] # ethtool-s eth1
Nic statistics:
Rx_packets: 58068300
Tx_packets: 87124083
Rx_bytes: 1589713008
Tx_bytes: 2165825901
Rx_errors: 0
Tx_errors: 0
Rx_dropped: 0
Tx_dropped: 0
Multicast: 0
Collisions: 0
Rx_length_errors: 0
Rx_over_errors: 0
Rx_crc_errors: 0
Rx_frame_errors: 0
Rx_1_o_errors: 0
Rx_missed_errors: 0
Tx_aborted_errors: 0
Tx_carrier_errors: 0
Tx_1_o_errors: 0
Tx_heartbeat_errors: 0
Tx_window_errors: 0
4) [root @ Linux/] # ethtool-s eth1 autoneg off speed 100 duplex full
Related:
1) [root @ Linux/] # Which ethtool
/Sbin/ethtool
2) [root @ Linux/] # rpm-qf/sbin/ethtool
Ethtool-1.6-5
3) How to Make ethtool settings permanently stored on network devices?
Solution 1:
The ethtool settings can be saved in the/etc/sysconfig/network-scripts/ifcfg-ethx file to activate the options when the device starts next time.
Example: ethtool-s eth0 speed 100 duplex full autoneg off
This command sets the eth0 device to full-duplex adaptive with a speed of MBS. To set these parameters when eth0 is started, modify the file/etc/sysconfig/network-scripts/ifcfg-eth0 and add the following line:
Ethtool_opts = "speed 100 duplex full autoneg off"
Solution 2:
Write ethtool settings to/etc/rc. d/rc. Local.
ArticleSource: http://www.diybl.com/course/6_system/linux/Linuxjs/2008619/126834.html