iproute2

Last update: 2026-08-28 10:51:46 +0800 +0800
Available translations: 日本語 / 中文(简体) / 中文(繁體)

iproute2 is the standard Linux userspace suite for inspecting and configuring the kernel networking stack. The suite covers links, addresses, routes, neighbours, tunnels, traffic control, sockets, hardware offload, and several specialized networking subsystems. Most commands exchange Netlink messages with the kernel; they do not implement the data plane that forwards packets.

The project publishes one release for each Linux kernel release. Matching versions expose the same generation of kernel interfaces, although a newer iproute2 can operate against an older kernel when it does not request unsupported features.

A History of Linux Userspace Network Management #

Linux network management developed in layers. Low-level utilities modify live kernel state, while configuration frameworks and daemons decide what state should persist and when to apply it.

PeriodSoftwareRole and Historical Significance
Early 1990sBSD-derived commands and net-toolsSeparate commands such as ifconfig, route, arp, and netstat became the conventional Linux interface for links, IPv4 addresses, routes, neighbour entries, and statistics. Their interfaces depend heavily on networking ioctls and /proc, so they cannot represent many later kernel features.
1990s onwardDistribution network scripts and ifupdownFiles such as Debian’s /etc/network/interfaces and distribution-specific network scripts added persistent configuration around low-level commands. ifup and ifdown describe interface lifecycle, but they are orchestration tools rather than kernel APIs.
Late 1990s onwardiproute2Alexey Kuznetsov created iproute2 alongside the kernel’s advanced routing, traffic-control, and RTnetlink work. ip consolidated the object model exposed by ifconfig, route, arp, and iptunnel; ss and tc covered socket inspection and traffic control. Netlink’s extensible, message-based interface allowed the suite to track new kernel capabilities.
2004 onwardNetworkManagerNetworkManager introduced a long-running connection manager for dynamic wired, Wi-Fi, mobile, and VPN connections. Connection profiles express desired state, while nmcli, nmtui, and graphical clients control the daemon.
2014 onwardsystemd-networkdsystemd 210 added a declarative network manager oriented toward boot-time and continuously managed links. .link, .netdev, and .network files define naming, virtual devices, addresses, routes, and related policy; networkctl provides runtime inspection and control.
2016 onwardNetplan and other configuration front endsNetplan added a YAML configuration layer that renders configuration for NetworkManager or systemd-networkd. Front ends of this class standardize policy without replacing the selected network-management daemon or the kernel interfaces beneath it.

The generations overlap because they solve different problems. ip addr add changes the running kernel immediately, whereas NetworkManager, systemd-networkd, or ifupdown owns persistent policy and may later replace that change. Administrators should avoid modifying a daemon-managed interface with ad hoc ip commands except for diagnosis or deliberate temporary state.

Packet filtering also follows a separate lineage: iptables and nft configure Netfilter rather than the routing and link objects managed by iproute2.

The ip Object Model #

ip uses the form ip [options] object command. The principal objects map to kernel networking concepts:

ObjectPurpose
linkinspect or configure network devices and link-layer properties
addressmanage IPv4 and IPv6 addresses
routemanage unicast, multicast, and special routes
rulemanage routing-policy database rules
neighbourmanage ARP and IPv6 neighbour-discovery entries
netnscreate and operate in named network namespaces
tunnel, l2tp, macsecconfigure tunnel and secure-link types
xfrmmanage IPsec state and policies
nexthopmanage reusable next-hop objects and groups
mptcpmanage Multipath TCP endpoints and limits
monitorstream RTnetlink state changes

The object list continues to grow because ip acts as a collection of front ends behind one executable. ip help lists top-level objects, and ip object help describes the commands supported by an installed release.

Executables Installed by iproute2 7.1.0 #

The upstream release archive contains source code, not prebuilt binaries. The table lists every command name installed by the upstream make install rules in iproute2 7.1.0, the current release at the time of writing. Distribution packages may split, omit, relocate, or patch the commands.

CommandPurposeBuild or Installation Note
ipinspect and configure links, addresses, neighbours, routes, rules, namespaces, tunnels, and related network objectsCore command
rtmonrecord RTnetlink link, address, route, and neighbour events for later inspectionCore command; ip monitor provides overlapping interactive functionality
routelprint the routing table in a column-oriented formatInstalled Python script
tcconfigure traffic-control queueing disciplines, classes, filters, and actionsCore command
bridgemanage bridge links, forwarding databases, VLANs, multicast databases, and bridge port stateCore command
ssinspect sockets, protocol state, ownership, queues, memory, and diagnostic dataSuccessor to the socket-reporting functions of netstat
nstatreport kernel SNMP and protocol counters, including changes since the preceding invocationCore statistics command
ifstatreport per-interface packet and byte countersCore statistics command
rtacctreport traffic counters grouped by routing realms from the kernel’s route-accounting dataCore statistics command
lnstatperiodically report selected counters exported through /proc/net/statGeneral statistics command
rtstatreport routing-cache statistics through lnstat’s compatibility modeSymbolic link to lnstat
ctstatreport connection-tracking statistics through lnstat’s compatibility modeSymbolic link to lnstat
arpdmaintain a userspace ARP cache and answer kernel neighbour requests from a persistent databaseBuilt only when Berkeley DB compatibility headers and libraries are available
genlquery and invoke Generic Netlink familiesCore command; primarily useful for protocol development and diagnostics
tipcconfigure and inspect Transparent Inter-Process Communication bearers, links, nodes, sockets, and namespacesBuilt when libmnl is available
devlinkconfigure and diagnose device-level networking resources, ports, firmware parameters, health reporters, traps, and hardware ratesBuilt when libmnl is available
rdmainspect and configure RDMA devices, links, resources, system settings, and statisticsBuilt when libmnl is available
dcbinspect and configure Data Center Bridging buffers, priorities, Priority Flow Control, ETS, and application mappingsBuilt when libmnl is available
vdpamanage vDPA management devices and virtual data-path accelerator devicesBuilt when libmnl is available
netshaperinspect and configure hardware transmit-shaping objects exposed through NetlinkBuilt when libmnl is available
dpllinspect, configure, and monitor Digital Phase-Locked Loop devices and pins used for network clock synchronizationBuilt when libmnl is available

Programs named maketable, normal, pareto, and paretonormal also appear in the source tree, but the build uses them only to generate tc distribution tables. The install target copies their generated data rather than those host tools, so they are not release commands.

Choosing the Correct Layer #

  • Use iproute2 for immediate inspection, diagnostics, experiments, and low-level configuration that a higher-level manager does not expose.
  • Use NetworkManager, systemd-networkd, ifupdown, or a distribution configuration layer when state must survive reboot and react consistently to device lifecycle events.
  • Use nft for packet filtering and network address translation because those operations belong to Netfilter.
  • Match iproute2 documentation to the installed version because userspace can only encode features known at build time, and the running kernel can only accept features that it implements.

References #

Comments

Read or comment on GitHub (sign-in required to comment)