%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                               %
%                       Legal Notice                            %
%                                                               %
% This document is copyright (C) Olaf Kirch, okir@monad.swb.de  %
%                                                               %
% For copying conditions, please refer to the file COPYING.	%
%                                                               %
% The author is not liable for any damages, direct or indirect, %
% resulting from the use of information provided in this        %
% document.                                                     %
%                                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% When viewing this document with vi on an 80-columns screen,   %
% do a ':se nonumber' first.                                    %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\iffinal
\finalfalse

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                               %
%               S T A R T   O F   C H A P T E R                 %
%                                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\prechapter{Preface}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\vspace*{4cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{foreword.intro}
With the Internet much of a buzzword recently, and otherwise
serious people joyriding along the ``Informational Superhighway,''
computer networking seems to be moving toward the status of TV sets
and microwave ovens. The Internet is recently getting an unusually
high media coverage, and social science majors are descending on
Usenet newsgroups to conduct researches on the ``Internet Culture.''
Carrier companies are working to introduce new transmission techniques
like ATM that offer many times the bandwidth the average network link
of today has.


Of course, networking has been around for a long time.
Connecting computers to form local area networks has been common
practice even at small installations, and so have been long-haul links
using public telephone lines. A rapidly growing conglomerate of
world-wide networks has, however, made joining the global village a
viable option even for small non-profit organizations of private
computer users. Setting up an Internet host with mail and news
capabilities offering dial-up access has become affordable, and the
advent of ISDN will doubtlessly accelerate this trend.


Talking of computer networks quite frequently means talking about
UNIX. Of course, UNIX is neither the only operating system with
network capabilities, nor will it remain a front-runner forever,
but it has been in the networking business for a long time, and
will surely continue to do so for some time to come.


What makes it particularly interesting to private users is that there
has been much activity to bring free UNIXoid operating systems to the
PC, being 386BSD, FreeBSD~--- and \linux.  However, \linux{} is
\emph{not} UNIX. That is a registered trademark of whoever currently
holds the rights to it (Univel, while I'm typing this), while \linux{}
is an operating system that strives to offer all functionality the POSIX
standards require for UNIX-like operating systems, but is a complete
reimplementation.
%%
%% The ORA version will have \def\unix{UNIX}; the net version
%% probably will have  \def\unix{Un*x}
%%
% To avoid this legally shaky ground, we will only call it a \unix{}
% operating systems throughout the following. The asterisk tries to evade
% the trademark, indicating that it is related to UNIX\tm, but could also
% be called Unox or Unax.


The \linux{} kernel was written largely by Linus Torvalds, who started
it as a project to get to know the Intel~i386, and to ``make MINIX
better.'' MINIX was then another popular PC operating system offering
vital ingredients of \unix{} functionality, and was written by Prof.
Andrew S.~Tanenbaum.


\linux{} is covered by the GNU General Public License (GPL), which
allows free distribution of the code (please read the GPL in
appendix~\ref{appendix.gpl} for a definition of what ``free software''
means).  Outgrowing its child's diseases, and drawing from a large and
ever-growing base of free application programs, it is quickly becoming
the oprating system of choice for many PC owners.  The kernel and C
library have become that good that most standard software may be
compiled with no more effort than is required on any other mainstream
\unix{}ish system, and a broad assortment of packaged \linux{}
distributions allows you to almost drop it onto your hard disk and start
playing.



\presection{Documentation on \linux}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\index{Linux Documentation Project@\linux\ Documentation Project}
\index{LDP|see {\linux\ Documentation Project}}
\index{Wirzenius, Lars}
\index{Johnson, Michael K.}
\index{Welsh, Matt}
\index{Faith, Rik}

One of the complaints that are frequently levelled at \linux{} (and
free software in general) is the sorry state or complete lack of
documentation. In the early days it was not unusual for a package to
come with a handful of \file{README}s and installation notes. They gave
the moderately experienced \unix{} wizard enough information to
successfully install and run it, but left the average newbie
out in the cold.


Back in late 1992, Lars Wirzenius and Michael K.~Johnson suggested to
form the \linux{} Documentation Project, or LDP, which aims at providing
a coherent set of manuals.  Stopping short of answering questions like
``How?'', or ``Why?'', or ``What's the meaning of life, universe, and
all the rest?'', these manuals attempt to cover most aspects of running
and using a \linux{} system users without requiring a prior degree in
\unix.


Among the achievements of the LDP are the \emph{Installation and Getting
Started Guide}, written by Matt Welsh, the \emph{Kernel Hacker's Guide}
by Michael K.~Johnson, and the manpage project coordinated by Rik Faith,
which so far supplied a set of roughly 450 manual pages for most system
and C~library calls.  The \emph{System Administrators' Guide}, written
by Lars Wirzenius, is still at the Alpha stage.  A User's Guide is being
prepared.


This book, the \emph{\linux{} Network Administrators' Guide}, is part of
the LDP series, too. As such, it may be copied and distributed freely
under the LDP copying license which is reproduced on the second page.


\index{HOWTO}
However, the LDP books are not the only source of information on
\linux. At the moment, there are more than a dozen HOWTOs that are
posted to \ngrp{comp.os.linux.announce} regularly and archived at
various FTP sites. HOWTOs are short documents of a few pages that give
you a brief introduction into topics such as Ethernet support under
\linux, or the configuration of Usenet news software, and answer
frequently asked questions. They usually provide the most accurate and
up-to-date information avaliable on the topic. A list of available
HOWTOs is produced in the ``Annotated Bibliography'' toward the end of
this book.


\presection{About This Book}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
When I joined the \linux{} Documentation Project in 1992, I wrote two
small chapters on UUCP and \prog{smail}, which I meant to contribute to
the System Administrator's Guide. Development of TCP/IP networking was
just beginning, and when those ``small chapters'' started to grow, I
wondered aloud if it wouldn't be nice to have a Networking Guide.
``Great'', everyone said, ``I'd say, go for it!'' So I went for it,
and wrote a first version of the Networking Guide, which I released in
September 1993.


The new Networking Guide you are reading right now is a complete
rewrite that features several new applications that have become
available to \linux{} users since the first release.


The book is organized roughly in the sequence of steps you have to
take to configure your system for networking. It starts by discussing
basic concepts of networks, and TCP/IP-based networks in particular.
We then slowly work our way up from configuring TCP/IP at the device
level to the setup of common applications such as \prog{rlogin} and
friends, the Network File System, and the Network Information System.
This is followed by a chapter on how to set up your machine as a UUCP
node. The remainder of the book is dedicated to two major applications
that run on top of both TCP/IP and UUCP: electronic mail and news.


The email part features an introduction of the more intimate parts of
mail transport and routing, and the myriads of addressing schemes you
may be confronted with. It describes the configuration and management
of \prog{smail}, a mail transport agent commonly used on smaller mail
hubs, and \prog{sendmail}, which is for people who have to do more
complicated routing, or have to handle a large volume of mail. The
\prog{sendmail} chapter has been written and contributed by Vince
Skahan.


The news part attempts to give you an overview of how Usenet news
works, covers C~news, the most widely used news transport software at
the moment, and the use of NNTP to provide newsreading access to a
local network. The book closes with a short chapter on the care and
feeding of the most popular newsreaders on \linux.


\presection{The Official Printed Version}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
In autumn 1993, Andy Oram, who has been around the LDP mailing list
from almost the very beginning, asked me about publishing my
book at O'Reilly and Associates.  I was excited about this; I
had never imagined my book being that successful. We finally
agreed that O'Reilly would produce an enhanced Official Printed
Version of the Networking Guide with me, while I retained the
original copyright so that the source of the book could be freely
distributed.\footnote{
 The copyright notice is reproduced on the page immediately following
 the title page.
} This means that you can choose freely: you can get the
\LaTeX source distributed on the network (or the preformatted DVI or
PostScript versions, for that matter), and print it out. Or you can
purchase the official printed version from O'Reilly, which will be
available some time later this year.


Then, why would you want to pay money for something you can get for
free? Is Tim O'Reilly out of his mind for publishing something
everyone can print and even sell herself?\footnote{
  Note that while you are allowed to print out the online version, you
  may \emph{not} run the O'Reilly book through a photocopier, and much
  less sell any of those (hypothetical) copies.
} Or is there any difference between these versions?


The answers are ``it depends,'' ``no, definitely not,'' and ``yes and
no.'' O'Reilly and Associates do take a risk in publishing the
Networking Guide, but I hope it will finally pay off for them. If it
does, I believe this project can serve as an example how the free
software world and companies can cooperate to produce something both
benefit from. In my view, the great service O'Reilly is doing to the
Linux community (apart from the book being readily available in your
local bookstore) is that it may help Linux being recognized as
something to be taken seriously: a viable and useful alternative to
commercial PC UNIX operating systems.


\iffinal
Why are they publishing it? The reason is that they see it as their
kind of book.  It's what they'd hope to produce if they contracted
with an author to write about Linux.  The pace, the level of detail,
and the style fit in well with their other offerings.


The point of the LDP license is to make sure no one gets shut out.
Other people can print out copies of this book, and no one will blame
you if you get one of these copies.  But if you haven't gotten a
chance to see the O'Reilly version, try to get to a bookstore or look
at a friend's copy.  We think you'll like what you see, and will want
to buy it for your own.
\fi


So what about the differences between the printed version and the
online one?  Andy Oram has made great efforts at transforming my
early ramblings into something actually worth printing.  (He has
also been reviewing the other books put out by the Linux
Documentation Project, trying to contribute whatever professional
skills he can to the Linux community.)


Since Andy started reviewing the Networking Guide and editing the
copies I sent him, the book has improved vastly over what it was
half a year ago. It would be nowhere close to where it is now
without his contributions.
\iffinal
%
% This is the text for the final ORA version...
The same is true of Stephen Spainhour, who has been copy-editing the
book for almost a month to get it into the shape you can see now. All
these edits have been fed back into the online version, so there is no
difference in content.  Still, the O'Reilly version \emph{is}
different: On one hand, people at O'Reilly have put a lot of work into
the look and feel, producing a much more pleasant layout than you
could ever get out of standard \LaTeX.  Among other things, Chris
Reilley has nicely redone all the figures from the additional network
version, and added quite a couple of extra figures.  He has done a
great job at actually visualizing what I originally meant my
amateurish XFIG drawings to convey.

\else
%
% ... and this is for the 1.0 online release
All his edits have been fed back into online version, as will any
changes that will be made to the Networking Guide during the
copy-editing phase at O'Reilly.  So there will be no difference in
content.  Still, the O'Reilly version \emph{will} be different: On one
hand, people at O'Reilly are putting a lot of work into the look and
feel, producing a much more pleasant layout than you could ever get
out of standard \LaTeX. On the other hand, it will feature a couple of
enhancements like an improved index, and better and more figures.

\fi


\presection{More Information}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
If you follow the instructions in this book, and something does not
work nevertheless, please be patient. Some of your problems may be due
to stupid mistakes on my part, but may also be caused by changes in
the networking software.  Therefore, you should probably ask on
\ngrp{comp.os.linux.help} first. There's a good chance that you are
not alone with your problems, so that a fix or at least a proposed
workaround is likely to be known. If you have the opportunity, you
should also try to get the latest kernel and network release from one
of the \linux{} FTP sites, or a BBS near you.  Many problems are
caused by software from different stages of development, which fail to
work together properly. After all, \linux{} is ``work in progress''.


\index{HOWTO!Networking}
\index{Dawson, Terry}
Another good place to inform yourself about current development
is the Networking HOWTO. It is maintained by Terry Dawson\footnote{
  Terry Dawson can be reached at \email{terryd@extro.ucc.su.oz.au}.
}. It is posted to \ngrp{comp.os.linux.announce} once a month, and
contains the most up-to-date information.  The current version can
also be obtained (among others) from \host{tsx-11.mit.edu}, in
\file{/pub/linux/doc}. For problems you can't solve in any other way,
you may also contact the author of this book at the address given in
the preface. However, please, refrain from asking developers for help.
They are already devoting a major part of their spare time to \linux{}
anyway, and occasionally even have a life beyond the net\term{:-)}



\presubsection{On the Authors}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Olaf has been a UNIX user and part-time administrator for a couple of
years while he was studying mathematics.  At the moment, he's working as
a UNIX programmer and is writing a book.  One of his favorite sports is
doing things with \prog{sed} that other people would reach for their
\prog{perl} interpreter for.  He has about as much fun with this as with
mountain hiking with a backpack and a tent.


Vince Skahan has been administering large numbers of UNIX systems since
1987 and currently runs sendmail+IDA on approximately 300 UNIX
workstations for over 2000 users.  He admits to losing considerable
sleep from editing quite a few \file{sendmail.cf} files `the hard way'
before discovering sendmail+IDA in 1990.  He also admits to anxiously
awaiting the delivery of the first
perl-based version of sendmail for even more obscure fun\footnote{
  Don't you think we could do it with \prog{sed}, Vince?
}\ldots


Olaf can be reached at the following address:

\begin{quote}
  Olaf Kirch\\
  Kattreinstr. 38\\
  64295 Darmstadt\\
  Germany\\
  \\
  \email{okir@monad.swb.de}
\end{quote}

Vince can be reached at:

\begin{quote}
  Vince Skahan\\
  \email{vince@victrola.wa.com}
\end{quote}

We are open to your questions, comments, postcards, etc.  However, we
ask you \emph{not} to telephone us unless it's really important.



\presection{Thanks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\emph{Olaf says:}
This book owes very much to the numerous people who took the time to
proofread it and helped iron out many mistakes, both technical and
grammatical (never knew that there's such a thing as a dangling
participle).  The most vigorous among them was Andy Oram at O'Reilly
and Associates. 

\iffinal
I also owe many thanks to the people at O'Reilly I've had the pleasure
to work with: Stephen Spainhour, who has been copy-editing the book
for almost a month to get it into the shape you can see now; Chris
Reilley, who has done all the figures; Edie Freeman and Jennifer
Niederst, who designed the cover, the internal layout, and the use of
old woodcuts as a visual theme (an idea suggested by Lar Kaufman);
Barbara Yoder, (how would I describe her job?); and, finally, Tim
O'Reilly for the courage of taking up such a project.
\fi

I am greatly indebted to Andres Sep\'ulveda, Wolfgang Michaelis,
Michael K.~Johnson, and all developers who spared the time to check
the information provided in the Networking Guide. I also wish to thank
all those who read the first version of the Networking Guide and sent
me corrections and suggestions. You can find hopefully complete list
of contributors in the file \file{Thanks} in the online distribution.
Finally, this book would not have been possible without the support of
Holger Grothe, who provided me with the critical Internet
connectivity.


I would also like to thank the following groups and companies who
printed the first edition of the Networking Guide and have donated
money either to me, or to the \linux{} Documentation Project as a whole.


\begin{itemize}
 \item
	Linux Support Team, Erlangen, Germany
 \item
	S.u.S.E. GmbH, Fuerth, Germany
 \item
	Linux System Labs, Inc., United States
\end{itemize}


\emph{Vince says:}
Thanks go to Neil Rickert and Paul Pomes for lots of help over the years
regarding the care and feeding of sendmail+IDA and to Rich Braun for
doing the initial port of sendmail+IDA to \linux.  The biggest thanks by
far go to my wife Susan for all the support on this and other projects.



%%%%% Move this to the colophon
% Extra praise goes to the people who have contributed so much to the
% success of \linux{} through their work behind the scenes, especially the
% maintainers of the major \linux{} FTP sites and their mirrors.
% 
% 
% Although they are not directly involved in the writing of this guide, I
% would like to thank all those who started the whole \linux{} business,
% and have kept the ball rolling for so long: Linus Torvalds, Lars
% Wirzenius, Theodore T'so, H.J.~Lu, Ross Biro, Peter MacDonald, Fred van
% Kempen, Donald Becker,\ldots Of course, there are many more people
% involved in the shaping of \linux{} than this short list can name; you
% know who you are!


\pagebreak

%\iforeilly
%\else
\presection{Typographical Conventions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Different macros for O'Reilly.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
In writing this book, a number of typographical conventions were employed
to mark shell commands, variable arguments, etc. They are explained below.
\ifinfo
 When reading the texinfo version of this document, you will notice that,
 for example, there is no difference between {\tt Typewiter} and
 {\tt Typewriter Slanted}. This is due to deficiencies in the LaTeX to
 TeXinfo converter, as well as the limitations of an ASCII terminal.
 We are still working on this\ldots
\fi

\begin{dispitems}
\ditem [\textbf{Bold Font}]
	Used to mark hostnames and mail addresses, as well as new
	concepts and warnings.

\ditem [\textit{Italics Font}]
	Used to mark file names, UNIX commands, and keywords in
	configuration files. Also used for \emph{emphasis} in text.

\ditem [\texttt{Typewriter Font}]
	Used to represent screen interaction, such as user interaction
	when running a program.

	Also used for code examples, whether it is a configuration file,
	a shell script, or something else.

\ditem [\texttt{\textsl{Typewriter Slanted Font}}]
	Used to mark meta-variables in the text, especially in
	representations of the command line.  For example,

	\begin{quote}\tt
	 \$ ls -l \var{foo}
	\end{quote}

	where \var{foo} would ``stand for'' a filename, such as
	\file{/tmp}.

\ditem [\key{Key}]
	Represents a key to press.  You will often see it in this form:
	\begin{quote}
	 Press \ret\ to continue.
	\end{quote}

\ditem [\hfill$\Diamond$]
	A diamond in the margin, like a black diamond on a ski hill,
	marks ``danger'' or ``caution.''  Read paragraphs marked this
	way carefully.
	\ifinfo
	 This feature is absent in the TeXinfo and roff versions of
	 the book.
	\fi

\ditem [\texttt{\$} and \texttt{\#}]
	When preceding a shell command to be typed, these denote the
	shell prompt. The `\texttt{\$}' symbol is used when the command
	may be executed as a normal user; `\texttt{\#}' means that the
	command requires super user privilieges.

\end{dispitems}
%\fi

\pagebreak
\presection{The \linux{} Documentation Project}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% start blurb.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{foreword.blurb}
\index{Linux Documentation Project@\linux\ Documentation Project}
\index{Linux Activists@\linux\ Activists}

The \linux\ Documentation Project, or LDP, is a loose team of writers,
proofreaders, and editors who are working together to provide complete
documentation for the \linux\ operating system.  The overall coordinator
of the project is Matt Welsh, who is heavily aided by Lars Wirzenius and
Michael~K.\ Johnson.


This manual is one in a set of several being distributed by the LDP,
including a Linux Users' Guide, System Administrators' Guide, Network
Administrators' Guide, and Kernel Hackers' Guide. These manuals are
all available in \LaTeX\ source format, {\tt .dvi} format, and postscript
output by anonymous FTP from {\tt nic.funet.fi}, in the directory
{\tt /pub/OS/Linux/doc/doc-project}, and from {\tt tsx-11.mit.edu}, in the
directory {\tt /pub/linux/docs/guides}.


We encourage anyone with a penchant for writing or editing to join us in
improving Linux documentation. If you have Internet e-mail access, you can
join the {\tt DOC} channel of the {\tt Linux-Activists} mailing list by 
sending mail to 


\begin{tscreen}
linux-activists-request@niksula.hut.fi
\end{tscreen}


\noindent
with the line


\begin{tscreen}
X-Mn-Admin: join DOC
\end{tscreen} 


\noindent
in the header or as the first line of the message body. An empty mail
without the additional header line will make the mail-server return a
help message. To leave the channel, send a message to the same address,
including the line


\begin{tscreen}
X-Mn-Admin: leave DOC
\end{tscreen} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% end blurb.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\pagebreak
\presection{Filesystem Standards}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\index{File System Standard}
\index{Quinlan, Dan}

Throughout the past, one of the problems that afflicted \linux{}
distributions as well as separate packages was that there was no 
single accepted file system layout. This resulted in incompatibilities
between different packages, and confronted users and administrators
alike with the task to locate various files and programs.


To improve this situation, in August 1993, several people formed the
\linux\ File System Standard Group, or FSSTND Group for short,
coordinated by Daniel Quinlan. After six months of discussion, the group
presented a draft that presents a coherent file sytem structure and
defines the location of most essential programs and configuration files.


This standard is supposed to be implemented by most major \linux{}
distributions and packages. Throughout this book, we will therefore
assume that any files discussed reside in the location specified by
the standard; only where there is a long tradition that conflicts with
this specification will alternative locations be mentioned.


The \linux{} File System Standard can be obtained from all major \linux{}
FTP sites and their mirrors; for instance, you can find it on 
\host{sunsite.unc.edu} below \file{/pub/linux/docs}. Daniel Quinlan,
the coordinator of the FSSTND group can be reached at
\email{quinlan@bucknell.edu}.


