当前位置:网站首页>Using the ethtool command by example
Using the ethtool command by example
2022-07-03 05:42:00 【TAOXC( ̿ ▀ ̿ ̿Ĺ̯̿̿ ▀ ̿ ̿】
ethtool The command is used to display / Change Ethernet adapter settings . You can go to Linux Use this tool to change the network card speed 、 Automatic negotiation 、LAN Wake up settings 、 Duplex mode . In this paper , I'll show you some ways to help you solve the problem of Ethernet card ethtool Order sample .
1) Display Ethernet interface details
ethtool The command retrieves the status of the Ethernet interface . The output shows etho The speed of the interface 、 Duplex 、 Properties such as status and wake-up .
Here is an example :
# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
There are three types of duplex :
full duplex : Use when Ethernet is connected to the switch . Allow bidirectional transmission , That is, send and receive data packets at the same time .
Half duplex : Use when Ethernet is connected to the hub . Only one-way transmission is allowed , That is, send or receive data packets .
Automatic negotiation : According to the network connection , Ethernet interface decides whether to use full duplex or half duplex .
2) ETHTOOL_OPTS Variable
have access to Ethtool_opt Variables are permanently set Ethtool Command settings . Let's take a look at the example given below :
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
ETHTOOL_OPTS="speed 50 duplex full autoneg off"
You can use ifup and ifdown Command to test the above settings .
3) Show statistics
You can use the following commands to check Ethernet driver settings and auto negotiation :
# ethtool -i eth0
driver: bnx2
version: 2.0.1-suse
firmware-version: 1.9.3
bus-info: 0000:04:00.0
[[email protected] ~]# ethtool –a eth0
Pause parameters for eth0:
Autonegotiate: on
RX: on
TX: on
Ethtool Ordered “-p Options ” Helps identify specific devices from multiple devices .
# ethtool –p eth0
Having network card statistics is very useful for solving network problems .
# ethtool –S eth0
NIC statistics:
tx_packets: 148683
rx_packets: 179489
tx_errors: 0
rx_errors: 0
rx_missed: 0
align_errors: 0
tx_single_collisions: 0
tx_multi_collisions: 0
unicast: 116884
broadcast: 25361
multicast: 61674
tx_aborted: 0
tx_underrun: 0
The above output shows the details about transmitting and receiving packets .
4) Enable flow control
In the latest MAC and GMAC Embedded devices , Can pass “PAUSE” Parameter enable full duplex flow control .
This is the solution :
# ethtool -A eth0 [autoneg on|off] [rx on|off] [tx on|off]
The details of the uninstall parameters are as follows :
# ethtool –k eth0
however , Any changes made to the Ethernet parameter settings will disappear at the next startup . To keep them intact the next time they start , You must add commands to /etc/rc.local Make these changes permanent
# cat /etc/rc.local
ethtool -s eth0 speed 100 duplex full autoneg on 1>/dev/null 2>/dev/null
ethtool -s eth1 speed 100 duplex full autoneg on 1>/dev/null 2>/dev/null
5) Set duplex mode
The following example shows how to use ethtool Command to set speed or duplex mode , As shown below :
# ethtool -s eth0 speed 100 duplex full
# ethtool -s eth0 speed 10 duplex half
边栏推荐
- Go practice -- use redis in golang (redis and go redis / redis)
- "250000 a year is just the price of cabbage" has become a thing of the past. The annual salary of AI posts has decreased by 8.9%, and the latest salary report has been released
- Congratulations to musk and NADELLA on their election as academicians of the American Academy of engineering, and Zhang Hongjiang and Fang daining on their election as foreign academicians
- [function explanation (Part 2)] | [function declaration and definition + function recursion] key analysis + code diagram
- [Shangshui Shuo series together] day 10
- 獲取並監控遠程服務器日志
- 【无标题】
- The IntelliJ platform completely disables the log4j component
- Final review (Day7)
- Classification and discussion of plane grab detection methods based on learning
猜你喜欢

How to use source insight
![[branch and cycle] | | super long detailed explanation + code analysis + a trick game](/img/aa/543d4f0dcbcd664be963579af77ec9.jpg)
[branch and cycle] | | super long detailed explanation + code analysis + a trick game

PHP notes are super detailed!!!

Go practice -- factory mode of design patterns in golang (simple factory, factory method, abstract factory)

Analysis of the example of network subnet division in secondary vocational school

今天很多 CTO 都是被幹掉的,因為他沒有成就業務
![[set theory] relational closure (reflexive closure | symmetric closure | transitive closure)](/img/c8/2995c503e9dabae4e2cc704449e04f.jpg)
[set theory] relational closure (reflexive closure | symmetric closure | transitive closure)

配置xml文件的dtd

Qt读写Excel--QXlsx插入图表5

Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)
随机推荐
DEX net 2.0 for crawl detection
Pessimistic lock and optimistic lock of multithreading
[explain in depth the creation and destruction of function stack frames] | detailed analysis + graphic analysis
Shanghai daoning, together with American /n software, will provide you with more powerful Internet enterprise communication and security component services
Final review (day3)
Explanation of variables, code blocks, constructors, static variables and initialization execution sequence of static code blocks of Ali interview questions
Redhat7系统root用户密码破解
chromedriver对应版本下载
Kubernetes resource object introduction and common commands (V) - (configmap)
Making coco datasets
Qt读写Excel--QXlsx插入图表5
Apache+php+mysql environment construction is super detailed!!!
32GB Jetson Orin SOM 不能刷机问题排查
期末复习(DAY6)
Communication - how to be a good listener?
期末复习(day3)
获取并监控远程服务器日志
Redis encountered noauth authentication required
Final review Day8
2022.6.30DAY591