Linux Kernel Network Configuration

Posted on Jun 23, 2008 by John - Unix & Linux

“All roads lead to Rome,” the saying goes. Something similar is true of Linux networking, except that in this case, Rome is the Linux kernel. Sooner or later, all network traffic passes through the kernel. Given that not all computers or networks are identical, the Linux kernel includes several options you can set to optimize a system for your specific needs. You can set some of these options by passing parameters to the kernel, either during the boot process or after the system has booted, and many of these cases are covered in subsequent chapters of this book. In other cases you must recompile your kernel to activate a needed option or to deactivate one that might degrade your system’s performance.

This chapter is devoted to discussing these kernel configuration options. First up is a discussion of kernel configuration procedures. Next is information on network protocol options, such as TCP/IP features, network filters, and support for non-TCP/IP protocol stacks. Next comes a discussion of Linux’s drivers for various types of network hardware. The chapter concludes with a brief overview of the process of kernel compilation and use.

This chapter does not attempt to teach you everything you need to know to compile a kernel; instead, it focuses on the networking options in the kernel. The “Starting Kernel Configuration” and “Compiling and Installing a Kernel” sections include some discussion of more general kernel configuration and use, but if you’re new to kernel compilation, you may want to consult the Linux Kernel HOWTO (http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html) or the kernel compilation chapter of an introductory Linux book.

Table of Contents of This Chapter:

  1. Starting Kernel Configuration
  2. Network Protocol Support
  3. Network Hardware Options
  4. Compiling and Installing a Kernel

Summary

The Linux kernel lies at the heart of all input to and output from a Linux computer, including network data transfers. For this reason, it’s important that any networked Linux computer have appropriate options selected in the kernel. You can optimize a kernel for a particular task by including options you might not otherwise include, or by omitting options that are unnecessary memory wasters. Most networking options fall under just two kernel configuration menus: Networking Options and Network Device Support. Both menus include many options and several submenus. Once you’ve selected the options you want, you must compile the Linux kernel by typing a few commands. You can then install the kernel for use by reconfiguring LILO to give you the option of using the new kernel.