Before you can use any of the network tools, or configure any network devices, you must ensure that you 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 obtained and untarred the the kernel source already, and applied
any patches that you might need to have applied to get any nonstandard
or development 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 necesary 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 you ethernet hardware. For example,
if you 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
Ethernet-HOWTO for more definitive information on this file and its
effect on ethernet cards. This file also contains configurable parameters for
PLIP, mostly timers, 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
*
...
...
TCP/IP networking (CONFIG_INET) [y] y
...
...
In the General setup
section you simply select whether you want
network support or not. Naturally you must answer yes.
*
* Networking options
*
*
* (it is safe to leave these untouched)
*
*
* IP (required for now) y
*
Reverse ARP (CONFIG_INET_RARP) [y]
Assume subnets are local (CONFIG_INET_SNARL) [y]
Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
*
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.
*
* Network device support
*
Network device support? (CONFIG_ETHERCARDS) [y] y
SLIP (serial line) support (CONFIG_SLIP) [y] y
CSLIP compressed headers (SL_COMPRESSED) [n] n
PLIP (parallel port) support (CONFIG_PLIP) [n] n
NE2000/NE1000 support (CONFIG_NE2000) [n] n
WD80*3 support (CONFIG_WD80x3) [y] y
SMC Ultra support (CONFIG_ULTRA) [n] n
3c501 support (CONFIG_EL1) [n] n
3c503 support (CONFIG_EL2) [n] n
3c509/3c579 support (CONFIG_EL3) [n] n
HP PCLAN support (CONFIG_HPLAN) [n] n
AT1500 and NE2100 (LANCE and PCnet-ISA) support (CONFIG_LANCE) [n] n
AT1700 support (CONFIG_AT1700) [n] n
DEPCA support (CONFIG_DEPCA) [n] n
D-Link DE600 pocket adaptor support (CONFIG_DE600) [n] n
AT-LAN-TEC/RealTek pocket adaptor support (CONFIG_ATP) [n] n
*
This section if 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 without header compression, the WD80*3 driver, and
nothing else. Simply answer `y'
to whatever you want to play with, and
`n'
to that 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.
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter