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(orip a) lists interfaces and IPs.ip -br agives a brief overview. - Link:
ip link set eth0 up/downswitches the interface.ip -s linkshows counters for packets and drops. - Routes:
ip routeshows the routing table,ip route get 8.8.8.8the path to a destination. - Neighbours:
ip neighreplacesarp -a. - Persistence: Changes made with
ipare lost on reboot. Make them permanent in Netplan, NetworkManager or systemd-networkd. - ethtool:
ethtool eth0shows speed, duplex and link status.ethtool -S eth0error counters,ethtool -s eth0 speed 1000 duplex full autoneg offforces values. - Typical finding: A card negotiating only 100 Mbit/s often points to a faulty cable. See Cat cables.
See also: Routing