In linux, ethtoolethX queries Nic and network information. it is recommended that www.2cto.com reference Ethtool to query and set Nic parameters. Summary: ethtoolethX // query ethX network port basic settings ethtool & amp; ndash; h...
In linux, ethtool ethX is used to query Nic and network information. it is recommended that www.2cto.com reference Ethtool to query and set Nic parameters. Summary: ethtool ethX // query ethX network port basic settings ethtool-h // Display ethtool command help (help) ethtool-I ethX // query ethX network port information ethtool-d ethX // query ethX network port registration information ethtool-r ethX // reset ethX network port to adaptive mode ethtool-S ethX/ /query 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] /// set 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: Supported ports: [TP] Supported link modes: 10 baseT/Half 10 baseT/Full 100 baseT/Half 100 baseT/Full 1000 baseT/Full Supports auto-negotiation: Yes 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/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 bytes: 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_fi Fo_errors: 0 rx_missed_errors: 0 rows: 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 keep ethtool settings permanently on a network device? 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. For example, ethtool-s eth0 speed 100 duplex full autoneg off this command sets the eth0 device to full-duplex adaptive, and the speed is 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. The mii-tool queries the network information of each network port. it is not recommended and may not be supported by NICs. [Root @ FJu] #/sbin/mii-tool-v eth1: negotiated 100baseTx-FD, link OK product info: vendor 00: aa: 00, model 56 rev 0 basic mode: supported enabled basic status: complete, link OK capabilities: 100baseTx-FD 100baseTx-HD commandid advertising: 100baseTx-FD 100baseTx-HD commandid flow-control link partner: 100baseTx-FD commandid lsspci
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