6

, .

, , , . , .

Ethtool

, , Linux ethtool.


, ?

(Half-duplex) . , , .

(Full-duplex), .

(Auto-Negotiation) - , . , .


?

, . , . , , . (duplex mismatch).

. . . , , .


Ethtool

Ethtool - , . , , .

, ethtool :

  1. DMA
  2. -

ethtool :

yum install ethtool [ Fedora, CentOS, RHEL]
sudo apt-get install ethtool [ Ubuntu, Debian]

, .

, :

ifconfig

.

enp0s3      Link encap:Ethernet  HWaddr 00:1A:2B:3C:4D:5E

, , , : ethtool _.

:

ethtool enp0s3

, 1000 /, Full, .

ethtool enp0s3

ethtool s speed, duplex autoneg :

sudo ethtool s [device_name] speed [10/100/1000] duplex [half/full] autoneg [on/off]

, 1000 /, - , - , :

sudo ethtool s enp0s3 speed 1000 duplex full autoneg on

ethtool [_] , .


, Ethtool, .

, :

vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

, :

ETHTOOL_OPTS="speed [100|1000|10000] duplex [half|full] autoneg [on|off]

:

ETHTOOL_OPTS="speed 1000 duplex full autoneg on

.

, .


, :

sudo ethtool -S _

:

	NIC statistics:
     rx_packets: 108048475
     tx_packets: 125002612
     rx_bytes: 17446338197
     tx_bytes: 113281003056
     rx_broadcast: 83067
     tx_broadcast: 1329
     rx_multicast: 3
     tx_multicast: 9
     rx_errors: 0
     tx_errors: 0
     tx_dropped: 0
     multicast: 3
     collisions: 0
     rx_length_errors: 0
     rx_over_errors: 0
     rx_crc_errors: 0
     rx_frame_errors: 0
     rx_no_buffer_count: 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
     tx_abort_late_coll: 0
     tx_deferred_ok: 0
     tx_single_coll_ok: 0
     tx_multi_coll_ok: 0
     tx_timeout_count: 0
     tx_restart_queue: 2367
     rx_long_length_errors: 0
     rx_short_length_errors: 0
     rx_align_errors: 0
     tx_tcp_seg_good: 0
     tx_tcp_seg_failed: 0
     rx_flow_control_xon: 0
     rx_flow_control_xoff: 0
     tx_flow_control_xon: 0
     tx_flow_control_xoff: 0
     rx_long_byte_count: 17446338197
     rx_csum_offload_good: 107876452
     rx_csum_offload_errors: 2386
     rx_header_split: 0
     alloc_rx_buff_failed: 0
     tx_smbus: 0
     rx_smbus: 0
     dropped_smbus: 0
     rx_dma_failed: 0
     tx_dma_failed: 0

- .


, ethtool: , , , . ethtool, , , . , Ethernet enp0s3 15 - :

sudo ethtool -p enp0s3 15	

, , .


ethtool , :

  1. Online - nvram
  2. Offline - , , loopback,

- . :

sudo ethtool -t enp0s3 online

:

ethtool

, offline .


:

ethtool -i eth0

:

driver: via-rhine
version: 1.5.0
firmware-version: 
bus-info: 0000:00:06.0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

, ethtool. , . ethtool.


50% Merion Academy