eth1. SLIP interfaces are handled differently from others because they are assigned dynamically. Whenever a SLIP connection is established, an interface is assigned to the serial port.

Figure 3.1 illustrates the relationship between the hardware, device drivers, and interfaces.

Figure 3.1: The relationship between drivers, interfaces, and hardware

When booting, the kernel displays the devices it detects and the interfaces it installs. The following is an excerpt from typical boot messages:

.

. This processor honors the WP bit even when in supervisor mode./

  Good.

Swansea University Computer Society NET3.035 for Linux 2.0

NET3: Unix domain sockets 0.13 for Linux NET3.035.

Swansea University Computer Society TCP/IP for NET3.034

IP Protocols: IGMP,ICMP, UDP, TCP

Swansea University Computer Society IPX 0.34 for NET3.035

IPX Portions Copyright (c) 1995 Caldera, Inc.

Serial driver version 4.13 with no serial options enabled

tty00 at 0x03f8 (irq = 4) is a 16550A

tty01 at 0x02f8 (irq = 3) is a 16550A

CSLIP: code copyright 1989 Regents of the University of California

PPP: Version 2.2.0 (dynamic channel allocation)

PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.

PPP line discipline registered.

eth0: 3c509 at 0x300 tag 1, 10baseT port, address 00 a0 24 0e e4 e0,/

    IRQ 10.

3c509.c:1.12 6/4/97 [email protected]

Linux Version 2.0.32 (root@perf) (gcc Version 2.7.2.1)

#1 Tue Oct 21 15:30:44 EST 1997

.

.

This example shows that the kernel has been compiled with TCP/IP enabled, and it includes drivers for SLIP, CSLIP, and PPP. The third line from the bottom says that a 3C509 Ethernet card was detected and installed as interface eth0. If you have some other type of network card - perhaps a D-Link pocket adaptor, for example - the kernel will usually print a line starting with its device name - dl0 in the D-Link example - followed by the type of card detected. If you have a network card installed but don't see any similar message, the kernel is unable to detect your card properly. This situation will be discussed later in the section 'Ethernet Autoprobing.'

Kernel Configuration

Most Linux distributions are supplied with boot disks that work for all common types of PC hardware. Generally, the supplied kernel is highly modularized and includes nearly every possible driver. This is a great idea for boot disks, but is probably not what you'd want for long-term use. There isn't much point in having drivers cluttering up your disk that you will never use. Therefore, you will generally roll your own kernel and include only those drivers you actually need or want; that way you save a little disk space and reduce the time it takes to compile a new kernel.

In any case, when running a Linux system, you should be familiar with building a kernel. Think of it as a right of passage, an affirmation of the one thing that makes free software as powerful as it is - you have the source. It isn't a case of, 'I have to compile a kernel,' rather it's a case of, 'I can compile a kernel.' The basics of compiling a Linux kernel are explained in Matt Welsh's book, Running Linux (O'Reilly). Therefore, we will discuss only configuration options that affect networking in this section.

One important point that does bear repeating here is the way the kernel version numbering scheme works. Linux kernels are numbered in the following format: 2.2.14. The first digit indicates the major version number. This digit changes when there are large and significant changes to the kernel design. For example, the kernel changed from major 1 to 2 when the kernel obtained support for machines other than Intel machines. The second number is the minor version number. In many respects, this number is the most important number to look at. The Linux development community has adopted a standard at which even minor version numbers indicate production, or stable, kernels and odd minor version numbers indicate development, or unstable, kernels. The stable kernels are what you should use on a machine that is important to you, as they have been more thoroughly tested. The development kernels are what you should use if you are interested in experimenting with the newest features of Linux, but they may have problems that haven't yet been found and fixed. The third number is simply incremented for each release of a minor version.[18]

When running make menuconfig, you are presented with a text-based menu that offers lists of configuration questions, such as whether you want kernel math emulation. One of these queries asks you whether you want TCP/IP networking support. You must answer this with y to get a kernel capable of networking.

Kernel Options in Linux 2.0 and Higher

After the general option section is complete, the configuration will go on to ask whether you want to include support for various features, such as SCSI drivers or sound cards. The prompt will indicate what options are available. You can press? to obtain a description of what the option is actually offering. You'll always have the option of yes (y) to statically include the component in the kernel, or no (n) to exclude the component completely. You'll also see the module (m) option for those components that may be compiled as a run-time loadable module. Modules need to be loaded before they can be used, and are useful for drivers of components that you use infrequently.

The subsequent list of questions deal with networking support. The exact set of configuration options is in constant flux due to ongoing development. A typical list of options offered by most kernel versions around 2.0 and 2.1 looks like this:

*

* Network device support

*

Network device support (CONFIG_NETDEVICES) [Y/n/?]

You must answer this question with y if you want to use any type of networking devices, whether they are Ethernet, SLIP, PPP, or whatever. When you answer the question with y, support for Ethernet-type devices is enabled automatically. You must answer additional questions if you want to enable support for other types of network drivers:

PLIP (parallel port) support (CONFIG_PLIP) [N/y/m/?] y

PPP (point-to-point) support (CONFIG_PPP) [N/y/m/?] y

*

* CCP compressors for PPP are only built as modules.

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату