1.ethtool
Ethtool provides a powerful network card and network driver management capabilities, its concrete implementation framework and network driver and network hardware are closely related, easy to modify and expand, can provide Linux network developers and managers with network card hardware, driver and networking protocol stack settings, viewing and debugging functions.
2. Command usage format
ethtool [option] Interface
The common options are:
-s #修改网卡的部分配置 including network card speed, simplex/Full-duplex mode, MAC address, etc. With the-S option the modified content will take effect
-a #查看网卡中 the status of the RX module, the Send module TX and the Autonegotiate module: Start on or deactivate off
-a #修改网卡中 receive module RX, Status of Send module TX and autonegotiate modules: Start on or deactivate off-
K #显示网卡Offload参数的状态: On or off, including rx-checksumming, tx-checksumming, etc.
Modify the status of the NIC offload parameter-
s #显示NIC-and driver-specific statistical parameters such as the number of bytes received/sent by the NIC, number of broadcast packets received/sent, etc.
-i #显示网卡驱动的信息 such as driver name, version, etc.
3. Examples of commonly used operations
(1) View the interface information of the NIC
ethtool eth1 #查看网络接口eth1的信息
(2) Turn off the automatic negotiation of the NIC eth1
ethtool-s eth1 Autoneg off
(3) Modify the network card rate to 100mb/s
ethtool-s eth4 speed
(4) View network card driver information
ethtool-i eth0
(5) View some work statistics for the network adapter
ethtool–s
(6) Stop and view the status of the transmit module TX of the NIC
ethtool-a TX
off eth0 #修改tx的状态 ethtool-a eth0 #查看tx的状态
(7) Turn off the network card to verify the packets received C13/>ethtool-k Rx off eth0 #关闭校验
ethtool–k eth0 #查看校验启动状态
Note:
If you want to see the maximum network bandwidth supported by a network adapter, such as a 100M network card or a 1000M network card, you can use Ethtool to view
[Root@localhost] #ethtool eth0
Settings for eth0:
supported ports: [TP]
supported link modes: 10baset/ Half 10baset/full
100baset/half 100baset/full
1000baset/full Supports
Advertised link modes: 10baset/half 10baset/full
100baset/half
100baset/full 1000baset/full Advertised Auto-negotiation:yes
speed:1000mb/s << Show here there's Oh
duplex:full
port:twisted Pair
phyad:1
transceiver:internal
auto-negotiation:on Supports wake-on:pumbag
: G Current Message
level:0x00000001 (1)
Link Detected:yes
Learning materials refer to:
http://www.ibm.com/developerworks/cn/linux/1304_wangjy_ethtools/
Http://man.linuxde.net/ethtool