wiki/HowtoEthtool.md

67 lines
1.6 KiB
Markdown
Raw 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-03-21 13:50:25 +01:00
ethtool est un outil permettant de voir et contrôler les paramètres d'une carte réseau.
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:
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
~~~
### 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
~~~