wiki/HowtoEthtool.md

68 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2018-03-21 13:50:25 +01:00
---
title: Howto Ethtool
categories: sysadmin network
...
2016-12-29 11:25:39 +01:00
2018-03-21 13:50:25 +01:00
* Manpage : <https://manpages.debian.org/stretch/ethtool/ethtool.8.en.html>
2016-12-29 11:25:39 +01:00
2018-05-03 02:00:31 +02:00
[ethtool](http://www.kernel.org/pub/software/network/ethtool/) est un l'outil standard sous Linux permettant de voir et contrôler les paramètres d'une carte réseau (vitesse, half/full duplex, etc.)
2016-12-29 11:25:39 +01:00
2018-03-21 13:50:25 +01:00
## Installation
2016-12-29 11:25:39 +01:00
~~~
2018-03-21 13:50:25 +01:00
# apt install ethtool
2016-12-29 11:25:39 +01:00
2018-03-21 13:50:25 +01:00
# ethtool --version
ethtool version 4.8
2016-12-29 11:25:39 +01:00
~~~
2018-03-21 13:50:25 +01:00
## Utilisation
2016-12-29 11:25:39 +01:00
2018-03-21 13:50:25 +01:00
### Consulter l'état d'une interface
2016-12-29 11:25:39 +01:00
~~~
2018-03-21 13:50:25 +01:00
# ethtool eth0
Settings for eth0:
2018-05-03 02:00:31 +02:00
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
2018-03-21 13:50:25 +01:00
~~~
### Changer son état
Par exemple, configurer la vitesse à 10Mb/s, le duplex half, et désactiver l'auto-négotiation :
~~~
# ethtool -s eth0 speed 10 duplex half autoneg off
2016-12-29 11:25:39 +01:00
~~~
2018-03-21 14:22:10 +01:00
Pour changer l'adresse mac :
~~~
# ethtool -s eth0 phyad 01:23:45:67:89:0a
2018-05-03 02:00:31 +02:00
~~~