Chapter 4. IPROUTE2 Utility for Linux

   


This chapter covers the tool used in Linux for implementing Policy Routing. Because there are few other sources of information on this utility, this chapter's primary use will be as a reference on the command syntax and usage. As I illustrate the utility I will include examples of usage as well as notations about interactions with other networking utilities within Linux.

The utility used under Linux to implement Policy Routing is named ip as in the ip command from Cisco IOS. This utility was written by Alexey N. Kuznetsov, who also wrote the IPv6 and IPv4 routing code for Linux kernels starting with the 2.1 series. The ip utility can be used to provide all of the standard IPv4 functions discussed in Chapter 1, "Basic IPv4 Routing." As you will see in the rest of this book, I will make exclusive use of this utility for all IPv4 and IPv6 configuration needs.

Note

The ip utility was specifically written for directly manipulating the Linux network internals through the netlink facility. This facility is provided in all Linux kernel series from 2.1 onward. In order to use the ip utility or any of the related netlink utilities, you must have both NETLINK and RTNETLINK defined in your kernel configuration. These options appear as "Kernel/User netlink socket" and "Routing messages" in the 2.1 and higher kernel menuconfig or xconfig . The kernel on the included distribution has all of these and other advanced routing options selected. If you would like you can use the .config file from that kernel to see which options are needed.


You first will learn where to obtain and compile the ip utility. I then document those uses of the utility covered in this book. These sections draw heavily upon Kuznetsov's own documentation of the command itself, with occasional additional discussion and examples provided. Note that many of the uses of the command are not covered in this book, therefore some of the command documentation is used in order to make the examples and exercises understandable. No man pages currently exist for the ip command and Kuznetsov's own current documentation is only available in LaTeX format. With Kuznetsov's permission I have edited and expanded the LaTeX documentation into the sections found here and elsewhere in the book. If there are errors in these sections, they belong to my translation and should be addressed to me first.


   
Top


Policy Routing Using Linux
Policy Routing Using Linux
ISBN: B000C4SRVI
EAN: N/A
Year: 2000
Pages: 105

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net