ethtool

ethtool is a utility for Linux kernel-based operating system for displaying and modifying some parameters of network interface controllers (NICs) and their device drivers. ethtool is developed parallel to the Linux kernel.

ethtool
Original author(s)David S. Miller
Developer(s)Ben Hutchings
Initial release1998 (1998)
Repository
Written inC
Operating systemLinux
TypeNetworking
LicenseGPLv2
Websitewww.kernel.org/pub/software/network/ethtool/

Usage

The command is useful for:

  • Identification and diagnosis of Ethernet devices
  • Extended Ethernet devices statistics
  • Control speed, duplex, auto-negotiation and flow control for Ethernet devices
  • Control checksum offload and other hardware offload features
  • Control DMA ring sizes and interrupt moderation
  • Control receive queue selection for multiqueue devices
  • Upgrade firmware in flash memory

Examples

To display the current parameters of the first network port (eth0):

$ ethtool eth0
Settings for eth0:
       Supported ports: [ TP MII ]
       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: No
       Speed: 100Mb/s
       Duplex: Full
       Port: MII
       PHYAD: 1
       Transceiver: internal
       Auto-negotiation: off
       Supports Wake-on: g
       Wake-on: g
       Current message level: 0x00000007 (7)
       Link detected: yes

To force its speed and duplex, in 1000BASE-T:

$ ethtool -s eth0 speed 1000 duplex full autoneg off

mii-tool

mii-tool is an older program performing a similar function to ethtool. Since 2003,[1] it's considered obsolete and replaced by ethtool.

Example

To display the current parameters:

$ mii-tool
eth0: no autonegotiation, 100baseTx-HD, link ok

To force the network speed to 1 Gbit/s, and the duplex in full on the port 1 (eth0):

$ mii-tool -F 1000baseTx-FD eth0
$ mii-tool
eth0: 1 000 Mbit, full duplex, link ok
gollark: > I wonder if it would be possible to engineer a contagious bacteria with rapid reproductive rates to produce a fast acting psychoactive compound when undergoing cellular division, similar to how cholera produces cholera toxin. It would be an interesting non lethal bio weapon that could incapacitate enemy forces in a few hoursIt seems like it's getting cheaper and easier for people to genetically engineer bacteria and stuff, so I worry that within a few decades it will be easy enough that people will just do this sort of thing for funlolz.
gollark: I think I remember this being discussed before? Spirit complained about it.
gollark: Talking about where to get them might be, or at least might cause them to complain.
gollark: Based on advanced "ctrl+F" technology, there's nothing specifically about drugs or whatever (would be weird if there was) but just "no doing illegal things". *Talking* about drugs is not illegal.
gollark: There's a specific no-explosives rule, there isn't a specific no-talking-about-drugs one (though I Imagine Discord TOS would forbid some related stuff).

See also

References



This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.