Chapter 36. Routing: Miscellaneous Topics

In the previous chapters, we saw how the various routing features work and how they interact with each other and with other kernel subsystems. In this chapter, we conclude the routing part of the book with a description of how the subsystem interacts with the user-space commands that configure routing. I will not describe the commands themselves, because administration is outside the scope of this book. We will also look at the various files exported in the /proc directory that can be used to tune routing. The chapter concludes with a detailed description of the data structures already introduced in Chapter 32.

User-Space Configuration Tools

Routing can be configured with both the net-tools and IPROUTE2 packages, which use ioctl and Netlink interfaces, respectively. The following subsections give more details on these two packages, but focus on the IPROUTE2’s ip command, which is the newer and more powerful way to configure routing on Linux.

The two sets of tools can coexist without problems, if you know their limitations and use them accordingly. net-tools does not allow you to configure any of the advanced routing features, such as Multipath and Policy Routing; nor can you see these features in the results displayed by net-tools' utilities. However, the routing configuration applied by IPROUTE2 is backward compatible with net-tools.

Figure 36-1 summarizes what we will see in the subsections. The figure shows the main functions used by the ...

Get Understanding Linux Network Internals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.