Previous Next Contents

8. Configuring the kernel.

Before you can use any of the network tools, or configure any network devices, you must ensure that your kernel has the necessary network support built into it. The best way of doing this is to compile your own, selecting which options you want and which you don't.

Assuming you have obtained and untarred the kernel source already and applied any patches that you might need to have applied to get any nonstandard or developmental software installed, all you have to do is edit /usr/src/linux/drivers/net/CONFIG. This file has many comments to guide you in editing it and in general you will need to edit very little, as it has sensible defaults. In my case I don't need to edit it at all. This file is really necessary if your ethernet card is an unusual one, or is one that isn't automatically detected by the ethernet driver. It allows you to hard code some of the elements of your ethernet hardware. For example, if your ethernet card is a close, but not exact clone of a WD-8013, then you might have to configure the shared memory address to ensure the driver detects and drives the card properly. Please check the The Ethernet-HOWTO for more definitive information on this file and its effect on ethernet cards. This file also contains configurable parameters for PLIP, though the defaults should again be ok unless you have a particularly slow machine.

When you are happy that the CONFIG file is suitable for your purposes, then you can proceed to build the kernel. Your first step will be to edit the top level Makefile to ensure the kernel will be built with the appropriate VGA settings and then you must run the kernel configuration program:

# cd /usr/src/linux
# make config

You will be asked a series of questions. There are four sections relevant to the networking code. They are the General setup, Networking options, Network device support and the Filesystems sections. The most difficult to configure is the Network device support section, as it is where you select what types of physical devices you want configured. On the whole you can just use the default values for the other sections fairly safely. The following will give you an idea of how to proceed:

*
* General setup
*
 ...
 ...
Networking support (CONFIG_NET) [y] y
 ...
 ...

In the General setup section you simply select whether you want network support or not. Naturally you must answer yes.

*
* Networking options
*
TCP/IP networking (CONFIG_INET) [y] 
IP forwarding/gatewaying (CONFIG_IP_FORWARD) [n] 
IP multicasting (CONFIG_IP_MULTICAST) [n] 
IP firewalling (CONFIG_IP_FIREWALL) [n] 
IP accounting (CONFIG_IP_ACCT) [n] 
*
* (it is safe to leave these untouched)
*
PC/TCP compatibility mode (CONFIG_INET_PCTCP) [n] 
Reverse ARP (CONFIG_INET_RARP) [n] 
Assume subnets are local (CONFIG_INET_SNARL) [y] 
Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n] 
The IPX protocol (CONFIG_IPX) [n] 
*

The second half of the Networking options section allows you to enable or disable some funky features that you can safely accept the defaults on until you have some idea why you want to change them. They are described briefly later if you are interested.

*
*
* Network device support
*
Network device support? (CONFIG_NETDEVICES) [y] 
Dummy net driver support (CONFIG_DUMMY) [n] 
SLIP (serial line) support (CONFIG_SLIP) [y] 
 CSLIP compressed headers (CONFIG_SLIP_COMPRESSED) [y] 
 16 channels instead of 4 (SL_SLIP_LOTS) [n] 
PPP (point-to-point) support (CONFIG_PPP) [y] 
PLIP (parallel port) support (CONFIG_PLIP) [n] 
Do you want to be offered ALPHA test drivers (CONFIG_NET_ALPHA) [n] 
Western Digital/SMC cards (CONFIG_NET_VENDOR_SMC) [y] 
WD80*3 support (CONFIG_WD80x3) [y] 
SMC Ultra support (CONFIG_ULTRA) [n] 
AMD LANCE and PCnet (AT1500 and NE2100) support (CONFIG_LANCE) [n] 
3COM cards (CONFIG_NET_VENDOR_3COM) [n] 
Other ISA cards (CONFIG_NET_ISA) [n] 
EISA, VLB, PCI and on board controllers (CONFIG_NET_EISA) [n] 
Pocket and portable adaptors (CONFIG_NET_POCKET) [n] 
*

