Octet

Why did the ip command replace ifconfig and route, and what are the ip equivalents of the old commands?

Show the answer

Say this first

ifconfig, route, arp and netstat come from net-tools, which talks to the kernel through old ioctl calls and /proc files and has barely changed in years. iproute2 (ip, ss, bridge, tc) uses netlink, the kernel's native networking interface, so it sees everything the kernel can do: several addresses per interface, multiple routing tables and policy rules, namespaces, VRFs and tunnels. Many minimal distros no longer install net-tools at all.

Go deeper

The mapping I use

Old (net-tools)New (iproute2)
ifconfigip addr and ip link
ifconfig eth0 upip link set eth0 up
route -nip route
arp -nip neigh
netstat -tulpnss -tulpn
netstat -iip -s link
brctl showbridge link or ip link show master br0
vconfig add eth0 10ip link add link eth0 name eth0.10 type vlan id 10

What ifconfig gets wrong

  • It shows only the primary IPv4 address of an interface. A second address added with ip addr add is invisible to ifconfig unless it was given a label like eth0:1. People have chased "missing" addresses for hours because of this.
  • route -n shows only the main table. If policy routing is in use, it hides the tables that matter.
  • It knows nothing about namespaces, VRFs or most modern tunnel types.

Habits worth showing

Shell
ip -br addr        # one line per interface: name, state, addresses
ip -br link        # one line per interface: name, state, MAC, flags
ip -c route        # colour output
ip -s link show ens192   # packet, error and drop counters

Traps

  • Saying ifconfig shows all addresses. It hides secondary addresses that have no label.
  • Forgetting that ip changes are runtime only and vanish on reboot or on a network service restart.
How did you do?