10.46. IPRoute2-2.6.38

The IPRoute2 package contains programs for basic and advanced IPV4-based networking.

10.46.1. Installation of IPRoute2

By default, this package builds the arpd program, which is dependent on Berkeley DB. Because arpd is not a very common requirement on a base Linux system, remove the dependency on Berkeley DB by using the commands below. If the arpd binary is needed, instructions for compiling Berkeley DB can be found in CBLFS at http://cblfs.cross-lfs.org/index.php/Berkeley_DB.

sed -i '/^TARGETS/s@arpd@@g' misc/Makefile
sed -i '/ARPD/d' Makefile
rm man/man8/arpd.8

This patch adds the ability to update the LIBDIR path:

patch -Np1 -i ../iproute2-2.6.38-libdir-1.patch

Compile the package:

make CC="gcc ${BUILD64}" DESTDIR= LIBDIR=/usr/lib64 \
    DOCDIR=/usr/share/doc/iproute2 MANDIR=/usr/share/man

The meaning of the make option:


This option overrides the default DESTDIR of /usr, so that that the IPRoute2 binaries will be installed into /sbin. This is the correct location according to the FHS, because some of the IPRoute2 binaries are used by the CLFS-Bootscripts package.

DOCDIR=/usr/share/doc/iproute2 MANDIR=/usr/share/man

The DESTDIR=/ parameter would cause documentation to be installed into /share/doc and /share/man. These options ensure the docs are installed to the correct locations.

This package does not come with a test suite.

Install the package:

make DESTDIR= LIBDIR=/usr/lib64 \
    DOCDIR=/usr/share/doc/iproute2 \
    MANDIR=/usr/share/man install

10.46.2. Contents of IPRoute2

Installed programs: ctstat (link to lnstat), genl, ifcfg, ifstat, ip, lnstat, nstat, routef, routel, rtacct, rtmon, rtpr, rtstat (link to lnstat), ss, and tc
Installed directories: /etc/iproute2, /lib/tc, /usr/lib/tc, /usr/share/doc/iproute2

Short Descriptions


Connection status utility


Needs description


A shell script wrapper for the ip command


Shows the interface statistics, including the amount of transmitted and received packets by interface


The main executable. It has several different functions:

ip link [device] allows users to look at the state of devices and to make changes

ip addr allows users to look at addresses and their properties, add new addresses, and delete old ones

ip neighbor allows users to look at neighbor bindings and their properties, add new neighbor entries, and delete old ones

ip rule allows users to look at the routing policies and change them

ip route allows users to look at the routing table and change routing table rules

ip tunnel allows users to look at the IP tunnels and their properties, and change them

ip maddr allows users to look at the multicast addresses and their properties, and change them

ip mroute allows users to set, change, or delete the multicast routing

ip monitor allows users to continously monitor the state of devices, addresses and routes


Provides Linux network statistics. It is a generalized and more feature-complete replacement for the old rtstat program


Shows network statistics


A component of ip route. This is for flushing the routing tables


A component of ip route. This is for listing the routing tables


Displays the contents of /proc/net/rt_acct


Route monitoring utility


Converts the output of ip -o back into a readable form


Route status utility


Similar to the netstat command; shows active connections


Traffic Controlling Executable; this is for Quality Of Service (QOS) and Class Of Service (COS) implementations

tc qdisc allows users to setup the queueing discipline

tc class allows users to setup classes based on the queuing discipline scheduling

tc estimator allows users to estimate the network flow into a network

tc filter allows users to setup the QOS/COS packet filtering

tc policy allows users to setup the QOS/COS policies