This section is the most important and the most involved. It is where you select what hardware devices you want to support. You can see that I have selected SLIP support with header compression, PPP, the WD80*3 driver and nothing else. Other options will appear depending on what you select. If you answered `n' to the `SLIP..' option you will not be presented with the compressed SLIP or 16 channel options. Simply answer `y' to whatever you want to play with and `n' to those that you don't.

*
* Filesystems
*
 ...
 ...
/proc filesystem support (CONFIG_PROC_FS) [y] 
NFS filesystem support (CONFIG_NFS_FS) [y] 
 ...
 ...

If you wish to run an NFS client then you will want to include the NFS filesystem type. You will need to include the /proc filesystem because a number of the network utilities use it.

After you have completed the configuration, all that remains is to actually compile the kernel:

# make dep
# make

Don't forget to make zlilo if the new kernel compiles and tests ok.

8.1 What do all those funky Networking options actually do?

Newer kernels have a number of options that you are asked about when you do a make config. Generally you will not need to change these, but some of the options might be useful to you in certain circumstances.

TCP/IP networking

This one is obvious, it selects whether you configure the tcp/ip suite of protocols into your kernel. Chances are if you are reading this then you will want to answer `y' to this one.

Dummy networking device

This was added to allow SLIP and PPP users to configure an address on their linux machine that would not be dependent on their serial link being established. It is an easy way to give your linux machine two addresses.

IP forwarding/gatewaying

This determines what your kernel will do when it receives a datagram that has a destination address that is not one of its own devices. You must have this option selected if you want your kernel to act as an IP router. Most SLIP and PPP servers will want this option selected.

IP multicasting

This is alpha test code support for IP multicasting, examples of which include services such as `Internet Talk Radio' and live video. You will need additional programs to make use of this facility, this is just the kernel support.

IP firewalling

This option allows you to provide flexible security options for your linux machine. You can selectively enable/disable access to tcp/ip ports from any address ranges you choose. This also needs additional programs to support it.

IP accounting

This option is for those people that want to use their Linux machine to provide internet connectivity to others on a commercial basis. It allows you to count and record incoming and outgoing bytes on a per port and address basis. With the addition of suitable software this would allow you to produce seperate usage charges for each person using your systems networking capabilities.

PC/TCP compatibility mode

This option provides a work-around for a bug that causes problems when using the PC/TCP networking programs to talk to your linux machine. There is a PC/TCP bug which provokes a difficult to remedy Linux bug and this option prevents the two clashing. Normally you would leave this disabled, but if you have users on your network who use PC/TCP then you may have to enable this option to prevent problems.

Reverse ARP

This option allows you to configure the RARP protocol into your kernel. This option was added to allow the booting of Sun 3 systems. This is not generally very useful otherwise.

Assume subnets are local

This option selects whether you assume that your whole subnet is directly connected to your linux machine, or whether it might be bridged or otherwise subdivided at a lower layer. In practice it will make little difference if you leave it set at the default.

Disable NAGLE algorithm

This is a timing option that determines when a datagram should be transmitted. The default setting provides for the best throughput in most situations and you should leave this set as it is, as disabling it will degrade your throughput. This option can be selectively changed from within a program with a socket option and you would normally be much better off leaving it set at the default and specifically writing your programs to disable the NAGLE algorithm if they require extremely fast interactivity.

The IPX protocol

This option selects whether you compile the IPX protocol support into your kernel. The IPX protocol is an inter-networking protocol similar in function to the IP protocol. This protocol is one of those used by the Novell suite.

Amateur Radio AX.25 Level 2

This option selects whether you compile in the Amateur Radio AX.25 protocol suite. If you select this option then a new class of network sockets are available for programming. The AX.25 protocol is used primarily by Amateur Radio Operators for packet radio use.


Previous Next Contents