TTR Networks

What is iproute2?

Linux networking tools

iproute2 is the standard collection of Linux command-line tools for viewing and configuring networking, including ip, ss, tc and bridge.

The tools talk to the kernel over netlink, the same interface routing daemons use, so they can see and change everything the kernel supports: multiple addresses per interface, policy routing, network namespaces, VRFs, tunnels and more. The main commands are:

  • ip link for interfaces (up, down, MTU, VLANs, bridges, veth pairs);
  • ip addr for addresses, and ip route for routing tables, with ip route get 198.51.100.7 showing which route, interface and source address the kernel would actually use;
  • ip neigh for the ARP and IPv6 neighbour table, and ip rule for policy routing;
  • ss for sockets, such as ss -tlnp to list listening TCP ports and the processes behind them;
  • tc for queueing, shaping and traffic control.

Most ip subcommands accept abbreviations (ip a, ip r), -br for a brief one-line-per-interface view, and -j for JSON output in scripts.

iproute2 replaced the older net-tools package (ifconfig, route, arp, netstat), which has been deprecated for many years, cannot show some of what the modern kernel does (for example, secondary addresses without aliases), and is missing from many minimal distributions. Old tutorials still use net-tools, so knowing the equivalents helps: ifconfig becomes ip addr, route -n becomes ip route, arp -n becomes ip neigh and netstat -tlnp becomes ss -tlnp. One thing to remember is that changes made with ip take effect immediately but are lost on reboot; persistent settings belong in the distribution's network configuration. The Linux Network Connectivity lesson uses these tools layer by layer to find out why a host can't reach something.

Lessons that use iproute2

  • Linux Network ConnectivityTeaches this term · Beginner · 80 min

    Find out why a Linux machine can't reach something, layer by layer: interfaces and addresses, routes and ip route get, ARP and the neighbour table, ping and traceroute, DNS, and listening sockets — with real output from a three-host lab.

  • Building a network lab on an Apple Silicon MacBeginner · 45 min

    Run real network labs on an M-series Mac: native FRR and Linux containers, x86-only images through Rosetta, and full x86 VyOS VMs under QEMU in Docker, with the pitfalls that stop most people and a starter lab that mixes all three.