EMZETT.
Login

The ip command and ethtool

In short: ip is the modern Linux tool for addresses, interfaces and routes, ethtool shows and changes properties of network cards.

In more detail: ip from the iproute2 package replaces the old commands ifconfig, route and arp.

In Depth

  • Addresses: ip addr (or ip a) lists interfaces and IPs. ip -br a gives a brief overview.
  • Link: ip link set eth0 up/down switches the interface. ip -s link shows counters for packets and drops.
  • Routes: ip route shows the routing table, ip route get 8.8.8.8 the path to a destination.
  • Neighbours: ip neigh replaces arp -a.
  • Persistence: Changes made with ip are lost on reboot. Make them permanent in Netplan, NetworkManager or systemd-networkd.
  • ethtool: ethtool eth0 shows speed, duplex and link status. ethtool -S eth0 error counters, ethtool -s eth0 speed 1000 duplex full autoneg off forces values.
  • Typical finding: A card negotiating only 100 Mbit/s often points to a faulty cable. See Cat cables.

See also: Routing