Ethtool
Primary means in Linux kernel-based operating systems for displaying and modifying the parameters of network interface controllers and their associated device driver software from application programs running in userspace.
- https://n0tes.fr/2019/12/03/ethtool/
Looking interface problems
ethtool -S enp2s1
NIC statistics:
tx_packets: 72761
rx_packets: 81459
tx_errors: 0
rx_errors: 0
rx_missed: 0
align_errors: 0
tx_single_collisions: 0
tx_multi_collisions: 0
unicast: 76717
broadcast: 3938
multicast: 804
tx_aborted: 0
tx_underrun: 0
Statistics
ethtool -m enp2s1
Informations (driver, firmware, supported operations)
ethtool -i enp2s1
Change MAC address
ethtool -s enp2s1 phyad 42:21:10:05:02:00
Change the speed
ethtool -s enp2s1 speed 1000 duplex full autoneg on