Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

ethtool

From Wikipedia, the free encyclopedia
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Ethtool" – news ·newspapers ·books ·scholar ·JSTOR
(November 2020) (Learn how and when to remove this message)
This articlerelies largely or entirely on asingle source. Relevant discussion may be found on thetalk page. Please helpimprove this article byintroducing citations to additional sources.
Find sources: "Ethtool" – news ·newspapers ·books ·scholar ·JSTOR
(November 2020)
(Learn how and when to remove this message)
ethtool
Original author(s)David S. Miller
Developer(s)Ben Hutchings
Initial release1998; 27 years ago (1998)
Stable release
6.9[1] Edit this on Wikidata / 23 May 2024; 10 months ago (23 May 2024)
Repository
Written inC
Operating systemLinux
TypeNetworking
LicenseGPLv2
Websitewww.kernel.org/pub/software/network/ethtool/

ethtool is the primary means inLinux kernel-basedoperating systems (primarilyLinux andAndroid) for displaying and modifying the parameters ofnetwork interface controllers (NICs) and their associateddevice driver software from application programs running inuserspace.

ethtool consists of two components, anAPI within the Linux kernel through which NICs can send and receive parameters through their device driver software, and auserspace API based on the Linux SIOCETHTOOLioctl mechanism through which application programs can communicate with the kernel to send and receive NIC and NIC driver parameters.

MostLinux distributions provide a standardutility program calledethtool that can be used from ashell to control, or gather information from NICs using the ethtooluserspace API. In theInformation technology community, the termethtool is usually used to refer to this utility program.

The ethtooluserspace API can be accessed from programs written in theC andC++programming languages through theC standard library orC++ standard library respectively.

Severalscripting languages such asPerl andPython provide ethtool APIbindings that allow programmers using these languages to write scripts that can control NIC's.

ThemacOS andFreeBSD operating systems provide utility programs that have a user interface similar to the Linux ethtool utility, but that use fundamentally different APIs to communicate with their operating system kernels and NIC's.

Usage

[edit]

The command is useful for:

Examples

[edit]

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

$ethtooleth0Settings 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

[2]

To configure it with the 1000 Mb/s speed andduplex, in1000BASE-T:

$ethtool-seth0speed1000duplexfullautonegoff

To let the link light of the device eth0 flash for two minutes:

$ethtool-peth0120

To print the driver info of the interface eth0:

$ethtool-ieth0driver: mlx5_coreversion: 4.9-2.2.4firmware-version: 14.28.2006 (MT_2420110034)expansion-rom-version:bus-info: 0000:65:00.1supports-statistics: yessupports-test: yessupports-eeprom-access: nosupports-register-dump: nosupports-priv-flags: yes

mii-tool

[edit]

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

Example

[edit]

To display the current parameters:

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

To force the network speed to 1 Gbit/s, and theduplex infull on the port 1 (eth0):

$mii-tool-F1000baseTx-FDeth0$mii-tooleth0: 1 000 Mbit, full duplex, link ok

See also

[edit]

References

[edit]
  1. ^"ethtool - utility for controlling network drivers and hardware". Retrieved17 July 2024.
  2. ^"9 Linux ethtool Examples to Manipulate Ethernet Card (NIC Card)".www.thegeekstuff.com. 2010-10-28. Retrieved2020-11-14.
  3. ^"Ethernet Auto-negotiation and Duplexing on Linux".lists.olug.org. September 2003.

External links

[edit]
File system
Processes
User environment
Text processing
Shell builtins
Searching
Documentation
Software development
Miscellaneous
Retrieved from "https://en.wikipedia.org/w/index.php?title=Ethtool&oldid=1281305186"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp