6/10 (1 vot)
Domeniu: Automatică
Conține 1 fișier: pdf
Pagini : 7 în total
Cuvinte : 2701
Mărime: 28.30KB (arhivat)
Cost: Gratis
using linux as a router

Extras din document

Our needs were extremely simple: a routing system that would connect one remote site to a shared

Internet router that spoke RIP on our end. The site had one LAN to start with, but would probably be

adding a few more.

We decided to use Linux because it was inexpensive enough for a pilot project: it would cost us two PCs

plus labor. Also, we would be able to have one machine handle routing services, mail services, limited

FTP services, and name services. This saved us the startup costs of a dedicated router plus a UNIX or

dedicated DOS box to manage DNS and POP. Our goal, and current implementation, is shown in Figure


We built the first machine out of a surplus (and highly generic) 80486 motherboard with 8Mb of RAM

and a 120Mb IDE hard drive. We purchased and installed the Slackware distribution of Linux off a

borrowed NEC CD-ROM, making sure to install kernel source code, the PPP daemon, and the various

user-level services we wanted to run.

The first thing to do was to modify the kernel to act as a packet forwarder. Slackware came with many

excellent precompiled kernels, but IP forwarding was not an option. Apparently, some random RFC

specifies that IP forwarding is not to be turned on by default. This actually makes sense: why spend the

processor cycles dealing with it if you don’t need to? So, compiling a kernel ourselves was our only

option. However, it’s not the only option you have: if you want a precompiled Linux 1.2.0 kernel with

IP forwarding, ethernet, and token-ring support, get it from

At first, the notion of compiling a kernel seemed daunting. Before this, we’d only re-linked OEM UNIX

kernels. It turned out to be much easier than expected; the processor and hard drive were the only things

that had to work hard.

The directory /usr/src/linux is, by convention, a symbolic link to the current production version of Linux

running on your machine. Finding it is easy: The README file contained therein is fairly short and to

the point, and describes how to configure the kernel and install it.

To make a kernel, we typed:

# cd /usr/src/linux

# make config



* Networking options


TCP/IP networking (CONFIG_INET) [y]

IP forwarding/gatewaying (CONFIG_IP_FORWARD) [n] y

# make dep ; make clean

# make zImage

Then, before installing the kernel, in addition to backing up the current kernel, we also made a boot disk,

just in case. After putting a floppy in the A: drive (for you DOS types), we typed:

# dd if=/vmlinuz of=/dev/fd0

# cp /vmlinuz /

# mv /usr/src/linux/arch/i386/boot/zImage /vmlinuz

# lilo

Added linux

# sync ; reboot

A Few Caveats

If you have played with LILO (the LInux LOader), /vmlinuz may very well not be your system kernel.

Check /etc/lilo.conf if you’re unsure.

Make sure you use networking tools that match your kernel version -- all sorts of strange things can

happen with a mismatch! Specifically, watch out for arp, route, ifconfig, and gated. A good rule of

thumb is to stick to the versions that come on the CD-ROM distribution. If you’re getting your files

from the Internet, pay close attention to READMEs.

Stick to the defaults when configuring by hitting ENTER at the prompts. Be sure you don’t configure a

device that you don’t have -- if you do, you risk lockups and erratic system behavior.

In our case, we also had to scour the earth for a Token Ring driver for Linux, and compile it into our

kernel, but that’s another long story. If you are looking for Token Ring support, and are willing to live

without busmastering and TI chipset support, check out Peter De Schrijver’s Wonderful Token Ring




See Terry Dawson’s comprehensive NET2-HOWTO for current information on available networking

technology support. Look in:




Token Ring may well be included in many distributions by the time you read this. I will mention,

however, that we had problems using kernels earlier than 1.2.

Once the kernel was recompiled and ready to forward packets according to its routing table, we needed

to give it routing "smarts," so we started up routed, the ancient routing daemon. This was a mistake;

routed is obsolete and flakey, and should not be used here. Instead, use gated. It will speak every routing

protocol you’re ever likely to need, and it is easy to configure for RIP (see Figure 2). If you need to use

something other than RIP, say, OSPF, you can rest easy knowing that the gated distribution has quite a

few sample configuration files for you to copy.

Any router needs more than one interface to be useful, and our Linux router was no exception. We chose

to use PPP (Point-to-Point Protocol) in conjunction with ISDN terminal adaptors, because ISDN service

is extremely inexpensive here. (ISDN was not supported with most Linux distributions at the time, but

Preview document

Linux - Pagina 1
Linux - Pagina 2
Linux - Pagina 3
Linux - Pagina 4
Linux - Pagina 5
Linux - Pagina 6
Linux - Pagina 7

Conținut arhivă zip

Alții au mai descărcat și


Java este o tehnologie inovatoare lansata de compania Sun Microsystems 1n 1995, care a avut un impact remarcabil asupra a1ntregii comunitatsi a...

Limbajul de Programare VHDL

VHDL ca un limbaj de programare VHDL seamana cu un limbaj de programare; cei care sint familiarizati cu limbajul de programare Ada vor observa...

Cursuri AC

caracterizarea noţiunii de informaţie, reprezentarea şi prelucrarea acesteia în sistemele tehnice; - obţinerea prin rafinări succesive a unui...


Procedura de desenare 1. Alegeti optiunea New... din meniul derulant File iar la aparitia ferestrei pentru numele desenului prototip...

C Standard

C-ul este un limbaj orientat pentru aplicatii de uz general . Datorita caracteristicilor sale este un limbaj foarte utilizat de toate categoriile...

Fundamentele Calculatoarelor

Prin proces industrial se întelege un ansamblu de transformari mecanice, electrice sau de alta natura care au loc în instalatii industriale....

Grafică computerizată

Interfete utilizator - Simulare - Animatie - Controlul proceselor - Proiectare asistata pe calculator - Producere reclame si filme...

Arhitectura calculatoarelor

I Introducere Arhitectura calculatoarelor trateaza comportarea functionala a unui calculator asa cum este vazut acesta de catre programator....

Te-ar putea interesa și

Fișiere de Configurare în Red Hat Linux

1. Introducere Orice program Linux este un fisier executabil care stocheaza lista cu coduri operationale pe care le executa unitatea centrala...

Gestionare de Fișiere și Ferestre în Linux

1. Aspecte generale despre managerele de fişiere 1.1. Consideraţii generale La sfarşitul secolului trecut s-au purtat multe discuţii (dintre care...


1 CAP I INTRODUCERE IN SISTEMUL DE OPERARE LINUX SI IN PROTOCOALELE DIN INTERNET 1.1 Ce este Linux ? Linux este un sistem de operare modern....

Instalarea și Configurarea unui Sistem Linux

I. Instalare LINUX Linux face parte din altă familie de sisteme de operare : familia UNIX. Deși deciziile de proiectare și de filozofie între...

Rețele Linux

- Conectarea unui LAN la Internet - Cazul clasic al conectarii la Internet Pentru ca un calculator sa fie conectat la Internet trebuie intai sa...

Comunicare între procese folosind semnale în Linux

1. Ce reprezintă semnalele? Semnalele- constituie sintetic o modalitate de exprimare a evenimentelor care apar asincron în sistem; - constituie o...

Arhitectura calculatoarelor - prezentare și istorie sisteme de operare - Linux, Haiku

Capitolul I: Sisteme de operare 1. Introducere Sistemul de operare reprezintă ansamblul de programe care asigură utilizarea optimă a resurselor...

Conectare unui LAN printr-un Router Linux

Introducere Aceasta lucrare îsi propune sa ofere o privire de ansamblu asupra problemelor pe care le ridica configurarea si administrarea unei...

Ai nevoie de altceva?