Introduction to Ethtool Tools

Source: Internet
Author: User

Description:
Ethtool is the command used to query and set the network card parameters.

Overview:  
Ethtool ethx     //Query ETHX network basic settings
ethtool–h        //Display ethtool command help
ethtool–i ethx   //query Ethx the relevant information  
Ethtool–d ethx   //Query ETHX network registration Information
Ethtool–r ethx   //Reset ETHX network port to Adaptive mode
Ethtool–s ETHX    //Query ETHX network receipt and contract statistics
Ethtool–s ethx [Speed 10|100|1000]\         //Set network port rate 10/100/1000m
[Duplex half|full]\           //Set Full-duplex
[Autoneg on|off]\           // Sets whether the network port is self negotiated
[port tp|aui|bnc|mii]\        //Set network port type
[Phyad n]\                 &NBSP
[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:
Supported ports: [TP]
Supported Link Modes:10baset/half 10baset/full
100baset/half 100baset/full
1000baset/full
Supports Auto-negotiation:yes
Advertised Link Modes:10baset/half 10baset/full
100baset/half 100baset/full
1000baset/full
Advertised Auto-negotiation:yes
speed:1000mb/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/a
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_fifo_errors:0
rx_missed_errors:0
tx_aborted_errors:0
tx_carrier_errors:0
tx_fifo_errors:0
tx_heartbeat_errors:0
tx_window_errors:0
4, [Root@linux/]# ethtool-s eth1 Autoneg off speed-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 the Ethtool settings permanently stored in a network device.
Workaround One:  
     ethtool settings can be saved by/etc/sysconfig/network-scripts/ifcfg-ethx file. This activates the option the next time the device starts. &NBSP
For example: ethtool-s eth0 speed Duplex full Autoneg off
This instruction sets the eth0 device to Full-duplex Adaptive with a speed of 100Mbs. To set these parameters eth0 startup, modify the file/etc/sysconfig/network-scripts/ifcfg-eth0 and add the following line:  
ethtool_opts= Speed Full Autoneg off
Workaround two:  
to write Ethtool settings to/etc/rc.d/rc.local.
How the Ethtool command enables you to disable adaptive access to Intel's Gigabit switched network adapters

Under RHEL3, how do I use the Ethtool command to disable adaptive access to Intel's gigabit switched NIC?
Workaround:  
       the link speed and Full-duplex mode must be specified when the Intel Gigabit NIC is disabled for adaptive. When using Ethtool to disable network card adaptive features that use the E1000 network card driver module, you must specify both the link speed and the Full-duplex operating mode.
For example:  
ethtool-s eth0 Autoneg off
turns off the adaptive, but only temporarily disables, and the driver automatically turns the adaptive back on if the link speed and Full-duplex mode are not specified in the command. &NBSP
To use the Ethtool tool to disable the network card adaptive characteristics of the e1000 NIC driver module, use the following steps  
1. Enter terminal mode. 2. Execute   as root
ethtool-s ethx Autoneg off speed 1000 full
Here duplex is the name of the network card (for example, ethx or eth0, etc.), which will turn off the adapter's adaptive Feature and force the network card speed to 1Gb, all double public mode.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.