Posted on 23 June 2008. Tags: Linux for Beginner, Linux Introduction, Linux Networking

“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:
- Starting Kernel Configuration
- Network Protocol Support
- Network Hardware Options
- 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.
Posted in Unix & Linux
Posted on 23 June 2008. Tags: Compilation of Linux, Configuration of Linux Kernel, Kernel Configuration, Linux Beginner, Linux for Beginner, Linux for Newbie, Linux Kernel, Linux Kernel Compilation, Linux Networking

To configure compile-time kernel options, you must begin with the kernel source code. All major distributions ship with this, but it may or may not be installed by default. Many distributions make changes to the standard kernel (say, to add new drivers that aren’t yet standard). You may prefer to start with a standard kernel and add only those patches you need (it’s possible you won’t need any). Check http://www.kernel.org or a major Linux archive site like ftp://sunsite.unc.edu for the latest kernel source code. (You can also obtain kernel source code from your Linux distribution, but many distributions ship with kernels that have been patched to include non-standard drivers. Using a more standard kernel can be beneficial if you run into problems and need help solving them.)
There are two current branches of kernel development, which are distinguished by the second number in the three-part version number. Those with even second numbers (like 2.4.17) are known as stable or release kernels. Kernels with odd second numbers (like 2.5.2) are development kernels. Stable kernels are best for production environments, because they are, as the name implies, quite reliable. Development kernels, on the other hand, are being actively tinkered with—the kernel developers use this line to add new drivers, change interfaces, and so on. Development kernels are therefore best avoided unless you want to contribute to kernel development or if you really require some new driver. (In the latter case, you can often find a back-port of the driver to an older stable kernel.)
Read the full story
Posted in Unix & Linux
Posted on 23 June 2008. Tags: Compilation of Linux, Configuration of Linux Kernel, Kernel Configuration, Linux Beginner, Linux for Beginner, Linux for Newbie, Linux Kernel, Linux Kernel Compilation, Linux Networking

The Network Device Support kernel menu contains options related to network hardware. The most important of these options are drivers for specific network cards. The most common types of network cards today are Ethernet devices, but others include traditional local network hardware, long-distance devices, and wireless devices. PC Card devices (for notebook computers) have their own submenu off of the Network Device Support menu. You also select dial-up devices (used to establish connections over telephone modems and some other types of hardware) here.
Most of these devices require that you select the Network Device Support option at the top of the Network Device Support menu. If you fail to do this, other options won’t be available.
Read the full story
Posted in Unix & Linux
Posted on 23 June 2008. Tags: Linux for Beginner, Linux Introduction, Linux Networking

The Networking Options kernel menu contains options related to network protocols. You can include or exclude support for entire protocol stacks, and for some (particularly TCP/IP), you can fine-tune the support to optimize the kernel for particular roles, such as router options or packet filtering.
Read the full story
Posted in Unix & Linux
Posted on 23 June 2008. Tags: Compilation of Linux, Configuration of Linux Kernel, Kernel Configuration, Linux Beginner, Linux for Beginner, Linux for Newbie, Linux Kernel, Linux Kernel Compilation, Linux Networking

The preceding discussion has covered the most important options you’ll encounter in configuring a kernel to use the networking protocols on your network, and the hardware you use to connect a computer to that network. The process of compiling the kernel, however, is another matter, and one that’s not, strictly speaking, a networking task. Nonetheless, this task is important if you need to recompile your kernel to add or delete support for specific network features, so this section provides an overview of some of the decisions and procedures involved.

Don’t adjust only the options described earlier in this chapter and then compile your kernel. Although they’re beyond the scope of this book, kernel options relating to features like EIDE controllers, SCSI host adapters, and disk filesystems are critically important for a functioning Linux computer. If you incorrectly configure these features, your computer may not boot at all, or it may perform in a substandard way (for instance, with very poor disk speed). These options are discussed in documents such as the Linux Kernel HOWTO at http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html (among many other places) and many general Linux books.
Read the full story
Posted in Unix & Linux