Browse Source

mise en page

master
jdubois 3 years ago
parent
commit
bb7333f2c6
  1. 86
      HowtoEthtool.md

86
HowtoEthtool.md

@ -1,51 +1,61 @@
**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.**
---
title: Howto Ethtool
categories: sysadmin network
...
# Howto ethtool
* Manpage : <https://manpages.debian.org/stretch/ethtool/ethtool.8.en.html>
## ethtool
ethtool est un outil permettant de voir et contrôler les paramètres d'une carte réseau.
Installer ethtool :
## Installation
~~~
# aptitude install ethtool
~~~
Consulter l'état d'une interface :
~~~
# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10Mb/s
Duplex: Half
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
MDI-X: Unknown
Supports Wake-on: g
Wake-on: d
Link detected: yes
~~~
# apt install ethtool
Changer son état (par exemple) :
~~~
# ethtool -s eth0 speed 10 duplex full autoneg off
# ethtool --version
ethtool version 4.8
~~~
## Changer son adresse MAC
## Utilisation
Cela n'a pas un lien direct avec _ethtool_ mais pour changer son adresse MAC sur une machine Linux, on fera :
### Consulter l'état d'une interface
~~~
# ifconfig eth0 hw ether 01:23:45:67:89:0a
# 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
~~~
Loading…
Cancel
Save