home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / DOC / HOWTO / NET_2_HO.GZ / NET_2_HO
Encoding:
Text File  |  1996-05-04  |  201.3 KB  |  4,959 lines

  1.   Linux NET-2/3-HOWTO
  2.   Terry Dawson, terry@perf.no.itg.telecom.com.au
  3.   v3.5, 16 January 1996
  4.  
  5.   This document aims to describe how to obtain, install and configure
  6.   the Linux NET-2 and NET-3 networking software. Some answers to some of
  7.   the more frequently asked questions are included in the appendix. This
  8.   document is not designed to teach you about tcp/ip networking, though
  9.   some information of this kind is included where possible. Pointers to
  10.   other documentation which does teach tcp/ip networking principles are
  11.   listed.
  12.  
  13.   1.  Introduction.
  14.  
  15.   This is the Linux NET-2/3-HOWTO. This document is a complete rewrite
  16.   of the earlier NET-FAQ and of the subsequent NET-2-HOWTO versions
  17.   1.0+. This document is for the new NET-2/NET-3 tcp/ip networking code
  18.   for Linux kernels 1.0 and above.
  19.  
  20.   1.1.  Changes from the previous release.
  21.  
  22.   Additions:
  23.  
  24.   Corrections/Updates:
  25.           updated ipalias to apply to new 1.3.* kernels
  26.           pointed IPX questions to IPX-HOWTO
  27.  
  28.   1.2.  A brief development history of Linux Networking.
  29.  
  30.   Ross Biro <biro@yggdrasil.com> wrote the original kernel based
  31.   networking code for Linux. He used ethernet drivers written by Donald
  32.   Becker <becker@cesdis1.gsfc.nasa.gov>, a SLIP driver written by
  33.   Laurence Culhane <loz@holmes.demon.co.uk> and a D-Link driver by Bj0rn
  34.   Ekwall <bj0rn@blox.se>.
  35.  
  36.   The further development of the Linux networking code was later taken
  37.   up by Fred van Kempen <waltje@hacktic.nl>, who took Ross's code and
  38.   produced the NET-2 release of network code. NET-2 went through a
  39.   number of revisions until release NET-2d, when Alan Cox
  40.   <iialan@iifeak.swan.ac.uk> set about debugging Fred's code with the
  41.   aim of producing a stable and working release of code for
  42.   incorporation into the standard kernel releases. This code was called
  43.   originally called NET-2D(ebugged) and was incorporated into the
  44.   standard kernel releases some time before Linux version 1.0 was
  45.   released.
  46.  
  47.   PPP support was added by Michael Callahan, <callahan@maths.ox.ac.uk>
  48.   and Al Longyear, <longyear@netcom.com>, originally as patches to the
  49.   kernel and in later releases as part of the standard kernel
  50.   distribution.
  51.  
  52.   The latest version of the code, NET-3, appears in kernel releases
  53.   1.1.5 and later and is essentially the same code, but with many fixes,
  54.   corrections and enhancements.
  55.  
  56.   Alan has added such features as IPX and AX.25 modules.  Florian La
  57.   Roche, <flla@stud.uni-sb.de> has produced an updated distribution of
  58.   network applications.
  59.  
  60.   NIIBE Yutaka has enhanced the PLIP driver.
  61.  
  62.   Jonathan Naylor has taken up development work on the AX.25 code and
  63.   has added many features including NetRom support.
  64.  
  65.   Many other people have made contributions by way of bug fixes, ports
  66.   of applications and by writing device drivers.
  67.  
  68.   2.  Disclaimer.
  69.  
  70.   The Linux networking code is a brand new implementation of kernel
  71.   based tcp/ip networking. It has been developed from scratch and is not
  72.   a port of any existing kernel networking code.
  73.  
  74.   The Linux networking is some of the newest and most innovative kernel
  75.   based networking code around. There are many developers working on
  76.   pressing it into service for many new applications and tasks and
  77.   because of this it is growing rapidly. It is in a constant state of
  78.   flux and it may still have a number of bugs or problems with it and
  79.   there may be a number of fixes and patches released.  If you are
  80.   worried about problems then just stick to the version of network code
  81.   released with the standard kernel releases and utility sets. These
  82.   standard kernel releases are denoted by an even number in the second
  83.   digit, 1.2.7 for example is a production release. The kernel versions
  84.   with an odd number as the second digit are alpha versions and you
  85.   should expect to find problems or bugs with these version as they are
  86.   test releases.  The networking code has a small team of dedicated
  87.   people working on it, with a cast of thousands testing the code,
  88.   collecting and reporting bugs and problems, providing fixes for
  89.   problems. Any problem you experience is likely to have already been
  90.   reported and be being worked on and will possibly be corrected soon,
  91.   so be patient, or if you can help, offer your assistance.
  92.  
  93.   We do not and cannot know everything there is to know about the Linux
  94.   network software. Please accept and be warned that this document
  95.   probably does contain errors. Please read any README files that are
  96.   included with any of the various pieces of software described in this
  97.   document for more detailed and accurate information. We will attempt
  98.   to keep this document as error-free and up-to-date as possible.
  99.   Versions of software are current as at time of writing.
  100.  
  101.   NOTE: While its name may appear similar to the Berkeley Software
  102.   Distribution NET-2 release, the Linux network code actually has
  103.   nothing at all to do with it. Please don't confuse them.
  104.  
  105.   3.  Questions already ?
  106.  
  107.   `The only stupid question is the unasked one.'
  108.  
  109.   If you have general configuration questions and you have been unable
  110.   to find the answers after reading the other various HOWTO and FAQ
  111.   files, then you would be best served to post them to
  112.   comp.os.linux.networking, or, if you believe your question to be
  113.   specifically related to the Linux Network code, then you could post it
  114.   to the NET mailing list. Please include as much relevant information
  115.   as possible, there is nothing more annoying than to have a bug or
  116.   problem reported without sufficient information to even begin
  117.   searching for it.
  118.  
  119.   Version numbers and revisions of code, a detailed account of the
  120.   problem, and the circumstances that caused it to occur, are essential.
  121.   Trace and debug messages where available should also be considered
  122.   mandatory.
  123.  
  124.   If you have a question relating to the configuration of, or problems
  125.   experienced with, any linux distribution, regardless of who has
  126.   provided it, please contact the people who created the distribution
  127.   first before attempting to report the problem to the network code
  128.   developers. The reason for this is that some of the distributions use
  129.   non-standard directory structures and supply test/non-standard
  130.   versions of code and utilities. The developers of the NET-2 code
  131.   cannot be expected to offer support for the network code as
  132.   distributed in any form, other than as described in this document, or
  133.   as per distributed Alpha test instructions.
  134.  
  135.   To join the Linux linux-net channel on the mail list server, send mail
  136.   to:
  137.  
  138.        Majordomo@vger.rutgers.edu
  139.  
  140.   with the line:
  141.  
  142.        subscribe linux-net
  143.  
  144.   as the message body and you will be subscribed. The subject line is
  145.   ignored.  Remember, keep in mind that the linux-net channel is for
  146.   development discussions only.
  147.  
  148.   A PPP list has been established. To join it, use the same procedure as
  149.   for joining the linux-net channel, except specify linux-ppp in place
  150.   of linux-net in the message body.
  151.  
  152.   Note also that a linux-hams list has been established. This list has
  153.   been established for the discussion of programs related to Amateur
  154.   Radio. To join it, follow the same procedure as for joining the linux-
  155.   net or linux-ppp channels, except specify linux-hams in place of
  156.   linux-net in the message body.
  157.  
  158.   4.  Related Documentation. (Where to learn about tcp/ip)
  159.  
  160.   If you are looking for information about tcp/ip networking that this
  161.   HOWTO does not cover, then you might try the following sources, as
  162.   they provide some very useful information.
  163.  
  164.   Olaf Kirch has written a substantial document as part of the Linux
  165.   Documentation Project entitled the Linux Network Administration Guide.
  166.   This is an excellent document. It covers all aspects of setting up and
  167.   using the tcp/ip networking under Linux, including NFS, UUCP, mail,
  168.   News, nameserver etc.
  169.  
  170.   Olaf's book supplements this HOWTO, taking up where this document
  171.   leaves off. This document covers the installation and configuration of
  172.   the NET code, i.e. `How to put your machine on the net'. If you are
  173.   new to unix networking, then I strongly urge you to obtain a copy and
  174.   read it first. It will answer a lot of questions for you that are not
  175.   within the scope of this document.
  176.  
  177.   The current release version is available in:
  178.  
  179.   sunsite.unc.edu
  180.  
  181.   /pub/Linux/docs/linux-doc-project/network-guide/*
  182.  
  183.   There are various versions of the document in this directory. The most
  184.   common formats are supported, being plain ascii, Postscript, DVI,
  185.   Latex and groff.
  186.  
  187.   The Linux Network Administrators Guide is Copyright (c) by Olaf Kirch.
  188.  
  189.   There are now quite a variety of companies publishing Linux
  190.   documentation so if you want to avoid having to retrieve and print the
  191.   document yourself you should have little trouble finding Olaf's book
  192.   in a bound form over the counter at any good bookshop.
  193.  
  194.   You should also read the other HOWTO documents relevant to networking
  195.   with Linux.
  196.  
  197.   They are:
  198.  
  199.   The Ethernet-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-
  200.   HOWTO.html>, which you should read if you intend using an ethernet
  201.   card with Linux. It includes a lot of detail on how to select, install
  202.   and configure an ethernet card for Linux and on how to diagnose
  203.   problems related to the ethernet driver.
  204.  
  205.   The PPP-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html> if you
  206.   intend using PPP.
  207.  
  208.   The IPX-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html> if you
  209.   would like information relating to IPX support for Linux.
  210.  
  211.   The Serial-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Serial-HOWTO.html>
  212.   if you intend using SLIP or PPP in server mode.
  213.  
  214.   The NIS-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/NIS-HOWTO.html> if you
  215.   are interested in running a version of Sun's Network Information
  216.   Service.
  217.  
  218.   The HAM-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html> if you
  219.   are interested in configuring and running amateur radio software.
  220.  
  221.   The Mail-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Mail-HOWTO.html> and
  222.   the News-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/News-HOWTO.html> for
  223.   some specific information on setting up Mail and News on your system.
  224.  
  225.   The UUCP-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/UUCP-HOWTO.html> if
  226.   you will be connecting to the net via UUCP.
  227.  
  228.   The Firewall-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Firewall-
  229.   HOWTO.html> if you want to build a Linux based Firewall gateway for
  230.   your network.
  231.  
  232.   If you are after some basic tutorial information on tcp/ip networking
  233.   generally, then I recommend you take a look at the following
  234.   documents:
  235.  
  236.      tcp/ip introduction
  237.         text version <ftp://athos.rutgers.edu/runet/tcp-ip-intro.doc>,
  238.         postscript version <ftp://athos.rutgers.edu/runet/tcp-ip-
  239.         intro.ps>.
  240.  
  241.      tcp/ip administration
  242.         text version <ftp://athos.rutgers.edu/runet/tcp-ip-admin.doc>,
  243.         postscript version <ftp://athos.rutgers.edu/runet/tcp-ip-
  244.         admin.ps>.
  245.  
  246.   If you are after some more detailed information on tcp/ip networking
  247.   then I highly recommend:
  248.  
  249.        "Internetworking with TCP/IP"
  250.        by Douglas E. Comer
  251.  
  252.        ISBN 0-13-474321-0
  253.        Prentice Hall publications.
  254.  
  255.   If you are wanting to learn about how to write network applications in
  256.   a Unix compatible environment then I also highly recommend:
  257.  
  258.        "Unix Network Programming"
  259.        by W. Richard Stevens
  260.  
  261.        ISBN 0-13-949876-1
  262.        Prentice Hall publications.
  263.  
  264.   4.1.  New versions of this document.
  265.  
  266.   If your copy of this document is more than two months old then I
  267.   strongly recommend you obtain a newer version. The networking support
  268.   for Linux is changing very rapidly with new enhancements and features,
  269.   so this document also changes fairly frequently. The latest released
  270.   version of this document can always be retrieved by anonymous ftp
  271.   from:
  272.  
  273.   sunsite.unc.edu
  274.  
  275.        /pub/Linux/docs/HOWTO/NET-2-HOWTO
  276.  
  277.   or:
  278.  
  279.        /pub/Linux/docs/HOWTO/other-formats/NET-2-HOWTO{-html.tar,ps,dvi}.gz
  280.  
  281.   or via the World Wide Web from the Linux Documentation Project Web
  282.   Server <http://sunsite.unc.edu/mdw/linux.html>, at page: NET-2-HOWTO
  283.   <http://sunsite.unc.edu/mdw/HOWTO/NET-2-HOWTO.html> or directly from
  284.   me, <94004531@postoffice.csu.edu.au>. It will also be posted to the
  285.   newsgroups: comp.os.linux.networking, comp.os.linux.answers and
  286.   news.answers from time to time.
  287.  
  288.   You can find news.answers FAQ postings, including this one, archived
  289.   on rtfm.mit.edu:/pub/usenet.
  290.   4.2.  Feedback.
  291.  
  292.   Please send any comments, updates, or suggestions to me,
  293.   <94004531@postoffice.csu.edu.au>. The sooner I get feedback, the
  294.   sooner I can update and correct this document. If you find any
  295.   problems with it, please mail me directly as I now very rarely read
  296.   the newsgroup.  You might also catch me as terryd on the #linpeople
  297.   IRC channel on the undernet IRC network.
  298.  
  299.   5.  Some of the terms used in this document.
  300.  
  301.   You will often see the terms client and server used in this document.
  302.   They are normally fairly specific terms but in this document I have
  303.   generalised their definitions a little so that they mean the
  304.   following:
  305.  
  306.      client
  307.         The machine or program that initiates an action or a connection
  308.         for the purpose of gaining use of some service or data.
  309.  
  310.      server
  311.         The machine or program that accepts incoming connections from
  312.         multiple remote machines and provides a service or data to
  313.         those.
  314.  
  315.   These definitions are not very reliable either, but they provide a
  316.   means of distinguishing the ends of peer to peer systems such as SLIP
  317.   or PPP which truly do not actually have clients and servers.
  318.  
  319.   Other terms you will see are:
  320.  
  321.      IP address
  322.         This is a number that uniquely identifies a TCP/IP host on the
  323.         network. The address is 4 bytes long and is usually represented
  324.         in what is called the "dotted decimal notation", where each byte
  325.         is represented in decimal from with dots `.' between them.
  326.  
  327.      Hardware address
  328.         This is a number that uniquely identifies a host in a physical
  329.         network at the media access layer. Examples of this are Ethernet
  330.         Addresses and AX.25 Addresses.
  331.  
  332.      datagram
  333.         A datagram is a discrete package of data and headers which
  334.         contain addresses, which is the basic unit of transmission
  335.         across an IP network. You might also hear this called a
  336.         `packet'.
  337.  
  338.      MTU
  339.         The Maximum Transmission Unit (MTU) is a parameter that
  340.         determines the largest datagram than can be transmitted by an IP
  341.         interface without it needing to be broken down into smaller
  342.         units. The MTU should be larger than the largest datagram you
  343.         wish to transmit unfragmented. Note, this only prevents
  344.         fragmentation locally, some other link in the path may have a
  345.         smaller MTU and the datagram will be fragmented there. Typical
  346.         values are 1500 bytes for an ethernet interface, or 576 bytes
  347.         for a SLIP interface.
  348.  
  349.      MSS
  350.         The Maximum Segment Size (MSS) is the largest quantity of data
  351.         that can be transmitted at one time. If you want to prevent
  352.         local fragmentation MSS would equal MTU-IP header.
  353.  
  354.      window
  355.         The window is the largest amount of data that the receiving end
  356.         can accept at a given point in time.
  357.  
  358.      route
  359.         The route is the path that your datagrams take through the
  360.         network to reach their destination.
  361.  
  362.      ARP
  363.         This is an acronym for the  Address Resolution Protocol and this
  364.         is how a network machine associates an IP Address with a
  365.         hardware address.
  366.  
  367.   6.  NET-3 Supported functionality.
  368.  
  369.   The NET code is a complete kernel based implementation of tcp/ip for
  370.   Linux.
  371.  
  372.   6.1.  General Support
  373.  
  374.   The recent NET-3 versions of code support:
  375.  
  376.      Ethernet Cards
  377.         most popular ethernet cards are supported. Including some
  378.         portable, pocket adaptors and PCI.
  379.  
  380.      SLIP (Serial Line IP) and PPP (Point to Point Protocol)
  381.         for tcp/ip networking over serial lines such as the telephone
  382.         via modem, or a local cable between two machines.
  383.  
  384.      Van Jacobsen Header Compression
  385.         for compressing the tcp/ip headers to improve SLIP/PPP
  386.         performance over low speed lines.
  387.  
  388.      PLIP (Parallel Lines IP)
  389.         to allow local connections between two machines using your
  390.         printer ports.
  391.  
  392.      EQL Load balancing
  393.         allows you to use two (or more) links to connect your machine to
  394.         another machine or the Internet (provided your ISP supports it)
  395.         to effectively double your bandwidth. New release kernels
  396.         support this.
  397.  
  398.      NFS (Networked File System)
  399.         to allow you to remotely mount another machines filesystems
  400.         across a network connection.
  401.  
  402.      IPX (Novell)
  403.         to allow you to write custom IPX applications, or to use Linux
  404.         as an IPX router.
  405.  
  406.      Sun's Network Information System - NIS
  407.         An NIS implementation has been ported to Linux should you wish
  408.         to use it.
  409.  
  410.      ARCNet
  411.         An ARCNet driver has been written and is included in recent
  412.         kernels. It might not be as fast as ethernet but the cards are
  413.         much cheaper.
  414.  
  415.      IBM's Token Ring
  416.         to allow linux to be installed on a Token Ring lan. An
  417.         experimental Token Ring driver has been written is included in
  418.         recent kernels.
  419.  
  420.      Appletalk
  421.         Or is this EtherTalk ? Either way, I think this will let you
  422.         shares files and printers with your Macintosh. See `Experimental
  423.         and Developmental modules.'  below.
  424.  
  425.      WaveLan Wireless Lan Card support
  426.         to allow you to operate your linux machine in a mobile fashion
  427.         or at some distance from your network. Support for the WaveLan
  428.         Wireless lan card is now included in recent kernels.
  429.  
  430.      ISDN
  431.         There is some experimental support for some proprietary ISDN
  432.         cards available. See `Experimental and Developmental modules.'
  433.         below.
  434.  
  435.      ATM
  436.         There is a team of programmers working to provide ATM support
  437.         for Linux.
  438.  
  439.      IP firewalling
  440.         to assist in configuring your Linux machine as a secure firewall
  441.         gateway.
  442.  
  443.      IP Accounting
  444.         to allow you to keep track of who is using how much of your
  445.         network.
  446.  
  447.      IP tunnelling
  448.         to allow mobile IP experimentation
  449.  
  450.   The NET-3 network code does not yet currently support:
  451.  
  452.      SPX/NCP (Novell Netware) support
  453.         to allow Linux to serve and mount Novell network filesystems or
  454.         use Novell printers. This is being worked on but due to the
  455.         proprietary nature of the product it may take some time to do.
  456.  
  457.      FDDI
  458.         There is currently no support that I know of for FDDI cards for
  459.         Linux.
  460.  
  461.      System-V streams
  462.         there is a team of people working on System-V streams for Linux,
  463.         details are presented later.
  464.  
  465.   6.2.  Supported Ethernet cards.
  466.  
  467.   The 1.2.0 linux kernel release supports the following types of
  468.   Ethernet cards:
  469.  
  470.   ╖  WD80*3 and close compatibles.
  471.  
  472.   ╖  SMC Ultra.
  473.  
  474.   ╖  AMD LANCE and PCnet (AT1500 and NE2100) and close compatibles.
  475.  
  476.   ╖  3Com 3c501 (obsolete and very slow).
  477.  
  478.   ╖  3Com 3c503.
  479.  
  480.   ╖  3Com 3c505.
  481.  
  482.   ╖  3Com 3c507.
  483.  
  484.   ╖  3Com 3c509/3c579.
  485.  
  486.   ╖  Cabletron E21xx.
  487.  
  488.   ╖  DEPCA and close compatibles.
  489.  
  490.   ╖  EtherWorks 3.
  491.  
  492.   ╖  ARCNet.
  493.  
  494.   ╖  AT1700 (not clones).
  495.  
  496.   ╖  EtherExpress.
  497.  
  498.   ╖  NI5210 and close compatibles.
  499.  
  500.   ╖  NI6510.
  501.  
  502.   ╖  WaveLAN.
  503.  
  504.   ╖  HP PCLAN+ (27247B and 27252A).
  505.  
  506.   ╖  HP PCLAN (27245 and other 27xxx series).
  507.  
  508.   ╖  NE2000/NE1000 and close compatibles.
  509.  
  510.   ╖  SK_G16.
  511.  
  512.   ╖  Ansel Communications EISA 3200.
  513.  
  514.   ╖  Apricot Xen-II on board ethernet.
  515.  
  516.   ╖  DE425, DE434, DE435.
  517.  
  518.   ╖  Zenith Z-Note.
  519.  
  520.   ╖  AT-LAN-TEC/RealTek pocket adaptor.
  521.  
  522.   ╖  D-Link DE600 pocket adaptor and close compatibles.
  523.  
  524.   ╖  D-Link DE620 pocket adaptor and close compatibles.
  525.  
  526.   Later versions of the Kernel software may support a wider variety of
  527.   cards.
  528.  
  529.   If you intend using an ethernet card with Linux you should read the
  530.   Ethernet-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>
  531.   as it contains a lot of very useful information on the supported
  532.   ethernet cards, including information on how to choose an ethernet
  533.   card if you are intending to purchase some specifically for Linux.
  534.  
  535.   As mentioned above, Linux supports other means of network connection
  536.   if you don't have access to an ethernet card or connection. Many
  537.   universities and businesses worldwide offer some form of dial-up
  538.   network access. Generally these forms of access will offer an option
  539.   of either SLIP or PPP access, so you will be well catered for. All you
  540.   will need is a telephone modem, the one you already have may well be
  541.   good enough and to configure your Linux system appropriately. There
  542.   are sections below that describe exactly what you need.
  543.  
  544.   6.3.  Support for Amateur Radio
  545.  
  546.   Linux now supports a number of features specifically for Amateur
  547.   Radio. The latest alpha kernels are now distributed with standard
  548.   support for:
  549.  
  550.      AX.25 Support
  551.         Alan Cox and Jonathan Naylor have kernel based AX.25 socket
  552.         support working.
  553.  
  554.      NetRom Support
  555.         Jonathan Naylor has developed kernel based NetRom support. It is
  556.         still experimental but is progressing well.
  557.  
  558.      Ottawa PI Card
  559.         A mature driver for the Ottawa PI card has been developed by
  560.         Dave Perry of the Ottawa Packet Radio Group.
  561.  
  562.      Generic SCC card driver
  563.         A generic driver for SCC cards is now included in alpha kernels
  564.         developed by Joerg Reuter.
  565.  
  566.      A kernel user network link driver
  567.         for linking user programs to the kernel without messy pty's.
  568.  
  569.   Further detail on the Amateur Radio support can be found in the HAM-
  570.   HOWTO <http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html>.
  571.  
  572.   7.  Getting the NET-2/NET-3 software.
  573.  
  574.   Before you can configure the networking software you must obtain all
  575.   of the bits and pieces that make it up. These include the current
  576.   version of the kernel code (version 1.0 or later), the correct system
  577.   libraries, the tcp/ip configuration programs and files (e.g.
  578.   /sbin/ifconfig, /etc/hosts etc.) and finally a set of network
  579.   application programs (such as telnet, ftp, rlogin etc.).
  580.  
  581.   If you obtained Linux from a distribution you may already have all
  582.   that you need. Check and make sure that you do. For example, some
  583.   Linux distributions come with all of the network configuration files,
  584.   binaries, libraries and kernel installed, so there's no reason to get
  585.   the following files.
  586.  
  587.   NOTE: they may be in directories and files different to those
  588.   specified in this HOWTO document
  589.  
  590.   If you DO have the network software, skip to the `Configuring the
  591.   kernel' section. If you DO NOT have the network software follow the
  592.   following directions.
  593.  
  594.   7.1.  The kernel source.
  595.  
  596.   Version 1.2.* of the Linux kernel is the production version. Any of
  597.   the Linux kernels 1.3.* are development kernels. If you feel at all
  598.   concerned about the possibility of having to patch and modify the
  599.   kernel source, then you should stick to this release, as it will do
  600.   most of what you want it to.  In the case of the networking code
  601.   though, I strongly suggest you just take a deep breath and follow the
  602.   newer releases of code, as there have been many changes in the newer
  603.   version kernels that affect networking. I know you hear it from
  604.   everyone and everywhere, but when trying out any new version of kernel
  605.   software you should always ensure that you have sufficient backups of
  606.   your system just in case something goes seriously wrong while you are
  607.   testing.
  608.  
  609.   The current kernel version is found in:
  610.  
  611.   ftp.funet.fi
  612.  
  613.        /pub/OS/Linux/PEOPLE/Linus/v1.2/linux-1.2.13.tar.gz
  614.  
  615.   This is a gzipped file, so you will need gzip to uncompress it.
  616.  
  617.   To install it, try:
  618.  
  619.        # cd /usr/src
  620.        # mv linux linux.old
  621.        # gzip -dc linux-1.2.13.tar.gz | tar xvf -
  622.  
  623.   You may also find some files called  patch-1.2.1.gz ... in the same
  624.   directory. These are patch files. If you have a linux kernel that is
  625.   version 1.2.1 then what this means is that you have linux kernel
  626.   version 1.2.0 with patch 1 applied. So you don't need to patch 1. If
  627.   there are any patch files that are greater than the version of kernel
  628.   you have, you should obtain all of those above and apply them in
  629.   sequence with something like the following commands:
  630.  
  631.        # cd /usr/src
  632.        # for patchfile in .../patch*
  633.        > do
  634.        > gzip -dc $patchfile | patch -p0 2>>patch.errs
  635.        > done
  636.  
  637.         ...
  638.  
  639.   Check the output file (patch.errs) and search for the string fail.  If
  640.   you can't find it then all of the patch files were applied ok. If it
  641.   is there, then at least one of the patch files didn't apply correctly.
  642.   If this happens what you should do is start again from a clean kernel
  643.   archive and apply the patches one by one until you find the patch file
  644.   that failed. If you can't work out why it didn't work then report it
  645.   as a problem.
  646.  
  647.   7.2.  The libraries.
  648.  
  649.   You'll want at least version 4.4.2 of libc, as there were problems
  650.   with earlier version that affected subnet masks.
  651.  
  652.   The current a.out libraries (libc-4.6.27) can be found in:
  653.  
  654.   sunsite.unc.edu
  655.  
  656.   /pub/Linux/GCC/
  657.  
  658.   You will need at least the following files:
  659.  
  660.   ╖  image-4.6.27.tar.gz
  661.  
  662.   ╖  inc-4.6.27.tar.gz
  663.  
  664.   ╖  extra-4.6.27.tar.gz
  665.  
  666.   ╖  release.libc-4.6.27
  667.  
  668.   When installing libc.4.6.27 you MUST read release.libc-4.6.27 before
  669.   you install the libraries. Please note that to use release 4.5.26 or
  670.   later you will also need at least GCC version 2.6.2 and Linux kernel
  671.   1.1.52 or later.
  672.  
  673.   7.3.  The network configuration tool suite.
  674.  
  675.   You will need the utility suite that provides tools to configure your
  676.   network support.
  677.  
  678.   The current NET-2 utility suite is available from:
  679.  
  680.   ftp.linux.org.uk
  681.  
  682.        /pub/linux/Networking/PROGRAMS/NetTools/net-tools-1.2.0.tar.gz
  683.  
  684.   Because the kernel networking code is still changing some changes to
  685.   the network tools have been necessary as new kernels are released, so
  686.   you will need to choose the version that is appropriate for the kernel
  687.   version you intend to use.
  688.  
  689.   The filenames reflect the earliest version of kernel that the tools
  690.   will work with. Please choose the filename whose version equals, or is
  691.   less than the version of kernel source you intend to use.
  692.  
  693.   To build and install the tools, you should try:
  694.  
  695.        # cd /usr/src
  696.        # mkdir net-tools
  697.        # cd net-tools
  698.        # gzip -dc net-tools-1.2.0.tar.gz | tar xvf -
  699.        # make
  700.  
  701.   This will automatically run the Configure.sh script. If everything
  702.   makes ok, then:
  703.  
  704.        # make install
  705.  
  706.   If you use a kernel version 1.1.26 or earlier you should look in:
  707.  
  708.   ftp.linux.org.uk
  709.  
  710.        /pub/linux/Networking/PROGRAMS/Other/net032
  711.  
  712.   In this directory you will find three versions of the network tools.
  713.   The following table lists net-032 package name with the relevant
  714.   kernel versions:
  715.  
  716.        net-0.32d-net3.tar.gz     1.1.12+
  717.        net-0.32b.tar.gz          1.1.4+
  718.        net-0.32.old.tar.gz       pre 1.1.4 kernels
  719.  
  720.   These packages include the essential network configuration programs
  721.   such as ifconfig, route, netstat etc. These will be discussed later.
  722.  
  723.   7.4.  The network applications.
  724.  
  725.   You will want a number of network application programs. These are
  726.   programs like telnet, ftp, finger and their daemons at least. Florian
  727.   La Roche, <flla@stud.uni-sb.de> has put together a fairly complete
  728.   distribution of network applications in both binary and source form.
  729.   The tcp/ip application binaries and some sample config files are found
  730.   in:
  731.  
  732.   ftp.funet.fi
  733.  
  734.        /pub/OS/Linux/PEOPLE/Linus/net-source/base/NetKit-A-0.08.bin.tar.gz
  735.        /pub/OS/Linux/PEOPLE/Linus/net-source/base/NetKit-B-0.06.tar.gz
  736.  
  737.   If there are newer versions then use the newer versions. Please read
  738.   the README file first just to make sure that you have the necessary
  739.   prerequisites.
  740.  
  741.   Florian used to have a binary distribution of the networking
  742.   applications (the B file) available but it is no longer there, so you
  743.   will have to build the files yourself. You can use the following
  744.   procedure:
  745.  
  746.        # cd /usr/src
  747.        # gzip -dc NetKit-B-0.06.tar.gz | tar xpvlf -
  748.        # cd NetKit-B-0.06
  749.  
  750.   Then, read the README file. You will need to edit the Makefile and set
  751.   the HAVE_SHADOW_PASSWORDS define appropriately. I don't use shadow
  752.   passwords, so I commented it out by placing a # at the start of the
  753.   line. The rest should not need modifying, so then all you should have
  754.   to do is:
  755.  
  756.        # make
  757.        # make install
  758.  
  759.   IMPORTANT NOTE: Florian has built and prepackaged these tar files for
  760.   your convenience. Florian has attempted to make them as complete as
  761.   possible and has included a distribution of the binaries found in the
  762.   net-tools-n.n.nn releases. Unfortunately Florian has chosen not to use
  763.   the same directory structure as Alan did when he prepared the
  764.   installation script for the net-tools. This will mean that you should
  765.   be very careful when installing them. Florian will change this later
  766.   so that this difference is not a problem, but until then, I suggest
  767.   you do the following instead of the above:
  768.  
  769.        -  Unpack the binaries somewhere safe:
  770.        # cd /usr/src
  771.        # mkdir NetKit
  772.        # cd NetKit
  773.        # gzip -dc NetKit-A-0.07.bin.tar.gz | tar xpvlf -
  774.        # gzip -dc NetKit-B-0.06.bin.tar.gz | tar xpvlf -
  775.  
  776.        -  Remove Florians copies of the network tools previously described:
  777.        # rm ./bin/hostname ./sbin/route ./sbin/ifconfig ./sbin/netstat
  778.        # rm ./usr/sbin/arp ./usr/sbin/rarp ./usr/sbin/slattach
  779.  
  780.        -  Copy Florian's files into their new home:
  781.        # cp -vrpd . /
  782.  
  783.   7.5.  Additional drivers or packages.
  784.  
  785.   If you want to add some developmental, or Alpha/Beta test code, such
  786.   as AX.25 support, you will need to obtain the appropriate support
  787.   software for those packages. Please check the relevant sections for
  788.   those packages in this document for more detail.
  789.  
  790.   8.  Configuring the kernel.
  791.  
  792.   Before you can use any of the network tools, or configure any network
  793.   devices, you must ensure that your kernel has the necessary network
  794.   support built into it. The best way of doing this is to compile your
  795.   own, selecting which options you want and which you don't.
  796.  
  797.   Assuming you have obtained and untarred the kernel source already and
  798.   applied any patches that you might need to have applied to get any
  799.   nonstandard or developmental software installed, all you have to do is
  800.   edit /usr/src/linux/drivers/net/CONFIG. This file has many comments to
  801.   guide you in editing it and in general you will need to edit very
  802.   little, as it has sensible defaults. In my case I don't need to edit
  803.   it at all.  This file is really necessary if your ethernet card is an
  804.   unusual one, or is one that isn't automatically detected by the
  805.   ethernet driver. It allows you to hard code some of the elements of
  806.   your ethernet hardware. For example, if your ethernet card is a close,
  807.   but not exact clone of a WD-8013, then you might have to configure the
  808.   shared memory address to ensure the driver detects and drives the card
  809.   properly. Please check the The Ethernet-HOWTO
  810.   <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO> for more definitive
  811.   information on this file and its effect on ethernet cards. This file
  812.   also contains configurable parameters for PLIP, though the defaults
  813.   should again be ok unless you have a particularly slow machine.
  814.  
  815.   When you are happy that the CONFIG file is suitable for your purposes,
  816.   then you can proceed to build the kernel. Your first step will be to
  817.   edit the top level Makefile to ensure the kernel will be built with
  818.   the appropriate VGA settings and then you must run the kernel
  819.   configuration program:
  820.  
  821.        # cd /usr/src/linux
  822.        # make config
  823.  
  824.   You will be asked a series of questions. There are four sections
  825.   relevant to the networking code. They are the General setup,
  826.   Networking options, Network device support and the Filesystems
  827.   sections. The most difficult to configure is the Network device
  828.   support section, as it is where you select what types of physical
  829.   devices you want configured. On the whole you can just use the default
  830.   values for the other sections fairly safely. The following will give
  831.   you an idea of how to proceed:
  832.  
  833.        *
  834.        * General setup
  835.        *
  836.         ...
  837.         ...
  838.        Networking support (CONFIG_NET) [y] y
  839.         ...
  840.         ...
  841.  
  842.   In the General setup section you simply select whether you want
  843.   network support or not. Naturally you must answer yes.
  844.  
  845.   *
  846.   * Networking options
  847.   *
  848.   TCP/IP networking (CONFIG_INET) [y]
  849.   IP forwarding/gatewaying (CONFIG_IP_FORWARD) [n]
  850.   IP multicasting (CONFIG_IP_MULTICAST) [n]
  851.   IP firewalling (CONFIG_IP_FIREWALL) [n]
  852.   IP accounting (CONFIG_IP_ACCT) [n]
  853.   *
  854.   * (it is safe to leave these untouched)
  855.   *
  856.   PC/TCP compatibility mode (CONFIG_INET_PCTCP) [n]
  857.   Reverse ARP (CONFIG_INET_RARP) [n]
  858.   Assume subnets are local (CONFIG_INET_SNARL) [y]
  859.   Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
  860.   The IPX protocol (CONFIG_IPX) [n]
  861.   *
  862.  
  863.   The second half of the Networking options section allows you to enable
  864.   or disable some funky features that you can safely accept the defaults
  865.   on until you have some idea why you want to change them. They are
  866.   described briefly later if you are interested.
  867.  
  868.        *
  869.        *
  870.        * Network device support
  871.        *
  872.        Network device support? (CONFIG_NETDEVICES) [y]
  873.        Dummy net driver support (CONFIG_DUMMY) [n]
  874.        SLIP (serial line) support (CONFIG_SLIP) [y]
  875.         CSLIP compressed headers (CONFIG_SLIP_COMPRESSED) [y]
  876.         16 channels instead of 4 (SL_SLIP_LOTS) [n]
  877.        PPP (point-to-point) support (CONFIG_PPP) [y]
  878.        PLIP (parallel port) support (CONFIG_PLIP) [n]
  879.        Do you want to be offered ALPHA test drivers (CONFIG_NET_ALPHA) [n]
  880.        Western Digital/SMC cards (CONFIG_NET_VENDOR_SMC) [y]
  881.        WD80*3 support (CONFIG_WD80x3) [y]
  882.        SMC Ultra support (CONFIG_ULTRA) [n]
  883.        AMD LANCE and PCnet (AT1500 and NE2100) support (CONFIG_LANCE) [n]
  884.        3COM cards (CONFIG_NET_VENDOR_3COM) [n]
  885.        Other ISA cards (CONFIG_NET_ISA) [n]
  886.        EISA, VLB, PCI and on board controllers (CONFIG_NET_EISA) [n]
  887.        Pocket and portable adaptors (CONFIG_NET_POCKET) [n]
  888.        *
  889.  
  890.   This section is the most important and the most involved. It is where
  891.   you select what hardware devices you want to support. You can see that
  892.   I have selected SLIP support with header compression, PPP, the WD80*3
  893.   driver and nothing else. Other options will appear depending on what
  894.   you select. If you answered `n' to the `SLIP..' option you will not be
  895.   presented with the compressed SLIP or 16 channel options. Simply
  896.   answer `y' to whatever you want to play with and `n' to those that you
  897.   don't.
  898.  
  899.   *
  900.   * Filesystems
  901.   *
  902.    ...
  903.    ...
  904.   /proc filesystem support (CONFIG_PROC_FS) [y]
  905.   NFS filesystem support (CONFIG_NFS_FS) [y]
  906.    ...
  907.    ...
  908.  
  909.   If you wish to run an NFS client then you will want to include the NFS
  910.   filesystem type. You will need to include the /proc filesystem because
  911.   a number of the network utilities use it.
  912.  
  913.   After you have completed the configuration, all that remains is to
  914.   actually compile the kernel:
  915.  
  916.        # make dep
  917.        # make
  918.  
  919.   Don't forget to make zlilo if the new kernel compiles and tests ok.
  920.  
  921.   8.1.  What do all those funky Networking options actually do?
  922.  
  923.   Newer kernels have a number of options that you are asked about when
  924.   you do a make config. Generally you will not need to change these, but
  925.   some of the options might be useful to you in certain circumstances.
  926.  
  927.      TCP/IP networking
  928.         This one is obvious, it selects whether you configure the tcp/ip
  929.         suite of protocols into your kernel. Chances are if you are
  930.         reading this then you will want to answer `y' to this one.
  931.  
  932.      Dummy networking device
  933.         This was added to allow SLIP and PPP users to configure an
  934.         address on their linux machine that would not be dependent on
  935.         their serial link being established. It is an easy way to give
  936.         your linux machine two addresses.
  937.  
  938.      IP forwarding/gatewaying
  939.         This determines what your kernel will do when it receives a
  940.         datagram that has a destination address that is not one of its
  941.         own devices. You must have this option selected if you want your
  942.         kernel to act as an IP router. Most SLIP and PPP servers will
  943.         want this option selected.
  944.  
  945.      IP multicasting
  946.         This is alpha test code support for IP multicasting, examples of
  947.         which include services such as `Internet Talk Radio' and live
  948.         video. You will need additional programs to make use of this
  949.         facility, this is just the kernel support.
  950.  
  951.      IP firewalling
  952.         This option allows you to provide flexible security options for
  953.         your linux machine. You can selectively enable/disable access to
  954.         tcp/ip ports from any address ranges you choose. This also needs
  955.         additional programs to support it.
  956.  
  957.      IP accounting
  958.         This option is for those people that want to use their Linux
  959.         machine to provide internet connectivity to others on a
  960.         commercial basis. It allows you to count and record incoming and
  961.         outgoing bytes on a per port and address basis. With the
  962.         addition of suitable software this would allow you to produce
  963.         seperate usage charges for each person using your systems
  964.         networking capabilities.
  965.  
  966.      PC/TCP compatibility mode
  967.         This option provides a work-around for a bug that causes
  968.         problems when using the PC/TCP networking programs to talk to
  969.         your linux machine. There is a PC/TCP bug which provokes a
  970.         difficult to remedy Linux bug and this option prevents the two
  971.         clashing. Normally you would leave this disabled, but if you
  972.         have users on your network who use PC/TCP then you may have to
  973.         enable this option to prevent problems.
  974.  
  975.      Reverse ARP
  976.         This option allows you to configure the RARP protocol into your
  977.         kernel. This option was added to allow the booting of Sun 3
  978.         systems. This is not generally very useful otherwise.
  979.  
  980.      Assume subnets are local
  981.         This option selects whether you assume that your whole subnet is
  982.         directly connected to your linux machine, or whether it might be
  983.         bridged or otherwise subdivided at a lower layer. In practice it
  984.         will make little difference if you leave it set at the default.
  985.  
  986.      Disable NAGLE algorithm
  987.         This is a timing option that determines when a datagram should
  988.         be transmitted. The default setting provides for the best
  989.         throughput in most situations and you should leave this set as
  990.         it is, as disabling it will degrade your throughput. This option
  991.         can be selectively changed from within a program with a socket
  992.         option and you would normally be much better off leaving it set
  993.         at the default and specifically writing your programs to disable
  994.         the NAGLE algorithm if they require extremely fast
  995.         interactivity.
  996.  
  997.      The IPX protocol
  998.         This option selects whether you compile the IPX protocol support
  999.         into your kernel. The IPX protocol is an inter-networking
  1000.         protocol similar in function to the IP protocol. This protocol
  1001.         is one of those used by the Novell suite.
  1002.  
  1003.      Amateur Radio AX.25 Level 2
  1004.         This option selects whether you compile in the Amateur Radio
  1005.         AX.25 protocol suite. If you select this option then a new class
  1006.         of network sockets are available for programming. The AX.25
  1007.         protocol is used primarily by Amateur Radio Operators for packet
  1008.         radio use.
  1009.  
  1010.   9.  Configuring the Network Devices.
  1011.  
  1012.   If everything has gone ok so far, then you will have a Linux kernel
  1013.   which supports the network devices you intend to use and you also have
  1014.   the network tools with which to configure them. Now comes the fun
  1015.   part! You'll need to configure each of the devices you intend to use.
  1016.   This configuration generally amounts to telling each device things
  1017.   like what its IP address will be and what network it is connected to.
  1018.  
  1019.   In past versions of this document I have presented near complete
  1020.   versions of the various configuration files and included comments to
  1021.   modify or delete lines from them as appropriate. From this version
  1022.   onwards I will take a slightly different approach which I hope will
  1023.   result in you having a complete set of uncluttered configuration files
  1024.   that you have built from scratch so you know exactly what is in them
  1025.   and why. I'll describe each of these files, and their function, as we
  1026.   come to them.
  1027.  
  1028.   9.1.  Configuring the special device files in /dev
  1029.  
  1030.   You do not need to configure any special device files in the /dev
  1031.   directory for Linux Networking. Linux does not need or use them as
  1032.   other operating systems might. The devices are built dynamically in
  1033.   memory by the kernel and since they are only names there is no need
  1034.   for them to have an appearance directly to you. The kernel provides
  1035.   all of the programming hooks and interfaces that you need to utilize
  1036.   them effectively.
  1037.  
  1038.   9.2.  What information do I need before I begin ?
  1039.  
  1040.   Before you can configure the networking software, you will need to
  1041.   know a number of pieces of information about your network connection.
  1042.   Your network provider or administrator will be able to provide you
  1043.   with most of them.
  1044.  
  1045.   9.2.1.  IP Address.
  1046.  
  1047.   This is the unique machine address, in dotted decimal notation, that
  1048.   your machine will use. An example is 128.253.153.54. Your network
  1049.   administrator will provide you with this information.
  1050.  
  1051.   If you will be using a SLIP or plip connection you may not need this
  1052.   information, so skip it until we get to the SLIP device.
  1053.  
  1054.   If you're using the loopback device only, ie no ethernet, SLIP or plip
  1055.   support, then you won't need an ip address as the loopback port always
  1056.   uses the address 127.0.0.1.
  1057.  
  1058.   9.2.2.  Network Mask (`netmask').
  1059.  
  1060.   For performance reasons it is desirable to limit the number of hosts
  1061.   on any particular segment of a network. For this reason it is common
  1062.   for network administrators to divide their network into a number of
  1063.   smaller networks, known as subnets, which each have a portion of the
  1064.   network addresses assigned to them. The network mask is a pattern of
  1065.   bits, which when overlayed onto an address on your network, will tell
  1066.   you which subnetwork it belongs to. This is very important for routing
  1067.   and if you find for example, that you can happily talk to people
  1068.   outside your network, but not to some people on your own network, then
  1069.   it is quite likely that you have specified an incorrect subnet mask.
  1070.  
  1071.   Your network administrators will have chosen the netmask when the
  1072.   network was designed and therefore they should be able to supply you
  1073.   with the correct mask to use. Most networks are class-C subnetworks
  1074.   which use 255.255.255.0 as their netmask. Other larger networks use
  1075.   class-B netmasks (255.255.0.0). The NET-2/NET-3 code will
  1076.   automatically select a default mask when you assign an address to a
  1077.   device. The default assumes that your network has not been subnetted.
  1078.  
  1079.   The NET-2/NET-3 code will choose the following masks by default:
  1080.  
  1081.        For addresses with the first byte:
  1082.        1-127         255.0.0.0         (Class A)
  1083.        128-191       255.255.0.0       (Class B)
  1084.        192+          255.255.255.0     (Class C)
  1085.  
  1086.   if one of these doesn't work for you, try another. If this doesn't
  1087.   work ask your network administrator or local network guru (dime a
  1088.   dozen) for help.
  1089.  
  1090.   You don't need to worry about a netmask for the loopback port, or if
  1091.   you are running SLIP/plip.
  1092.  
  1093.   9.2.3.  Network Address.
  1094.  
  1095.   This is your IP address masked (bitwise AND) with your netmask.  For
  1096.   example:
  1097.  
  1098.        If your netmask is:           255.255.255.0
  1099.        and your IP address is:       128.253.154.32    &&
  1100.                                                  ---------------
  1101.        your Network address is:      128.253.154.0     =
  1102.  
  1103.   9.2.4.  Broadcast Address.
  1104.  
  1105.   `A shout is a whisper that everyone hears whether they need to or not'
  1106.  
  1107.   This is normally your network address logically ORed with your netmask
  1108.   inverted. This is simpler than it sounds. For a Class-C network, with
  1109.   network mask 255.255.255.0, your Broadcast Address will be your
  1110.   network address (calculated above), logically ORed with 0.0.0.255, the
  1111.   network mask inverted.
  1112.  
  1113.   A worked example might look like:
  1114.  
  1115.        If your netmask is:          255.255.255.0      !
  1116.        the netmask inverted is:       0.  0.  0.255    =
  1117.        If your Network address is:  128.253.154.0      ||
  1118.                                      ----------------
  1119.        Your broadcast address is:   128.253.154.255    =
  1120.  
  1121.   Note that for historical reasons some networks use the network address
  1122.   as the broadcast address. If you have any doubts contact your network
  1123.   administrator.
  1124.  
  1125.   If you have access to a sniffer, or some other device capable of
  1126.   providing you with a trace of your network traffic, then you might be
  1127.   able to determine both the network and broadcast addresses by watching
  1128.   other traffic on the lan. Keep an eye open for, (or filter everything
  1129.   except), ethernet frames destined for the ethernet broadcast address:
  1130.   ff:ff:ff:ff:ff:ff.  If any of them has an IP source address of your
  1131.   local router and the protocol ID is not ARP, then check the
  1132.   destination IP address, because this datagram may well be a RIP
  1133.   routing broadcast from your router, in which case the destination IP
  1134.   address will be your broadcast address.
  1135.  
  1136.   Once again, if you're not sure, check with your network administrator,
  1137.   they'd rather help you, than have you connect your machine in a
  1138.   misconfigured way.
  1139.  
  1140.   9.2.5.  Router (`Gateway') Address.
  1141.  
  1142.   `There must be some way out of here.'
  1143.  
  1144.   This is the address of the machine that connects your network to the
  1145.   rest of the Internet. It is your `gateway' to the outside world. A
  1146.   couple of conventions exist for allocating addresses to routers which
  1147.   your network might follow, they are: The router is the lowest numbered
  1148.   address on the network, the router is the highest numbered host on the
  1149.   network.  Probably the most common is the first, where the router will
  1150.   have an address that is mostly the same as your own, except with a .1
  1151.   as the last byte. eg. if your address is 128.253.154.32, then your
  1152.   router might be 128.253.154.1. The router can in fact have any address
  1153.   valid on your network and function properly, the address doesn't
  1154.   matter at all. There may in fact even be more than one router on your
  1155.   network. You will probably need to talk to your network administrator
  1156.   to properly identify your router address.
  1157.  
  1158.   If you're using only loopback then you don't need a router address. If
  1159.   you're using PPP then you also don't need your router address, because
  1160.   PPP will automatically determine the correct address for you. If
  1161.   you're using SLIP, then your router address will be your SLIP server
  1162.   address.
  1163.  
  1164.   9.2.6.  Nameserver Address.
  1165.  
  1166.   Most machines on the net have access to a name server which translates
  1167.   human tolerable hostnames into machine tolerable addresses and vice
  1168.   versa. Your network administrators will again tell you the address of
  1169.   your nearest nameserver. You can in fact run a nameserver on your own
  1170.   machine by running named, in which case your nameserver address will
  1171.   be 127.0.0.1, the loopback port address.  However it is not required
  1172.   that you run named at all; see section `named' for more information.
  1173.  
  1174.   If you're only using loopback then you don't need to know the
  1175.   nameserver address since you're only going to be talking to your own
  1176.   machine.
  1177.  
  1178.   9.2.7.  NOTE for SLIP/PLIP/PPP users.
  1179.  
  1180.   You may or may not in fact need to know any of the above information.
  1181.   Whether you do or not will depend on exactly how your network
  1182.   connection is achieved and the capabilities of the machine at the
  1183.   other end of the link. You'll find more detail in the section relevant
  1184.   to configuration of the SLIP/PLIP and PPP devices.
  1185.  
  1186.   9.3.  /etc/rc.d/rc.inet1,2 or /etc/rc.net or /etc/init.d/network
  1187.  
  1188.   While the commands to configure your network devices can be typed
  1189.   manually each time, you will probably want to record them somewhere so
  1190.   that your network is configured automatically when you boot your
  1191.   machine.
  1192.  
  1193.   The `rc' files are specifically designed for this purpose. For the
  1194.   non-unix-wizard: `rc' file are run at bootup time by the init program
  1195.   and start up all of the basic system programs such as syslog, update
  1196.   and cron. They are analogous to the MS-DOS autoexec.bat file and rc
  1197.   might stand for `runtime commands'. By convention these files are kept
  1198.   under the /etc directory. The Linux Filesystem Standard doesn't go so
  1199.   far as to describe exactly where your rc files should go, stating that
  1200.   it is ok for them to follow either the BSD (/etc/rc.*) or System-V
  1201.   (/etc/rc.d/rc*) conventions.  Alan, Fred and I all use the System-V
  1202.   convention, so that is what you will see described here. This means
  1203.   that these files are found in /etc/rc.d and are called rc.inet1 and
  1204.   rc.inet2. The first rc file that gets called at bootup time is /etc/rc
  1205.   and it in turn calls others, such as rc.inet1, which in turn might
  1206.   called rc.inet2.  It doesn't really matter where they are kept, or
  1207.   what they are called, so long as init can find them.
  1208.  
  1209.   In some distributions the rc file for the network is called rc.net and
  1210.   is in the /etc subdirectory. The rc.net file on these systems is
  1211.   simply the rc.inet1 and the rc.inet2 files combined into one file that
  1212.   gets executed.
  1213.  
  1214.   Some equivalences:
  1215.  
  1216.        Document Convention   Slackware     Debian and other newer.
  1217.        ===================   ===========   =======================
  1218.        /etc/rc.d/rc.inet1    /etc/rc.net   /etc/init.d/network
  1219.  
  1220.        /etc/rc.d/rc.inet2    /etc/rc.net   /etc/init.d/netbase
  1221.                                            /etc/init.d/netstd_init
  1222.                                            /etc/init.d/netstd_nfs
  1223.                                            /etc/init.d/netstd_misc
  1224.  
  1225.   It doesn't matter where the commands appear, so long as you configure
  1226.   the interfaces before starting the network daemons and applications.
  1227.  
  1228.   I will refer to these files as rc.inet1 and rc.inet2 and I keep them
  1229.   in the /etc/rc.d, so if you are using one of the distributions that
  1230.   uses some other convention, or you want to keep the files somewhere
  1231.   else, then you will have to make appropriate adjustments as you go.
  1232.  
  1233.   We will be building these files from scratch as we go.
  1234.  
  1235.   9.3.1.  rc.inet1
  1236.  
  1237.   The rc.inet1 file configures the basic tcp/ip interfaces for your
  1238.   machine using two programs: /sbin/ifconfig and /sbin/route.
  1239.  
  1240.      ifconfig
  1241.         /sbin/ifconfig is used for configuring your interfaces with the
  1242.         parameters that they require to function, such as their IP
  1243.         address, network mask, broadcast addresses and similar. You can
  1244.         use the ifconfig command with no parameters to display the
  1245.         configuration of all network devices. Please check the ifconfig
  1246.         man page for more detail on its use.
  1247.  
  1248.      route
  1249.         /sbin/route is used to create, modify and delete entries in a
  1250.         table (the routing table) that the networking code will look at
  1251.         when it has a datagram that it needs to transmit. The routing
  1252.         table lists destination address and the interface that that
  1253.         address is reachable via.  You can use the route command with no
  1254.         parameters to display the contents of the routing table. Please
  1255.         check the route man page for more detail on its use.
  1256.   9.3.2.  rc.inet2
  1257.  
  1258.   The rc.inet2 file starts any network daemons such as inetd, portmapper
  1259.   and so on. This will be covered in more detail in section `rc.inet2',
  1260.   so for the moment we will concentrate on rc.inet1. I have mentioned
  1261.   this file here so that if you have some other configuration, such as a
  1262.   single rc.net file you will understand what the second half of it
  1263.   represents. it is important to remember that you must start your
  1264.   network applications and daemons after you have configured your
  1265.   network devices.
  1266.  
  1267.   9.4.  Configuring the Loopback device (mandatory).
  1268.  
  1269.   The loopback device isn't really a hardware device. It is a software
  1270.   construct that looks like a physical interface. Its function is to
  1271.   happily allow you to connect to yourself and to test network software
  1272.   without actually having to be connected to a network of any kind. This
  1273.   is great if you are developing network software and you have a SLIP
  1274.   connection.  You can write and test the code locally and then when you
  1275.   are ready to test it on a live network, establish your SLIP connection
  1276.   and test it out. You won't hurt others users if your program
  1277.   misbehaves.
  1278.  
  1279.   By convention, the loopback device always has an IP address of
  1280.   127.0.0.1 and so you will use this address when configuring it.
  1281.  
  1282.   The loopback device for Linux is called `lo'. You will now make the
  1283.   first entry into your rc.inet1 file. The following code fragment will
  1284.   work for you:
  1285.  
  1286.        #!/bin/sh
  1287.        #
  1288.        # rc.inet1   --  configures network devices.
  1289.        #
  1290.        # Attach the loopback device.
  1291.        /sbin/ifconfig lo 127.0.0.1
  1292.        #
  1293.        # Add a route to point to the loopback device.
  1294.        /sbin/route add 127.0.0.1
  1295.        # End loopback
  1296.        #
  1297.  
  1298.   You have used the ifconfig program to give the loopback interface its
  1299.   IP address and route program to create an entry in the routing table
  1300.   that will ensure that all datagrams destined for 127.0.0.1 will be
  1301.   sent to the loopback port.
  1302.  
  1303.   There are two important points to note here.
  1304.  
  1305.   Firstly, the netmask and broadcast addresses have been allowed to take
  1306.   the default values for the loopback device described earlier in
  1307.   section `Network Mask'. To see what they are, try the ifconfig program
  1308.   without any arguments.
  1309.  
  1310.   # ifconfig
  1311.   lo        Link encap Local Loopback
  1312.             inet addr 127.0.0.1  Bcast 127.255.255.255  Mask 255.0.0.0
  1313.             UP BROADCAST LOOPBACK RUNNING  MTU 2000  Metric 1
  1314.             RX packets 0 errors 0 dropped 0 overrun 0
  1315.             TX packets 30 errors 0 dropped 0 overrun 0
  1316.   #
  1317.  
  1318.   Secondly, its not obvious how the route command chose the loopback
  1319.   device as the device for the route to 127.0.0.1.  The route program is
  1320.   smart enough to know that 127.0.0.1 belongs to the network supported
  1321.   by the loopback device. It works this out by checking the IP address
  1322.   and the netmask. You can use the route command with no arguments to
  1323.   display the contents of the routing table:
  1324.  
  1325.        # route
  1326.        Kernel routing table
  1327.        Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  1328.        127.0.0.0       *               255.0.0.0       U     0      0       30 lo
  1329.        #
  1330.  
  1331.   Note: You might want to use the -n argument if your name resolver is
  1332.   not yet configured properly. The -n argument tells route to just
  1333.   display the numeric addresses and to not bother looking up the name.
  1334.  
  1335.   9.5.  Configuring an ethernet device. (optional)
  1336.  
  1337.   You'll only be interested in this section  if you wish to configure an
  1338.   ethernet card, if not then skip on ahead to the next section.
  1339.  
  1340.   To configure an ethernet card is only slightly more complicated than
  1341.   configuring the loopback device. This time you should probably specify
  1342.   explicitly the network mask and the broadcast address, unless you are
  1343.   sure that the defaults will work ok and they probably will.
  1344.  
  1345.   For this you will need the IP address that you have been assigned, the
  1346.   network mask in use on your network and the broadcast address in use.
  1347.  
  1348.   The first ethernet device for a Linux system is called `eth0', the
  1349.   second `eth1' and so forth. You will now add a section to your
  1350.   rc.inet1 file. The following code fragment will work for you if you
  1351.   change the addresses specified for real ones:
  1352.  
  1353.   #
  1354.   # Attach an ethernet device
  1355.   #
  1356.   #  configure the IP address, netmask and broadcast address.
  1357.   /sbin/ifconfig eth0 IPA.IPA.IPA.IPA
  1358.   /sbin/ifconfig eth0 netmask NMK.NMK.NMK.NMK
  1359.   /sbin/ifconfig eth0 broadcast BCA.BCA.BCA.BCA
  1360.   #
  1361.   # add a network route to point to it:
  1362.   /sbin/route add -net NWA.NWA.NWA.NWA device eth0
  1363.   #
  1364.   # End ethernet
  1365.   #
  1366.  
  1367.   Where:
  1368.  
  1369.      IPA.IPA.IPA.IPA
  1370.         represents your IP Address.
  1371.  
  1372.      NMK.NMK.NMK.NMK
  1373.         represents your netmask.
  1374.  
  1375.      BCA.BCA.BCA.BCA
  1376.         represents your Broadcast address.
  1377.  
  1378.      NWA.NWA.NWA.NWA
  1379.         represents your Network Address.
  1380.  
  1381.   Note the use of the -net argument to the route command.  This tells
  1382.   route that the route to be added is a route to a network and not to a
  1383.   host. There is an alternative method of achieving this, you can leave
  1384.   off the -net if you have the network address listed in the
  1385.   /etc/networks file. This is covered later in section `/etc/networks'.
  1386.  
  1387.   9.6.  Configuring a SLIP device (optional)
  1388.  
  1389.   SLIP (Serial Line Internet Protocol) allows you to use tcp/ip over a
  1390.   serial line, be that a phone line with a dialup modem, or a leased
  1391.   line of some sort.  Of course to use SLIP you need access to a SLIP-
  1392.   server in your area. Many universities and businesses provide SLIP
  1393.   access all over the world.
  1394.  
  1395.   Slip uses the serial ports on your machine to carry IP datagrams. To
  1396.   do this it must take control of the serial device. Slip device names
  1397.   are named sl0, sl1 etc. How do these correspond to your serial devices
  1398.   ? The networking code uses what is called an ioctl (i/o control) call
  1399.   to change the serial devices into SLIP devices. There are two programs
  1400.   supplied that can do this, they are called dip and slattach
  1401.  
  1402.   9.6.1.  dip
  1403.  
  1404.   dip (Dialup IP) is a smart program that is able to set the speed of
  1405.   the serial device, command your modem to dial the remote end of the
  1406.   link, automatically log you into the remote server, search for
  1407.   messages sent to you by the server and extract information for them
  1408.   such as your IP address and perform the ioctl necessary to switch your
  1409.   serial port into SLIP mode. dip has a powerful scripting ability and
  1410.   it is this that you can exploit to automate your logon procedure.
  1411.  
  1412.   dip used to be supplied with the net-tools, but since development of
  1413.   dip is now seperate, you have to source it seperately.  There have
  1414.   been a number of other versions of dip produced which offer a variety
  1415.   of new features. The dip-uri version seems to be the more popular, but
  1416.   I suggest you take a close look at each to determine which offers
  1417.   enhancements that you find useful. Since dip-uri is is so popular, the
  1418.   examples described in this document are based on current versions of
  1419.   it.
  1420.  
  1421.   You can find it at:
  1422.  
  1423.   sunsite.unc.edu
  1424.  
  1425.        /pub/Linux/system/Network/serial/dip337j-uri.tgz
  1426.  
  1427.   To install it, try the following:
  1428.  
  1429.        #
  1430.        # cd /usr/src
  1431.        # gzip -dc dip337j-uri.tgz | tar xvf -
  1432.        # cd dip.3.3.7j
  1433.  
  1434.        <edit Makefile>
  1435.  
  1436.        # make install
  1437.        #
  1438.  
  1439.   The Makefile assumes the existence of a group called uucp, but you
  1440.   might like to change this to either dip or SLIP depending on your
  1441.   configuration.
  1442.  
  1443.   9.6.2.  slattach
  1444.  
  1445.   slattach as contrasted with dip is a very simple program, that is very
  1446.   easy to use, but does not have the sophistication of dip.  It does not
  1447.   have the scripting ability, all it does is configure your serial
  1448.   device as a SLIP device. It assumes you have all the information you
  1449.   need and the serial line is established before you invoke it. slattach
  1450.   is ideal to use where you have a permanent connection to your server,
  1451.   such as a physical cable, or a leased line.
  1452.  
  1453.   9.6.3.  When do I use which ?
  1454.  
  1455.   You would use dip when your link to the machine that is your SLIP
  1456.   server is a dialup modem, or some other temporary link. You would use
  1457.   slattach when you have a leased line, perhaps a cable, between your
  1458.   machine and the server and there is no special action needed to get
  1459.   the link working. See section `Permanent Slip connection' for more
  1460.   information.
  1461.  
  1462.   Configuring SLIP is much like configuring an Ethernet interface (read
  1463.   section `Configuring an ethernet device' above). However there are a
  1464.   few key differences.
  1465.  
  1466.   First of all, SLIP links are unlike ethernet networks in that there is
  1467.   only ever two hosts on the network, one at each end of the link.
  1468.   Unlike an ethernet that is available for use as soon are you are
  1469.   cabled, with SLIP, depending on the type of link you have, you may
  1470.   have to initialize your network connection in some special way.
  1471.  
  1472.   If you are using dip then this would not normally be done at boot
  1473.   time, but at some time later, when you were ready to use the link.  It
  1474.   is possible to automate this procedure. If you are using slattach then
  1475.   you will probably want to add a section to your rc.inet1 file.  This
  1476.   will be described soon.
  1477.  
  1478.   There are two major types of SLIP servers: Dynamic IP address servers
  1479.   and static IP address servers. Almost every SLIP server will prompt
  1480.   you to login using a username and password when dialing in. dip can
  1481.   handle logging you in automatically.
  1482.  
  1483.   9.6.4.  Static SLIP server with a dialup line and DIP.
  1484.  
  1485.   A static SLIP server in one in which you have been supplied an IP
  1486.   address that is exclusively yours. Each time you connect to the
  1487.   server, you will configure your SLIP port with that address. The
  1488.   static SLIP server will answer your modem call, possibly prompt you
  1489.   for a username and password, and then route any datagrams destined for
  1490.   your address to you via that connection. If you have a static server,
  1491.   then you may want to put entries for your hostname and IP address
  1492.   (since you know what it will be) into your /etc/hosts. You should also
  1493.   configure some other files such as: rc.inet2, host.conf, resolv.conf,
  1494.   /etc/HOSTNAME and rc.local. Remember that when configuring rc.inet1,
  1495.   you don't need to add any special commands for your SLIP connection
  1496.   since it is dip that does all of the hard work for you in configuring
  1497.   your interface. You will need to give dip the appropriate information
  1498.   and it will configure the interface for you after commanding the modem
  1499.   to establish the call and logging you into your SLIP server.
  1500.  
  1501.   If this is how your SLIP server works then you can move to section
  1502.   `Using Dip' to learn how to configure dip appropriately.
  1503.  
  1504.   9.6.5.  Dynamic SLIP server with a dialup line and DIP.
  1505.  
  1506.   A dynamic SLIP server is one which allocates you an IP address
  1507.   randomly, from a pool of addresses, each time you logon. This means
  1508.   that there is no guarantee that you will have any particular address
  1509.   each time, and that address may well be used by someone else after you
  1510.   have logged off.  The network administrator who configured the SLIP
  1511.   server will have assigned a pool of address for the SLIP server to
  1512.   use, when the server receives a new incoming call, it finds the first
  1513.   unused address, guides the caller through the login process and then
  1514.   prints a welcome message that contains the IP address it has allocated
  1515.   and will proceed to use that IP address for the duration of that call.
  1516.  
  1517.   Configuring for this type of server is similar to configuring for a
  1518.   static server, except that you must add a step where you obtain the IP
  1519.   address that the server has allocated for you and configure your SLIP
  1520.   device with that.
  1521.  
  1522.   Again, dip does the hard work and new versions are smart enough to not
  1523.   only log you in, but to also be able to automatically read the IP
  1524.   address printed in the welcome message and store it so that you can
  1525.   have it configure your SLIP device with it.
  1526.  
  1527.   If this is how your SLIP server works then you can move to section
  1528.   `Using Dip' to learn how to configure dip appropriately.
  1529.  
  1530.   9.6.6.  Using DIP.
  1531.  
  1532.   As explained earlier, dip is a powerful program that can simplify and
  1533.   automate the process of dialing into the SLIP server, logging you in,
  1534.   starting the connection and configuring your SLIP devices with the
  1535.   appropriate ifconfig and route commands.
  1536.  
  1537.   Essentially to use dip you'll write a `dip script', which is basically
  1538.   a list of commands that dip understands that tell dip how to perform
  1539.   each of the actions you want it to perform. See sample.dip that comes
  1540.   supplied with dip to get an idea of how it works. dip is quite a
  1541.   powerful program, with many options.  Instead of going into all of
  1542.   them here you should looks at the man page, README and sample files
  1543.   that will have come with your version of dip.
  1544.  
  1545.   You may notice that the sample.dip script assumes that you're using a
  1546.   static SLIP server, so you know what your IP address is beforehand.
  1547.   For dynamic SLIP servers, the newer versions of dip include a command
  1548.   you can use to automatically read and configure your SLIP device with
  1549.   the IP address that the dynamic server allocates for you. The
  1550.   following sample is a modified version of the sample.dip that came
  1551.   supplied with dip337j-uri.tgz and is probably a good starting point
  1552.   for you.  You might like to save it as /etc/dipscript and edit it to
  1553.   suit your configuration:
  1554.  
  1555.   #
  1556.   # sample.dip    Dialup IP connection support program.
  1557.   #
  1558.   #               This file (should show) shows how to use the DIP
  1559.   #       This file should work for Annex type dynamic servers, if you
  1560.   #       use a static address server then use the sample.dip file that
  1561.   #       comes as part of the dip337-uri.tgz package.
  1562.   #
  1563.   #
  1564.   # Version:      @(#)sample.dip  1.40    07/20/93
  1565.   #
  1566.   # Author:       Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  1567.   #
  1568.  
  1569.   main:
  1570.   # Next, set up the other side's name and address.
  1571.   # My dialin machine is called 'xs4all.hacktic.nl' (== 193.78.33.42)
  1572.   get $remote xs4all.hacktic.nl
  1573.   # Set netmask on sl0 to 255.255.255.0
  1574.   netmask 255.255.255.0
  1575.   # Set the desired serial port and speed.
  1576.   port cua02
  1577.   speed 38400
  1578.  
  1579.   # Reset the modem and terminal line.
  1580.   # This seems to cause trouble for some people!
  1581.   reset
  1582.  
  1583.   # Note! "Standard" pre-defined "errlevel" values:
  1584.   #  0 - OK
  1585.   #  1 - CONNECT
  1586.   #  2 - ERROR
  1587.   #
  1588.   # You can change those grep'ping for "addchat()" in *.c...
  1589.  
  1590.   # Prepare for dialing.
  1591.   send ATQ0V1E1X4\r
  1592.   wait OK 2
  1593.   if $errlvl != 0 goto modem_trouble
  1594.   dial 555-1234567
  1595.   if $errlvl != 1 goto modem_trouble
  1596.  
  1597.   # We are connected.  Login to the system.
  1598.   login:
  1599.   sleep 2
  1600.   wait ogin: 20
  1601.   if $errlvl != 0 goto login_trouble
  1602.   send MYLOGIN\n
  1603.   wait ord: 20
  1604.   if $errlvl != 0 goto password_error
  1605.   send MYPASSWD\n
  1606.   loggedin:
  1607.  
  1608.   # We are now logged in.
  1609.   wait SOMEPROMPT 30
  1610.   if $errlvl != 0 goto prompt_error
  1611.  
  1612.   # Command the server into SLIP mode
  1613.   send SLIP\n
  1614.   wait SLIP 30
  1615.   if $errlvl != 0 goto prompt_error
  1616.  
  1617.   # Get and Set your IP address from the server.
  1618.   #   Here we assume that after commanding the SLIP server into SLIP
  1619.   #   mode that it prints your IP address
  1620.   get $locip remote 30
  1621.   if $errlvl != 0 goto prompt_error
  1622.  
  1623.   # Set up the SLIP operating parameters.
  1624.   get $mtu 296
  1625.   # Ensure "route add -net default xs4all.hacktic.nl" will be done
  1626.   default
  1627.  
  1628.   # Say hello and fire up!
  1629.   done:
  1630.   print CONNECTED $locip ---> $rmtip
  1631.   mode CSLIP
  1632.   goto exit
  1633.  
  1634.   prompt_error:
  1635.   print TIME-OUT waiting for sliplogin to fire up...
  1636.   goto error
  1637.  
  1638.   login_trouble:
  1639.   print Trouble waiting for the Login: prompt...
  1640.   goto error
  1641.  
  1642.   password:error:
  1643.   print Trouble waiting for the Password: prompt...
  1644.   goto error
  1645.  
  1646.   modem_trouble:
  1647.   print Trouble occurred with the modem...
  1648.   error:
  1649.   print CONNECT FAILED to $remote
  1650.   quit
  1651.  
  1652.   exit:
  1653.   exit
  1654.  
  1655.   The above example assumes you are calling a dynamic SLIP server, if
  1656.   you are calling a static SLIP server, then the sample.dip file that
  1657.   comes with dip337j-uri.tgz should work for you.
  1658.  
  1659.   When dip is given the get $local command it searches the incoming text
  1660.   from the remote end for a string that looks like an IP address, ie
  1661.   strings numbers separated by `.' characters. This modification was put
  1662.   in place specifically for dynamic SLIP servers, so that the process of
  1663.   reading the IP address granted by the server could be automated.
  1664.  
  1665.   The example above will automatically create a default route via your
  1666.   SLIP link, if this is not what you want, you might have an ethernet
  1667.   connection that should be your default route, then remove the default
  1668.   command from the script.  After this script has finished running, if
  1669.   you do an ifconfig command, you will see that you have a device sl0.
  1670.   This is your SLIP device.  Should you need to, you can modify its
  1671.   configuration manually, after the dip command has finished, using the
  1672.   ifconfig and route commands.
  1673.  
  1674.   Please note that dip allows you to select a number of different
  1675.   protocols to use with the mode command, the most common example is
  1676.   cSLIP for SLIP with compression. Please note that both ends of the
  1677.   link must agree, so you should ensure that whatever you select agrees
  1678.   with what your server is set to.
  1679.  
  1680.   The above example is fairly robust and should cope with most errors.
  1681.   Please refer to the dip man page for more information. Naturally you
  1682.   could, for example, code the script to do such things as redial the
  1683.   server if it doesn't get a connection within a prescribed period of
  1684.   time, or even try a series of servers if you have access to more than
  1685.   one.
  1686.  
  1687.   9.6.7.  Permanent SLIP connection using a leased line and slattach.
  1688.  
  1689.   If you have a cable between two machines, or are fortunate enough to
  1690.   have a leased line, or some other permanent serial connection between
  1691.   your machine and another, then you don't need to go to all the trouble
  1692.   of using dip to set up your serial link. slattach is a very simple to
  1693.   use utility that will allow you just enough functionality to configure
  1694.   your connection.
  1695.  
  1696.   Since your connection will be a permanent one, you will want to add
  1697.   some commands to your rc.inet1 file. In essence all you need to do for
  1698.   a permanent connection is ensure that you configure the serial device
  1699.   to the correct speed and switch the serial device into SLIP mode.
  1700.   slattach allows you to do this with one command. Add the following to
  1701.   your rc.inet1 file:
  1702.  
  1703.        #
  1704.        # Attach a leased line static SLIP connection
  1705.        #
  1706.        #  configure /dev/cua0 for 19.2kbps and cslip
  1707.        /sbin/slattach -p cslip -s 19200 /dev/cua0 &
  1708.        /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
  1709.        #
  1710.        # End static SLIP.
  1711.  
  1712.   Where:
  1713.  
  1714.      IPA.IPA.IPA.IPA
  1715.         represents your IP address.
  1716.  
  1717.      IPR.IPR.IPR.IPR
  1718.         represents the IP address of the remote end.
  1719.  
  1720.   slattach allocated the first unallocated SLIP device to the serial
  1721.   device specified. slattach starts with sl0. Therefore the first
  1722.   slattach command attaches SLIP device sl0 to the serial device
  1723.   specified and sl1 the next time, etc.
  1724.  
  1725.   slattach allows you to configure a number of different protocols with
  1726.   the -p argument. In your case you will use either SLIP or cSLIP
  1727.   depending on whether you want to use compression or not.  Note: both
  1728.   ends must agree on whether you want compression or not.
  1729.  
  1730.   9.7.  Configuring a PLIP device. (optional)
  1731.  
  1732.   plip (Parallel Line IP), is like SLIP, in that it is used for
  1733.   providing a point to point network connection between two machines,
  1734.   except that it is designed to use the parallel printer ports on your
  1735.   machine instead of the serial ports. Because it is possible to
  1736.   transfer more than one bit at a time with a parallel port, it is
  1737.   possible to attain higher speeds with the plip interface than with a
  1738.   standard serial device. In addition, even the simplest of parallel
  1739.   ports, printer ports, can be used, in lieu of you having to purchase
  1740.   comparatively expensive 16550AFN UART's for your serial ports.
  1741.  
  1742.   Please note that some laptops use chipsets that will not work with
  1743.   PLIP because they do not allow some combinations of signals that PLIP
  1744.   relies on, that printers don't use.
  1745.  
  1746.   The Linux plip interface is compatible with the Crynwyr Packet Driver
  1747.   PLIP and this will mean that you can connect your Linux machine to a
  1748.   DOS machine running any other sort of tcp/ip software via plip.
  1749.  
  1750.   You have two options in using the PLIP driver. You can either compile
  1751.   the driver into your kernel, or use the modules package to load the
  1752.   module dynamically. I recommend just compiling it into your kernel as
  1753.   it is probably the easiest and in most circumstances you will want the
  1754.   driver there all the time anyway.
  1755.  
  1756.   When compiling the kernel, there is only one file that might need to
  1757.   be looked at to configure plip. That file is
  1758.   /usr/src/linux/driver/net/CONFIG and it contains plip timers in mS.
  1759.   The defaults are probably ok in most cases. You will probably need to
  1760.   increase them if you have an especially slow computer, in which case
  1761.   the timers to increase are actually on the other computer.
  1762.  
  1763.   The driver assumes the following defaults:
  1764.  
  1765.        device  i/o addr    IRQ
  1766.        ------  --------    -----
  1767.        plip0   0x3BC           5
  1768.        plip1   0x378           7
  1769.        plip2   0x278           2 (9)
  1770.  
  1771.   If your parallel ports don't match any of the above combinations then
  1772.   you can change the IRQ of a port using the ifconfig command using the
  1773.   `irq' parameter. Be sure to enable IRQ's on your printer ports in your
  1774.   ROM BIOS if it supports this option.
  1775.  
  1776.   To configure a plip interface, you will need to add the following
  1777.   lines to your rc.inet1 file:
  1778.  
  1779.        #
  1780.        # Attach a PLIP interface
  1781.        #
  1782.        #  configure first parallel port as a plip device
  1783.        /sbin/ifconfig plip0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
  1784.        #
  1785.        # End plip
  1786.  
  1787.   Where:
  1788.  
  1789.      IPA.IPA.IPA.IPA
  1790.         represents your IP address.
  1791.  
  1792.      IPR.IPR.IPR.IPR
  1793.         represents the IP address of the remote machine.
  1794.  
  1795.   The pointopoint parameter has the same meaning as for SLIP, in that it
  1796.   specifies the address of the machine at the other end of the link.
  1797.  
  1798.   In almost all respects you can treat a plip interface as though it
  1799.   were a SLIP interface, except that neither dip nor slattach need be,
  1800.   nor can be, used.
  1801.  
  1802.   9.7.1.  PLIP cabling diagram.
  1803.  
  1804.   plip has been designed to use cables with the same pinout as those
  1805.   commonly used by the better known of the MS-DOS based pc-pc file
  1806.   transfer programs.
  1807.  
  1808.   The pinout diagram (taken from /usr/src/linux/drivers/net/plip.c)
  1809.   looks as follows:
  1810.  
  1811.        Pin Name    Connect pin - pin
  1812.        ---------   -------------------------------
  1813.        GROUND      25 - 25
  1814.        D0->ERROR   2 - 15
  1815.        ERROR->D0   15 - 2
  1816.        D1->SLCT    3 - 13
  1817.        SLCT->D1    13 - 3
  1818.        D2->PAPOUT  4 - 12
  1819.        PAPOUT->D2  12 - 4
  1820.        D3->ACK     5 - 10
  1821.        ACK->D3     10 - 5
  1822.        D4->BUSY    6 - 11
  1823.        BUSY->D4    11 - 6
  1824.        D5          7*
  1825.        D6          8*
  1826.        D7          9*
  1827.        STROBE      1*
  1828.        FEED        14*
  1829.        INIT        16*
  1830.        SLCTIN      17*
  1831.  
  1832.   Notes: Do not connect the pins marked with an asterisk `*'.  Extra
  1833.   grounds are 18,19,20,21,22,23 and 24.
  1834.  
  1835.   If the cable you are using has a metallic shield, it should be
  1836.   connected to the metallic DB-25 shell at one end only.
  1837.  
  1838.   Warning: A miswired PLIP cable can destroy your controller card. Be
  1839.   very careful and double check every connection to ensure you don't
  1840.   cause yourself any unnecessary work or heartache.
  1841.  
  1842.   While you may be able to run PLIP cables for long distances, you
  1843.   should avoid it if you can. The specifications for the cable allow for
  1844.   a cable length of about 1 metre or so. Please be very careful when
  1845.   running long plip cables as sources of strong electromagnetic fields
  1846.   such as lightning, power lines and radio transmitters can interfere
  1847.   with and sometimes even damage your controller. If you really want to
  1848.   connect two of your computers over a large distance you really should
  1849.   be looking at obtaining a pair of thin-net ethernet cards and running
  1850.   some coaxial cable.
  1851.  
  1852.   10.  Routing. (mandatory)
  1853.  
  1854.   After you have configured all of your network devices you need to
  1855.   think about how your machine is going to route IP datagrams. If you
  1856.   have only one network device configured then your choice is easy, as
  1857.   all datagrams for any machine other than yours must go via that
  1858.   interface. If you have more than one network interface then your
  1859.   choice is a little more complicated. You might have both an ethernet
  1860.   device and SLIP connection to your machine at home. In this situation
  1861.   you must direct all datagrams for your machine at home via your SLIP
  1862.   interface and all else via the ethernet device. Routing is actually a
  1863.   very simple mechanism, but don't worry if you find it slightly
  1864.   difficult to understand at first; everybody does.
  1865.  
  1866.   You can display the contents of your routing table by using the route
  1867.   command without any options.
  1868.  
  1869.   There are four commonly used routing mechanisms for unix network
  1870.   configurations.  I'll briefly discuss each in turn.
  1871.  
  1872.   10.1.  Static/Manual Routes.
  1873.  
  1874.   Static routing, as its name implies, is `hard coded' routing, that is,
  1875.   it will not change if your network suffers some failure, or if an
  1876.   alternate route becomes available. Static routes are often used in
  1877.   cases where you have a very simple network with no alternate routes
  1878.   available to a destination host, that is, there is only one possible
  1879.   network path to a destination host, or where you want to route a
  1880.   particular way to a host regardless of network changes.
  1881.  
  1882.   In Linux there is a special use for manual routes and that is for
  1883.   adding a route to a SLIP or plip host where you have used the ifconfig
  1884.   pointopoint parameter. If you have a SLIP/plip link and have the
  1885.   pointopoint parameter specifying the address of the remote host, then
  1886.   you should add a static route to that address so that the ip routing
  1887.   software knows how to route datagrams to that address. The route
  1888.   command you would use for the SLIP/plip link via leased line example
  1889.   presented earlier would be:
  1890.  
  1891.        #/sbin/route add IPR.IPR.IPR.IPR
  1892.  
  1893.   Where:
  1894.  
  1895.      IPR.IPR.IPR.IPR
  1896.         represents the IP address of the remote end.
  1897.  
  1898.   10.2.  Default Route.
  1899.  
  1900.   The default route mechanism is probably the most common and most
  1901.   useful to most end-user workstations and hosts on most networks. The
  1902.   default route is a special static route that matches every destination
  1903.   address, so that if there is no more specific route for a datagram to
  1904.   be sent to, then the default route will be used.
  1905.  
  1906.   If you have a configuration where you have only a single ethernet
  1907.   interface, or a single SLIP interface device defined then you should
  1908.   point your default route via it. In the case of an ethernet interface,
  1909.   the Linux kernel knows where to send datagrams for any host on your
  1910.   network. It works this out using the network address and the network
  1911.   mask as discussed earlier. This means that the only datagrams the
  1912.   kernel won't know how to properly route will be those for people not
  1913.   on your network. To make this work you would normally have your
  1914.   default route point to your router address, as it is your means of
  1915.   getting outside of your local network. If you are using a SLIP
  1916.   connection, then your SLIP server will be acting as your router, so
  1917.   your default route will be via your SLIP server.
  1918.  
  1919.   To configure your default route, add the following to your rc.inet1
  1920.   after all of your network device configurations:
  1921.  
  1922.        #
  1923.        # Add a default route.
  1924.        #
  1925.        /sbin/route add default gw RGA.RGA.RGA.RGA
  1926.        #
  1927.  
  1928.   Where:
  1929.  
  1930.      RGA.RGA.RGA.RGA
  1931.         represents your Router/Gateway Address.
  1932.  
  1933.   10.3.  Proxy ARP.
  1934.  
  1935.   This method is ugly, hazard prone and should be used with extreme
  1936.   care, some of you will want to use it anyway.
  1937.  
  1938.   Those with the greatest need for proxy arp will be those of you who
  1939.   are configuring your Linux machine as a SLIP dial-in server. For those
  1940.   of you who will be using PPP, the PPP daemon simplifies and automates
  1941.   this task, making it a lot safer to use.
  1942.  
  1943.   Normally when a tcp/ip host on your ethernet network wants to talk to
  1944.   you, it knows your IP address, but doesn't know what hardware
  1945.   (ethernet) address to send datagrams to. The ARP mechanism is there
  1946.   specifically to provide that mapping function between network address
  1947.   and hardware address. The ethernet protocol provides a special address
  1948.   that is recognised by all ethernet cards, this is called the broadcast
  1949.   address. ARP works by sending a specially formatted datagram
  1950.   containing the IP address of the host it wishes to discover the
  1951.   hardware address of and transmits it to the ethernet broadcast
  1952.   address.  Every host will receive this datagram and the host that is
  1953.   configured with the matching IP address will reply with its hardware
  1954.   address. The host that performed the arp will then know what hardware
  1955.   address to use for the desired IP address.
  1956.  
  1957.   If you want to use your machine as a server for other machines, you
  1958.   must get your machine to answer ARP requests for their IP addresses on
  1959.   their behalf, as they will not be physically connected to the ethernet
  1960.   network. Lets say that you have been assigned a number of IP addresses
  1961.   on your local network that you will be offering to dial-in SLIP users.
  1962.   Lets say those addresses are: 128.253.154.120-124 and that you have an
  1963.   ethernet card with a hardware address of 00:00:C0:AD:37:1C. (You can
  1964.   find the hardware address of your ethernet card by using the ifconfig
  1965.   command with no options). To instruct your Linux server to answer arp
  1966.   requests by proxy for these addresses you would need to add the
  1967.   following commands to the end of your rc.inet1 file:
  1968.  
  1969.   #
  1970.   # Proxy ARP for those dialin users who will be using this
  1971.   #           machine as a server:
  1972.   #
  1973.   /sbin/arp -s 128.263.154.120 00:00:C0:AD:37:1C pub
  1974.   /sbin/arp -s 128.263.154.121 00:00:C0:AD:37:1C pub
  1975.   /sbin/arp -s 128.263.154.122 00:00:C0:AD:37:1C pub
  1976.   /sbin/arp -s 128.263.154.123 00:00:C0:AD:37:1C pub
  1977.   /sbin/arp -s 128.263.154.124 00:00:C0:AD:37:1C pub
  1978.   #
  1979.   # End proxy arps.
  1980.  
  1981.   The pub argument stands for `publish'. It is this argument that
  1982.   instructs your machine to answer requests for these addresses, even
  1983.   though they are not for your machine. When it answers it will supply
  1984.   the hardware address specified, which is of course its own hardware
  1985.   address.
  1986.  
  1987.   Naturally you will need to ensure that you have routes configured in
  1988.   your linux server that point these addresses to the SLIP device on
  1989.   which they will be connecting.
  1990.  
  1991.   If you are using PPP, you don't need to worry about manually messing
  1992.   with the arp table, as the pppd will manage those entries for you if
  1993.   you use the proxyarp parameter and as long as the IP addresses of the
  1994.   remote machine and the server machine are in the same network. You
  1995.   will need to supply the netmask of the network on the server's pppd
  1996.   command line.
  1997.  
  1998.   10.4.  gated - the routing daemon.
  1999.  
  2000.   gated could be used in place of proxy arp in some cases and would
  2001.   certainly be much cleaner, but its primary use is if you want your
  2002.   linux machine to act as an intelligent ip router for your network.
  2003.   gated provides support for a number of routing protocols. Among these
  2004.   are RIP, BGP, EGP, HELLO and OSPF. The most commonly used in small
  2005.   networks being rip. rip stands for `Routing Information Protocol'. If
  2006.   you run gated, configured for rip, your linux machine will
  2007.   periodically broadcast a copy of its routing table to your network in
  2008.   a special format. In this way, all of the other machines on your
  2009.   network will know what addresses are accessible via your machine.
  2010.  
  2011.   gated can be used to replace proxy arp when all hosts on your network
  2012.   run either gated or routed. If you have a network where you use a
  2013.   mixture of manual and dynamic routes, you should mark any manual
  2014.   routes as passive to ensure that they aren't destroyed by gated
  2015.   because it hasn't received an update for them. The best way to add
  2016.   static routes if you are using gated is to add a static stanza to your
  2017.   /etc/gated.conf file. This is described below.
  2018.  
  2019.   gated would normally be started from your rc.inet2 which is covered in
  2020.   the next section. You might already see a daemon called routed
  2021.   running. gated is superior to routed in that it is more flexible and
  2022.   more functional. So you should use gated and not routed.
  2023.  
  2024.   10.4.1.  Obtaining gated
  2025.  
  2026.   Gated is available from:
  2027.  
  2028.   sunsite.unc.edu
  2029.  
  2030.   /pub/Linux/system/Network/daemons/gated11_bin.tgz
  2031.  
  2032.   10.4.2.  Installing gated
  2033.  
  2034.   The gated binary distribution comprises three programs and two sample
  2035.   configuration files.
  2036.  
  2037.   The programs are:
  2038.  
  2039.      gated
  2040.         the actual gated daemon.
  2041.  
  2042.      gdc
  2043.         the operational user interface for gated. gdc is for controlling
  2044.         the gated daemon, stopping and starting it, obtaining its status
  2045.         and the like.
  2046.  
  2047.      ripquery
  2048.         a diagnostic tool to query the known routes of a gateway using
  2049.         either a `rip query' or a `rip poll'.
  2050.  
  2051.   The configuration files are:
  2052.  
  2053.      gated.conf
  2054.         this is the actual configuration file for the gated daemon. It
  2055.         allows you to specify how gated will behave when it is running.
  2056.         You can enable and disable any of the routing protocols and
  2057.         control the behaviour of those routing protocols running.
  2058.  
  2059.      gated.version
  2060.         a text file that describes the version number of the gated
  2061.         daemon
  2062.  
  2063.   The gated binary distribution will not install the gated files in the
  2064.   correct place for you. Fortunately there aren't very many, so its
  2065.   fairly simple to do.
  2066.  
  2067.   To install the binaries try the following:
  2068.  
  2069.        # cd /tmp
  2070.        # gzip -dc .../gated.linux.bin.tgz | tar xvf -
  2071.        # install -m 500 bin/gated /usr/sbin
  2072.        # install -m 444 bin/gated.conf bin/gated.version /etc
  2073.        # install -m 555 bin/ripquery bin/gdc /sbin
  2074.        # rm -rf /tmp/bin
  2075.  
  2076.   I keep the networking daemons in /usr/sbin, if yours are somewhere
  2077.   else then naturally you'll have to change the target directory. The
  2078.   sample gated configuration file included configures gated to emulate
  2079.   the old routed daemon. It will probably work for you in most
  2080.   circumstances and it looks like this:
  2081.  
  2082.   #
  2083.   #  This configuration emulates routed.  It runs RIP and only sends
  2084.   #  updates if there are more than one interfaces up and IP forwarding is
  2085.   #  enabled in the kernel.
  2086.   #
  2087.   #       NOTE that RIP *will not* run if UDP checksums are disabled in
  2088.   #       the kernel.
  2089.   #
  2090.   rip yes ;
  2091.   traceoptions all;
  2092.   #
  2093.  
  2094.   If you have any static routes you wish to add, you can add them in a
  2095.   static stanza appended to your /etc/gated.conf as follows:
  2096.  
  2097.        #
  2098.        static {
  2099.        37.0.0.0 mask 255.0.0.0 gateway 44.136.8.97 ;
  2100.        host 44.136.8.100 gateway 44.136.8.97 ;
  2101.        } ;
  2102.        #
  2103.  
  2104.   The above example would create a static route to the Class A network
  2105.   37.0.0.0 via gateway 44.136.8.97 and a static route to a host with
  2106.   address 44.136.8.100 via gateway 44.136.8.97.  If you do this you do
  2107.   not need to add the routes using the route command, gated will add and
  2108.   manage the routes for you.
  2109.  
  2110.   To install the man files, try the following:
  2111.  
  2112.        # cd /tmp
  2113.        # gzip -dc .../gated.linux.man.tgz | tar xvf -
  2114.        # install -m 444 man/*.8 /usr/man/man8
  2115.        # install -m 444 man/*.5 /usr/man/man5
  2116.        # rm -rf /tmp/man
  2117.  
  2118.   The man files contain concise and detailed information on the
  2119.   configuration and use of gated. For information on configuring gated,
  2120.   refer to the gated-config man page.
  2121.  
  2122.   11.  Configuring the network daemons.
  2123.  
  2124.   As mentioned earlier, there are other files that you will need to
  2125.   complete your network installation. These files concern higher level
  2126.   configurations of the network software. Each of the important ones are
  2127.   covered in the following sub-sections, but you will find there are
  2128.   others that you will have to configure as you become more familiar
  2129.   with the network suite.
  2130.  
  2131.   11.1.  /etc/rc.d/rc.inet2 (the second half of rc.net)
  2132.  
  2133.   If you have been following this document you should at this stage have
  2134.   built an rc file to configure each of your network devices with the
  2135.   correct addresses and set up whatever routing you will need for your
  2136.   particular network configuration. You will now need to actually start
  2137.   some of the higher level network software.
  2138.  
  2139.   Now would be a really good time to read Olaf's Network Administrators
  2140.   Guide, as it really should be considered the definitive document for
  2141.   this stage of the configuration process. It will help you decide what
  2142.   to include in this file and more importantly perhaps, what not to
  2143.   include in this file. For the security conscious it is a fair
  2144.   statement to say that the more network services you have running, the
  2145.   more likely the chance of your system having a security hole: Run only
  2146.   what you need.
  2147.  
  2148.   There are some very important daemons (system processes that run in
  2149.   the background) that you will need to know a little about. The man
  2150.   pages will tell you more, but they are:
  2151.  
  2152.   11.1.1.  inetd.
  2153.  
  2154.   inetd is a program that sits in the background and manages internet
  2155.   connection requests and the like. It is smart enough that you don't
  2156.   need to leave a whole bunch of servers running when there is nothing
  2157.   connected to them.  When it sees an incoming request for a particular
  2158.   service, eg telnet, or ftp, it will check the /etc/services file, find
  2159.   what server program needs to be run to manage the request, start it
  2160.   and hand the connection over to it. Imagine it as a master server for
  2161.   your internet servers. It also has a few simple standard services
  2162.   inbuilt. These are echo, discard and generate services used for
  2163.   various types of network testing. inetd doesn't manage all servers and
  2164.   services that you might run, but it manages most of the usual ones.
  2165.   Normally services such as udp based services, or services that manage
  2166.   their own connection multiplexing such as World Wide Web servers or
  2167.   muds would be run independently of inetd. Generally the documentation
  2168.   accompanying such servers will tell you whether to use inetd or not.
  2169.  
  2170.   11.1.2.  syslogd.
  2171.  
  2172.   syslogd is a daemon that handles all system logging. It accepts
  2173.   messages generated for it and will distribute them according to a set
  2174.   of rules contained in /etc/syslogd.conf. For example, certain types of
  2175.   messages you will want to send to the console and also to a log file,
  2176.   where others you will want only to log to a file. syslogd allows you
  2177.   to specify what messages should go where.
  2178.  
  2179.   11.2.  A sample rc.inet2 file.
  2180.  
  2181.   The following is a sample rc.inet2 file that Fred built. It starts a
  2182.   large number of servers, so you might want to trim it down to just
  2183.   those services that you actually want to run. To trim it down, simply
  2184.   delete or comment out the stanzas (if to fi) that you don't need. All
  2185.   each stanza does is test that the relevant module is a file, that it
  2186.   exists, echoes a comment that you can see when you boot your machine
  2187.   and then executes the commands with the arguments supplied to ensure
  2188.   that it runs happily in the background. For more detailed information
  2189.   on each of the deamons, check either the Network Administrators Guide
  2190.   or the relevant man pages.
  2191.  
  2192.   #! /bin/sh
  2193.   #
  2194.   # rc.inet2      This shell script boots up the entire INET system.
  2195.   #               Note, that when this script is used to also fire
  2196.   #               up any important remote NFS disks (like the /usr
  2197.   #               distribution), care must be taken to actually
  2198.   #               have all the needed binaries online _now_ ...
  2199.   #
  2200.   # Version:      @(#)/etc/rc.d/rc.inet2  2.18    05/27/93
  2201.   #
  2202.   # Author:       Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  2203.   #
  2204.  
  2205.   # Constants.
  2206.   NET="/usr/sbin"
  2207.   IN_SERV="lpd"
  2208.   LPSPOOL="/var/spool/lpd"
  2209.  
  2210.   # At this point, we are ready to talk to The World...
  2211.   echo -e "\nMounting remote file systems ..."
  2212.   /bin/mount -t nfs -v            # This may be our /usr runtime!!!
  2213.  
  2214.   echo -e "\nStarting Network daemons ..."
  2215.   # Start the SYSLOG daemon.  This has to be the first server.
  2216.   # This is a MUST HAVE, so leave it in.
  2217.   echo -n "INET: "
  2218.   if [ -f ${NET}/syslogd ]
  2219.   then
  2220.   echo -n "syslogd "
  2221.   ${NET}/syslogd
  2222.   fi
  2223.  
  2224.   # Start the SUN RPC Portmapper.
  2225.   if [ -f ${NET}/rpc.portmap ]
  2226.   then
  2227.   echo -n "portmap "
  2228.   ${NET}/rpc.portmap
  2229.   fi
  2230.  
  2231.   # Start the INET SuperServer
  2232.   # This is a MUST HAVE, so leave it in.
  2233.   if [ -f ${NET}/inetd ]
  2234.   then
  2235.   echo -n "inetd "
  2236.   ${NET}/inetd
  2237.   else
  2238.   echo "no INETD found.  INET cancelled!"
  2239.   exit 1
  2240.   fi
  2241.  
  2242.   # Start the NAMED/BIND name server.
  2243.   # NOTE: you probably don't need to run named.
  2244.   #if [ ! -f ${NET}/named ]
  2245.   #then
  2246.   #        echo -n "named "
  2247.   #        ${NET}/named
  2248.   #fi
  2249.  
  2250.   # Start the ROUTEd server.
  2251.   # NOTE: routed is now obsolete. You should now use gated.
  2252.   #if [ -f ${NET}/routed ]
  2253.   #then
  2254.   #        echo -n "routed "
  2255.   #        ${NET}/routed -q #-g -s
  2256.   #fi
  2257.  
  2258.   # Start the GATEd server.
  2259.   if [ -f ${NET}/gated ]
  2260.   then
  2261.   echo -n "gated "
  2262.   ${NET}/gated
  2263.   fi
  2264.  
  2265.   # Start the RWHO server.
  2266.   if [ -f ${NET}/rwhod ]
  2267.   then
  2268.   echo -n "rwhod "
  2269.   ${NET}/rwhod -t -s
  2270.   fi
  2271.  
  2272.   # Start the U-MAIL SMTP server.
  2273.   if [ -f XXX/usr/lib/umail/umail ]
  2274.   then
  2275.   echo -n "umail "
  2276.   /usr/lib/umail/umail -d7 -bd </dev/null >/dev/null 2>&1 &
  2277.   fi
  2278.  
  2279.   # Start the various INET servers.
  2280.   for server in ${IN_SERV}
  2281.   do
  2282.   if [ -f ${NET}/${server} ]
  2283.   then
  2284.                   echo -n "${server} "
  2285.                   ${NET}/${server}
  2286.   fi
  2287.   done
  2288.  
  2289.   # Start the various SUN RPC servers.
  2290.   if [ -f ${NET}/rpc.portmap ]
  2291.   then
  2292.   if [ -f ${NET}/rpc.ugidd ]
  2293.   then
  2294.                   echo -n "ugidd "
  2295.                   ${NET}/rpc.ugidd -d
  2296.   fi
  2297.   if [ -f ${NET}/rpc.mountd ]
  2298.   then
  2299.                   echo -n "mountd "
  2300.                   ${NET}/rpc.mountd
  2301.   fi
  2302.   if [ -f ${NET}/rpc.nfsd ]
  2303.   then
  2304.                   echo -n "nfsd "
  2305.                   ${NET}/rpc.nfsd
  2306.   fi
  2307.  
  2308.   # Fire up the PC-NFS daemon(s).
  2309.   if [ -f ${NET}/rpc.pcnfsd ]
  2310.   then
  2311.                   echo -n "pcnfsd "
  2312.                   ${NET}/rpc.pcnfsd ${LPSPOOL}
  2313.   fi
  2314.   if [ -f ${NET}/rpc.bwnfsd ]
  2315.   then
  2316.                   echo -n "bwnfsd "
  2317.                   ${NET}/rpc.bwnfsd ${LPSPOOL}
  2318.   fi
  2319.  
  2320.   fi
  2321.   echo network daemons started.
  2322.   # Done!
  2323.  
  2324.   11.3.  Other necessary network configuration files.
  2325.  
  2326.   There are other network configuration files that you will need to
  2327.   configure if you want to have people connect to and use your machine
  2328.   as a host. If you have installed your linux from a distribution then
  2329.   you will probably already have copies of these files so just check
  2330.   them to make sure they look ok and if not you can use the following
  2331.   samples.
  2332.  
  2333.   11.3.1.  A sample /etc/inetd.conf file.
  2334.  
  2335.   Your /etc/rc.d/rc.inet2 file will have started inetd, syslogd and the
  2336.   various rpc servers for you. You will now need to configure the
  2337.   network daemons that will be managed by inetd. inetd uses a
  2338.   configuration file called /etc/inetd.conf.
  2339.  
  2340.   The following is an example of how a simple configuration might look:
  2341.  
  2342.        #
  2343.        # The internal services.
  2344.        #
  2345.        # Authors:      Original taken from BSD UNIX 4.3/TAHOE.
  2346.        #               Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  2347.        #
  2348.        echo    stream tcp nowait root  internal
  2349.        echo    dgram  udp wait   root  internal
  2350.        discard stream tcp nowait root  internal
  2351.        discard dgram  udp wait   root  internal
  2352.        daytime stream tcp nowait root  internal
  2353.        daytime dgram  udp wait   root  internal
  2354.        chargen stream tcp nowait root  internal
  2355.        chargen dgram  udp wait   root  internal
  2356.        #
  2357.        # Standard services.
  2358.        #
  2359.        ftp     stream tcp nowait root  /usr/sbin/tcpd in.ftpd ftpd
  2360.        telnet  stream tcp nowait root  /usr/sbin/tcpd in.telnetd
  2361.        #
  2362.        # Shell, login, exec and talk are BSD protocols.
  2363.        #
  2364.        shell   stream tcp nowait root  /usr/sbin/tcpd in.rshd
  2365.        login   stream tcp nowait root  /usr/sbin/tcpd in.rlogind
  2366.        exec    stream tcp nowait root  /usr/sbin/tcpd in.rexecd
  2367.        talk    dgram  udp wait   root  /usr/sbin/tcpd in.talkd
  2368.        ntalk   dgram  udp wait   root  /usr/sbin/tcpd in.talkd
  2369.        #
  2370.        # Status and Information services.
  2371.        #
  2372.        finger  stream tcp nowait root  /usr/sbin/tcpd in.fingerd
  2373.        systat  stream tcp nowait guest /usr/sbin/tcpd /usr/bin/ps -auwwx
  2374.        netstat stream tcp nowait guest /usr/sbin/tcpd /bin/netstat
  2375.        #
  2376.        # End of inetd.conf.
  2377.  
  2378.   The inetd man page describes what each of the fields are, but put
  2379.   simply, each entry describes what program should be executed when an
  2380.   incoming connection is received on the socket listed as the first
  2381.   entry. Those entries which have incoming where the program name and
  2382.   arguments would be are those services that are provided internally by
  2383.   the inetd program.
  2384.   The conversion between the service name in the first column and the
  2385.   actual socket number it refers to is performed by the /etc/services
  2386.   file.
  2387.  
  2388.   11.3.2.  A sample /etc/services file.
  2389.  
  2390.   The /etc/services file is a simple table of Internet service names and
  2391.   the socket number and protocol is uses. This table is used by a number
  2392.   of programs including inetd, telnet and tcpdump.  It makes life a
  2393.   little easier by allowing us to refer to services by name rather than
  2394.   by number.
  2395.  
  2396.   The following is a sample of what a simple /etc/services file might
  2397.   look like:
  2398.  
  2399.   #
  2400.   # /etc/services - database of service name, socket number
  2401.   #                 and protocol.
  2402.   #
  2403.   # Original Author:
  2404.   #     Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  2405.   #
  2406.   tcpmux     1/tcp
  2407.   echo       7/tcp
  2408.   echo       7/udp
  2409.   discard    9/tcp   sink null
  2410.   discard    9/udp   sink null
  2411.   systat     11/tcp  users
  2412.   daytime    13/tcp
  2413.   daytime    13/udp
  2414.   netstat    15/tcp
  2415.   chargen    19/tcp  ttytst source
  2416.   chargen    19/udp  ttytst source
  2417.   ftp-data   20/tcp
  2418.   ftp        21/tcp
  2419.   telnet     23/tcp
  2420.   smtp       25/tcp  mail
  2421.   time       37/tcp  timserver
  2422.   time       37/udp  timserver
  2423.   name       42/udp  nameserver
  2424.   whois      43/tcp  nicname    # usually to sri-nic
  2425.   domain     53/tcp
  2426.   domain     53/udp
  2427.   finger     79/tcp
  2428.   link       87/tcp  ttylink
  2429.   hostnames  101/tcp hostname   # usually to sri-nic
  2430.   sunrpc     111/tcp
  2431.   sunrpc     111/tcp portmapper # RPC 4.0 portmapper TCP
  2432.   sunrpc     111/udp
  2433.   sunrpc     111/udp portmapper # RPC 4.0 portmapper UDP
  2434.   auth       113/tcp authentication
  2435.   nntp       119/tcp usenet     # Network News Transfer
  2436.   ntp        123/tcp            # Network Time Protocol
  2437.   ntp        123/udp            # Network Time Protocol
  2438.   snmp       161/udp
  2439.   snmp-trap  162/udp
  2440.   exec       512/tcp            # BSD rexecd(8)
  2441.   biff       512/udp comsat
  2442.   login      513/tcp            # BSD rlogind(8)
  2443.   who        513/udp whod       # BSD rwhod(8)
  2444.   shell      514/tcp cmd        # BSD rshd(8)
  2445.   syslog     514/udp            # BSD syslogd(8)
  2446.   printer    515/tcp spooler    # BSD lpd(8)
  2447.   talk       517/udp            # BSD talkd(8)
  2448.   ntalk      518/udp            # SunOS talkd(8)
  2449.   route      520/udp routed     # 521/udp too
  2450.   timed      525/udp timeserver
  2451.   mount      635/udp            # NFS Mount Service
  2452.   pcnfs      640/udp            # PC-NFS DOS Authentication
  2453.   bwnfs      650/udp            # BW-NFS DOS Authentication
  2454.   listen     1025/tcp listener  # RFS remote_file_sharing
  2455.   ingreslock 1524/tcp           # ingres lock server
  2456.   nfs        2049/udp           # NFS File Service
  2457.   irc        6667/tcp           # Internet Relay Chat
  2458.   # End of services.
  2459.  
  2460.   The telnet entry tells us that the telnet service uses socket number
  2461.   23 and the tcp protocol. The domain entry tells us that the Domain
  2462.   Name Service uses socket number 52 and both tcp and udp protocols. You
  2463.   should have an appropriate /etc/services entry for each
  2464.   /etc/inetd.conf entry.
  2465.  
  2466.   11.3.3.  A sample /etc/protocols file.
  2467.  
  2468.   The /etc/protocols file is a table of protocol name with its
  2469.   corresponding protocol number. Since the number of protocols in use is
  2470.   small this file is quite trivial.
  2471.  
  2472.        #
  2473.        # /etc/protocols - database of protocols.
  2474.        #
  2475.        # Original Author:
  2476.        #   Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  2477.        #
  2478.        ip   0   IP   # internet protocol
  2479.        icmp 1   ICMP # internet control message protocol
  2480.        igmp 2   IGMP # internet group multicast protocol
  2481.        ggp  3   GGP  # gateway-gateway protocol
  2482.        tcp  6   TCP  # transmission control protocol
  2483.        pup  12  PUP  # PARC universal packet protocol
  2484.        udp  17  UDP  # user datagram protocol
  2485.        idp  22  IDP
  2486.        raw  255 RAW
  2487.        #
  2488.        # End of protocols.
  2489.  
  2490.   11.4.  Name Resolution.
  2491.  
  2492.   Name Resolution is the process of converting a hostname in the
  2493.   familiar dotted notation (e.g. tsx-11.mit.edu) into an IP address
  2494.   which the network software understands. There are two principal means
  2495.   of achieving this in a typical installation, one simple and one more
  2496.   complex.
  2497.  
  2498.   11.4.1.  /etc/hosts
  2499.  
  2500.   /etc/hosts contains a list of ip addresses and the hostnames they map
  2501.   to. In this way, you can refer to other machines on the network by
  2502.   name, as well as their ip address. Using a nameserver (see section
  2503.   `named') allows you to do the same name->ip address translation
  2504.   automatically. (Running named allows you to run your own nameserver on
  2505.   your linux machine).  This file needs to contain at least an entry for
  2506.   127.0.0.1 with the name localhost. If you're not only using loopback,
  2507.   you need to add an entry for your ip address, with your full hostname
  2508.   (such as loomer.vpizza.com). You may also wish to include entries for
  2509.   your gateways and network addresses.
  2510.  
  2511.   For example, if loomer.vpizza.com has the ip address 128.253.154.32,
  2512.   the /etc/hosts file would contain:
  2513.  
  2514.   # /etc/hosts
  2515.   # List of hostnames and their ip addresses
  2516.   127.0.0.1               localhost
  2517.   128.253.154.32          loomer.vpizza.com loomer
  2518.   # end of hosts
  2519.  
  2520.   Once again you will need to edit this file to suit your own needs. If
  2521.   you're only using loopback, the only line in /etc/hosts should be for
  2522.   127.0.0.1, with both localhost and your hostname after it.
  2523.  
  2524.   Note that in the second line, above, there are two names for
  2525.   128.253.154.32: loomer.vpizza.com and just loomer.  The first name is
  2526.   the full hostname of the system, called the "Fully Qualified Domain
  2527.   Name" and the second is an alias for it. The second allows you to type
  2528.   only rlogin loomer instead of having to type the entire hostname.  You
  2529.   should ensure that you put the Fully Qualified Domain Name in the line
  2530.   before the alias name.
  2531.  
  2532.   11.4.2.  named - do I need thee ?
  2533.  
  2534.   `I dub thee ..'
  2535.  
  2536.   named is the nameserver daemon for many unix-like operating systems.
  2537.   It allows your machine to serve the name lookup requests, not only for
  2538.   itself, but also for other machines on the network, that is, if
  2539.   another machine wants to find the address for `goober.norelco.com' and
  2540.   you have this machines address in your named database, then you can
  2541.   service the request and tell other machines what `goobers' address is.
  2542.  
  2543.   Under older implementations of Linux tcp/ip, to create aliases for
  2544.   machine names, (even for your own machine), you had to run named on
  2545.   your Linux machine to do the hostname to IP address conversion. One
  2546.   problem with this is that named is comparatively difficult to set up
  2547.   properly and maintain.  To solve this problem, a program called
  2548.   hostcvt.build was made available on Linux systems to translate your
  2549.   /etc/hosts file into the many files that make up named database files.
  2550.   However even with this problem overcome, named still uses CPU overhead
  2551.   and causes network traffic.
  2552.  
  2553.   The only reason you may want to run named would be if:
  2554.  
  2555.   ╖  You're setting up a network of machines and need a nameserver for
  2556.      one of them and don't have a nameserver out on the net somewhere.
  2557.  
  2558.   ╖  Your network administrators want you to run your Linux system as a
  2559.      nameserver for some reason.
  2560.  
  2561.   ╖  You have a slow SLIP connection and want to run a small cache-only
  2562.      nameserver on your Linux machine so that you don't have to go out
  2563.      on the serial line for every name lookup that occurs. If you're
  2564.      only going to be connecting to a small number of hosts on the net
  2565.      and you know what their addresses are, then you can put them in
  2566.      your hosts file and not need to query a nameserver at all.
  2567.      Generally namelookup isn't that slow and should work fine over a
  2568.      SLIP link anyway.
  2569.  
  2570.   ╖  You want to run a nameserver for fun and excitement.
  2571.  
  2572.   In general, you do NOT need to run named: this means that you can
  2573.   comment it out from your rc.inet2 file and you don't have to run
  2574.   hostcvt.build. If you want to alias machine names, for example, if you
  2575.   want to refer to loomer.vpizza.com as just loomer, then you can add as
  2576.   alias in /etc/hosts instead. There is no reason to run named unless
  2577.   you have a specific requirement to do so. If you have access to a
  2578.   nameserver, (and your network administrators will tell you its
  2579.   address) and most networks do, then don't bother running named.
  2580.  
  2581.   If you're only using loopback, you can run named and set your
  2582.   nameserver address to 127.0.0.1, but since you are the only machine
  2583.   you can talk to, this would be quite bizarre, as you'd never need to
  2584.   call it.
  2585.  
  2586.   11.4.3.  /etc/networks
  2587.  
  2588.   The /etc/networks file lists the names and addresses of your own, and
  2589.   other, networks. It is used by the route command and allows you to
  2590.   specify a network by name, should you so desire.
  2591.  
  2592.   Every network you wish to add a route to using the route command
  2593.   should have an entry in the /etc/networks file, unless you also
  2594.   specify the -net argument in the route command line.
  2595.  
  2596.   Its format is similar to that of /etc/hosts file above and an example
  2597.   file might look like:
  2598.  
  2599.        #
  2600.        # /etc/networks: list all networks that you wish to add route commands
  2601.        #                for in here
  2602.        #
  2603.        default         0.0.0.0         # default route    - recommended
  2604.        loopnet         127.0.0.0       # loopback network - recommended
  2605.        mynet           128.253.154.0   # Example network CHANGE to YOURS
  2606.        #
  2607.        # end of networks
  2608.  
  2609.   11.4.4.  /etc/host.conf
  2610.  
  2611.   The system has some library functions called the resolver library.
  2612.   This file specifies how your system will lookup host names. It should
  2613.   contain at least the following two lines:
  2614.  
  2615.        order hosts,bind
  2616.        multi on
  2617.  
  2618.   These two lines tell the resolve libraries to first check the
  2619.   /etc/hosts file and then to ask the nameserver (if one is present).
  2620.   The multi entry allows you to have multiple IP addresses for a given
  2621.   machine name in /etc/hosts.
  2622.  
  2623.   This file comes from the implementation of the resolv+ bind library
  2624.   for Linux. You can find further documentation in the resolv+(8) man
  2625.   page if you have it. If you don't, it can be obtained from:
  2626.  
  2627.   sunsite.doc.ic.ac.uk
  2628.  
  2629.   /computing/comms/tcpip/nameserver/resolv+/resolv+2.1.1.tar.Z
  2630.  
  2631.   This file contains the resolv+.8 man page for the resolver library.
  2632.  
  2633.   11.4.5.  /etc/resolv.conf
  2634.  
  2635.   This file actually configures the system name resolver and contains
  2636.   two types of entries: The addresses of your nameservers (if any) and
  2637.   the name of your domain, if you have one. If you're running your own
  2638.   nameserver (i.e running named on your Linux machine), then the address
  2639.   of your nameserver is 127.0.0.1, the loopback address.
  2640.  
  2641.   Your domain name is your fully qualified hostname (if you're a
  2642.   registered machine on the Internet, for example), with the hostname
  2643.   component removed.  That is, if your full hostname is
  2644.   loomer.vpizza.com, then your domain name is vpizza.com, without the
  2645.   hostname loomer.
  2646.  
  2647.   For example, if you machine is goober.norelco.com and has a nameserver
  2648.   at the address 128.253.154.5, then your /etc/resolv.conf file would
  2649.   look like:
  2650.  
  2651.        domain norelco.com
  2652.        nameserver 128.253.154.5
  2653.  
  2654.   You can specify more than one nameserver. Each one must have a
  2655.   nameserver entry in the resolv.conf file.
  2656.  
  2657.   Remember, if you're running on loopback, you don't need a nameserver.
  2658.  
  2659.   11.4.6.  Configuring your Hostname - /etc/HOSTNAME
  2660.  
  2661.   After you have configured everything else, there is one small task
  2662.   that remains, you need to configure your own machine with a name. This
  2663.   is so that application programs like sendmail can know who you are to
  2664.   accept mail and so that your machine can identify itself to other
  2665.   machines that it might be connected to.
  2666.  
  2667.   There are two programs that are used to configure this sort of
  2668.   information, and they are commonly misused. They are hostname and
  2669.   domainname.
  2670.  
  2671.   If you are using a release of net-tools earlier than 1.1.38 then you
  2672.   can include a command in your /etc/rc file that looks like this:
  2673.  
  2674.        /bin/hostname -S
  2675.  
  2676.   and this will cause the hostname command to read a file called
  2677.   /etc/HOSTNAME which it expects will contain a "Fully Qualified Domain
  2678.   Name", that is, your machines hostname including the domainname. It
  2679.   will split the F.Q.D.N. into its DNS hostname and domainname
  2680.   components and set them appropriately for you.
  2681.  
  2682.   For example, the machine above would have the file /etc/HOSTNAME:
  2683.  
  2684.        goober.norelco.com
  2685.  
  2686.   If you are using the hostname that came with net-tools-1.1.38 or
  2687.   later, then you would add a command at the end of your
  2688.   /etc/rc.d/rc.inet1 file like:
  2689.  
  2690.        /bin/hostname goober.norelco.com
  2691.  
  2692.   or if you have upgraded from a previous release, you could add:
  2693.  
  2694.        /bin/hostname -F /etc/HOSTNAME
  2695.  
  2696.   and it would behave in the same way as for the earlier version.
  2697.  
  2698.   The /bin/domainname command is for setting the N.I.S.  domain name NOT
  2699.   the D.N.S. domain name. You do not need to set this unless you are
  2700.   running NIS, which is briefly described later.
  2701.  
  2702.   11.5.  Other files.
  2703.  
  2704.   There are of course many other files in the /etc directory which you
  2705.   may need to dabble with later on. Instead of going into them here, I'm
  2706.   going to provide the bare minimum to get you on the net. More
  2707.   information is available in Olaf's Network Administration Guide. It
  2708.   picks up where this HOWTO ends and some more information will be
  2709.   provided in later versions of this document.
  2710.  
  2711.   Once you have all of the files set up and everything in the right
  2712.   place, you should be able to reboot your new kernel and net away to
  2713.   your hearts content.  However I strongly suggest that you keep a
  2714.   bootable copy of your old kernel and possibly even a `recovery disk'
  2715.   in case something goes wrong so that you can get back in and fix it.
  2716.   You might try HJLu's `single disk boot disk', or `disk1' from a Linux
  2717.   distribution.
  2718.  
  2719.   12.  Advanced Configurations.
  2720.  
  2721.   The configurations above have described how a typical Linux
  2722.   workstation might be configured for normal end-user operation. Some of
  2723.   you will have other requirements which will require slightly more
  2724.   advanced configurations. What follows are examples of some the more
  2725.   common of these.
  2726.  
  2727.   The details of the AX.25, Ottawa PI and generic SCC drivers have been
  2728.   moved to the HAM-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/HAM-
  2729.   HOWTO.html>.
  2730.  
  2731.   12.1.  PPP - Point to Point Protocol.
  2732.  
  2733.   The Point to Point Protocol is a modern and efficient protocol for
  2734.   conveying multiple protocols, tcp/ip for one, across serial links,
  2735.   that a lot of people use in place of SLIP. It offers enhanced
  2736.   functionality, error detection and security options. It corrects a
  2737.   number of deficiencies that are found in SLIP and is suitable for both
  2738.   asynchronous links and synchronous links alike.
  2739.  
  2740.   An important feature of PPP operation is the ability to negotiate such
  2741.   parameters as IP address allocation automatically and with ease and
  2742.   this feature will almost certainly be exploited by your PPP server.
  2743.   This feature allows a PPP client, with a specially formatted frame, to
  2744.   request its address from the server. In this way configuration is
  2745.   somewhat less messy than with SLIP, since this ability to retrieve
  2746.   your address must occur outside of the protocol.
  2747.  
  2748.   The authors of the Linux port are Michael Callahan,
  2749.   <callahan@maths.ox.ac.uk> and  Al Longyear, <longyear@netcom.com>.
  2750.   Most of this information has come from the documentation that
  2751.   accompanies the PPP software. The documentation is quite complete and
  2752.   will tell you much more than I present here.
  2753.  
  2754.   The Linux PPP code is now well and truly a public release. The 1.0.0
  2755.   Linux PPP code is based on Paul Mackerras's free PPP for BSD-
  2756.   derivative operating systems. The 1.0.0 release is based on version
  2757.   2.1.1 of the free PPP code.
  2758.  
  2759.   The PPP code comes in two parts. The first is a kernel module which
  2760.   handles the assembly and disassembly of the frames and the second is a
  2761.   set of protocols called LCP, IPCP, UPAP and CHAP, for negotiating link
  2762.   options, bringing the link into a functioning state and for
  2763.   authentication.
  2764.  
  2765.   12.1.1.  Why would I use PPP in place of SLIP ?
  2766.  
  2767.   You would use PPP in place of SLIP for a few reasons. The most common
  2768.   are:
  2769.  
  2770.      Your Internet Provider supports only PPP
  2771.         The most obvious reason you would use PPP in favour of SLIP is
  2772.         when your Internet Provider supports PPP and not SLIP. Ok, I
  2773.         said it was obvious.
  2774.  
  2775.      You have a normally noisy serial line
  2776.         PPP provides a frame check sequence for each and every frame
  2777.         transmitted, SLIP does not. If you have a noisy serial line and
  2778.         you are using SLIP, your error correction will be performed end
  2779.         to end, that is between your machine and the destination
  2780.         machine, whereas with PPP the error detection occurs locally,
  2781.         between your machine and the PPP server. This makes for faster
  2782.         recovery from errors.
  2783.  
  2784.      You need to make use of some other feature PPP offers.
  2785.         PPP provides a number of features that SLIP does not. You might
  2786.         for example want to carry not only IP, but also DECNET, or
  2787.         AppleTalk frames over your serial link. PPP will allow you to do
  2788.         this.
  2789.  
  2790.   12.1.2.  Where to obtain the PPP software.
  2791.  
  2792.   The PPP software is available from:
  2793.  
  2794.   sunsite.unc.edu
  2795.  
  2796.        /pub/Linux/system/Networking/serial/ppp-2.1.2d.tar.gz
  2797.  
  2798.   This file contains the kernel source and the pppd source and binary.
  2799.   Version 1.0.0 is meant for use with kernels 1.0.x and 1.1.x. Version
  2800.   2.1.2 is intended for kernel version 1.2.x, and the latest 2.2.0 pppd
  2801.   is intended for kernels 1.3.x.
  2802.  
  2803.   12.1.3.  Installing the PPP software.
  2804.  
  2805.   Installation of the PPP software is fairly straightforward.
  2806.  
  2807.   12.1.3.1.  The kernel driver.
  2808.  
  2809.   Some support for ppp has been built into the kernel for some time.  so
  2810.   you are advised to run a modern kernel. Configuring the kernel is
  2811.   fairly easy, the following should work ok:
  2812.  
  2813.        # make config   (remembering to answer yes to PPP support)
  2814.        # make dep
  2815.        # make          (remember to install the new kernel after recompiling!)
  2816.  
  2817.   When you reboot with the new kernel you should see messages at boot
  2818.   time that look something like these:
  2819.  
  2820.        PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS OPTIMIZE_FLAGS
  2821.        TCP compression code copyright 1989 Regents of the University of California
  2822.        PPP line discipline registered.
  2823.  
  2824.   These indicate that the PPP support has in fact been compiled into
  2825.   your kernel.
  2826.  
  2827.   Now, try looking at the contents of /proc/net/dev. You should be
  2828.   careful not to use more or less on the files in the /proc filesystem,
  2829.   as some of them check the filesize first and it is a feature of the
  2830.   /proc filesystem that the files are zero length, so use:
  2831.  
  2832.        # cat /proc/net/dev
  2833.  
  2834.   It should look something like this:
  2835.  
  2836.        Inter-|   Receive                  |  Transmit
  2837.         face |packets errs drop fifo frame|packets errs drop fifo colls carrier
  2838.        lo:        0    0    0    0    0        0    0    0    0     0    0
  2839.        ppp0:      0    0    0    0    0        0    0    0    0     0    0
  2840.        ppp1:      0    0    0    0    0        0    0    0    0     0    0
  2841.        ppp2:      0    0    0    0    0        0    0    0    0     0    0
  2842.        ppp3:      0    0    0    0    0        0    0    0    0     0    0
  2843.  
  2844.   This indicates that the kernel driver is installed correctly.
  2845.  
  2846.   12.1.3.2.  pppd
  2847.  
  2848.   To extract the ppp software and associated utilities the following
  2849.   should work ok:
  2850.  
  2851.        # cd /usr/src
  2852.        # gzip -dc ppp-2.1.2d.tar.gz | tar xvf -
  2853.  
  2854.   If you want to recompile pppd, type make in the pppd subdirectory of
  2855.   the installation.  There will be some warnings when compiling lcp.c,
  2856.   upap.c and chap.c but these are OK.
  2857.  
  2858.   If you want to recompile chat, consult README.linux in the chat
  2859.   directory.
  2860.  
  2861.   To install, type make install in the chat and pppd directories.   This
  2862.   will put chat and pppd binaries in /usr/sbin and the pppd.8 manual
  2863.   page in /usr/man/man8.
  2864.  
  2865.   pppd needs to be run as root. You can either make it suid root or just
  2866.   use it when you are root. make install will try to install it suid
  2867.   root, so if you are root when you try to install it, it should work
  2868.   ok.
  2869.  
  2870.   12.1.4.  Configuring and using the PPP software.
  2871.  
  2872.   Like SLIP, you can configure the PPP software as either a client or a
  2873.   server.  The chat program performs a similar function to the dip
  2874.   program in that it is used to automate the dialing and login procedure
  2875.   to the remote machine, unlike dip though, it does not perform the
  2876.   ioctl to convert the serial line into a PPP line. This is performed by
  2877.   the pppd program. pppd can act as either the client or the server.
  2878.   When used as a client, it normally invokes the chat program to perform
  2879.   the connection and login and then it takes over by performing the
  2880.   ioctl to change the line discipline to ppp, performs a number of steps
  2881.   in configuring your machine to talk to the remote machine and then
  2882.   steps out of the way to let you operate.
  2883.  
  2884.   Please refer to the pppd and chat man pages for more information.
  2885.   Please also refer to the README file that comes with the ppp software,
  2886.   as its description of the operation of these utilities is much more
  2887.   complete than I have described here.
  2888.  
  2889.   12.1.4.1.  Configuring a PPP client by dial-up modem.
  2890.  
  2891.   This is perhaps what most of you will want to do, so it appears first.
  2892.   You would use this configuration when you have a network provider who
  2893.   supports ppp by dialup modem. When you want to establish your
  2894.   connection you simply invoke the pppd program with no arguments. This
  2895.   configuration assumes that your PPP server will assign you an address
  2896.   dynamically. What to do if you have a static address is explained
  2897.   later.
  2898.  
  2899.   The pppd program has a number of command line arguments that govern
  2900.   its behaviour. These arguments can all be placed in a configuration
  2901.   file so that the commands do not appear in the argument list when
  2902.   someone on the system uses the ps command. This is particularly
  2903.   important when pppd invokes the chat program as it needs the password
  2904.   to use to login to the server and you don't normally want this visible
  2905.   to users of the system.
  2906.  
  2907.   The file that pppd uses is called the /etc/ppp/options file.
  2908.  
  2909.   A good starting point for a `typical' PPP installation might look
  2910.   like:
  2911.  
  2912.        connect /etc/ppp/ppp-connect
  2913.        /dev/ttyS1
  2914.        19200
  2915.        crtscts
  2916.        modem
  2917.        lock
  2918.        asyncmap 0
  2919.        defaultroute
  2920.  
  2921.   This specifies that:
  2922.  
  2923.   1. pppd should use the /etc/ppp/ppp-connect script to dial the modem
  2924.      and login.
  2925.  
  2926.   2. pppd should use the ttyS1 device at 19200 bits per second, with
  2927.      crtscts hardware handshaking and respect the modem signals (Carrier
  2928.      Detect particularly) to detect if the modem is still on-line or if
  2929.      the call has finished.
  2930.  
  2931.   3. pppd should create a lock file for the tty device to ensure that
  2932.      other processes do not attempt to open it while pppd is using it.
  2933.  
  2934.   4. That the line is `8 bit clean', that is, that all characters are
  2935.      able to pass freely across the line. The asyncmap option determines
  2936.      which characters the pppd should escape and by default this is set
  2937.      to all control characters. Most modern PPP servers are 8 bit clean
  2938.      and setting the asyncmap to 0 tells pppd not to escape any
  2939.      characters.
  2940.  
  2941.   5. pppd should create a defaultroute via the ppp device when the
  2942.      connection is successfully established.
  2943.  
  2944.   The next step is to configure the /etc/ppp/ppp-connect script.  You
  2945.   would normally use the chat program that comes with pppd within this
  2946.   script as it is very simple to use and quite lightweight.
  2947.  
  2948.   To start, you need to know what the login sequence for your PPP server
  2949.   looks like. The following is a fictional example that I'll base the
  2950.   sample script on:
  2951.  
  2952.        CONNECT 14400
  2953.  
  2954.        Welcome to XYZ PPP server!
  2955.  
  2956.        login:                      <you enter your username>^M
  2957.        password:                   <you enter your password>^M
  2958.  
  2959.        Now entering PPP:
  2960.  
  2961.   The chat program expects as arguments a send/expect sequence, meaning
  2962.   that it wants a series of `what it should expect, followed by what it
  2963.   should send' pairs. The /etc/ppp/ppp-connect should not not be world
  2964.   readable. A sample to deal with the hypothetical example above might
  2965.   look like:
  2966.  
  2967.        #!/bin/sh
  2968.        # A chat script to login to the XYZ PPP server.
  2969.        #
  2970.        NUM=5552857
  2971.        UID=terryd
  2972.        PASSWD=secret1
  2973.        #
  2974.        /usr/sbin/chat -v "" ATZ OK ATDT$NUM CONNECT ogin: $UID word: \\q$PASSWD PPP:
  2975.  
  2976.   I've embellished the script with a sequence to initialise the modem
  2977.   before dialling (the ATZ. It is good practise to initialise your modem
  2978.   to something sensible before you start).
  2979.  
  2980.   Note the "" argument, this means `wait for nothing' and is used when
  2981.   you want to start the sequence by sending something.
  2982.  
  2983.   The -v argument tells chat to be verbose. In this mode it will send a
  2984.   transcript of the logon to syslog so that you can see what is
  2985.   happening. Note the \q before the $PASSWD in the script. This tells
  2986.   chat not to echo the following text to syslog. In this way your
  2987.   password won't be logged in the system log.
  2988.  
  2989.   You would want to use the chmod 600 /etc/ppp/ppp-connect to ensure
  2990.   that other users cannot read the script file and obtain your password.
  2991.  
  2992.   To start your PPP session with the above configuration you would need
  2993.   only type: pppd and it all should happen automagically. You should
  2994.   observe the logon occurring in the system log and when it is finished
  2995.   you should see a default route in your routing table when you use the:
  2996.   route -n command pointed via your new ppp0 device.
  2997.  
  2998.   If you use a static IP address you can specify that by including a
  2999.   line similar to the following in your /etc/ppp/options file:
  3000.  
  3001.        nnn.nnn.nnn.nnn:
  3002.  
  3003.   Where: nnn.nnn.nnn.nnn is your IP addresss. Note this will only work
  3004.   if your Internet Service Providers is configured to allow you to do
  3005.   so. The colon `:' is important.
  3006.  
  3007.   There are many other options you may want to read about that you can
  3008.   include in your options file. Please refer to the pppd and chat man
  3009.   pages for more information.
  3010.  
  3011.   12.1.4.2.  Configuring a PPP client via a leased line.
  3012.  
  3013.   Configuring a PPP client via a leased line is very simple. You will
  3014.   still use the pppd program, but since you won't need to establish the
  3015.   modem link the arguments to the chat program can be much simpler.
  3016.  
  3017.   The example I'm presenting here assumes that the ppp server doesn't
  3018.   require any special login procedure. I do this because every login
  3019.   procedure will be different and if you are simply running a local
  3020.   connection then it is possible that you might have it set up this way.
  3021.  
  3022.        pppd defaultroute noipdefault debug \
  3023.        kdebug 2 /dev/cua0 9600
  3024.  
  3025.   This will open the serial device, generate the ioctl to change it into
  3026.   a pppdevice, set your default route via the ppp interface.  The
  3027.   noipdefault argument instructs the pppd program to request the address
  3028.   to use for this device from the server. Debug messages will go to
  3029.   syslog. The kdebug 2 argument causes the debug messages to be set to
  3030.   level 2, this will give you slightly more information on what is going
  3031.   on. It will use /dev/cua0 at 9600 bps.
  3032.  
  3033.   If your ppp server does require some sort of login procedure, you can
  3034.   easily use the chat program as in the example for the dialup server to
  3035.   perform that function for you.
  3036.  
  3037.   Please refer to the pppd and chat man pages for more information.
  3038.   Please also refer to the README file that comes with the ppp software,
  3039.   as its description of the above is much more complete than I have
  3040.   described here.
  3041.  
  3042.   12.1.4.3.  Configuring a PPP server.
  3043.  
  3044.   Configuring a PPP server is similar to establishing a SLIP server.
  3045.   You can create a special `ppp' account, which uses an executable
  3046.   script as its login shell. The /etc/passwd entry might look like:
  3047.  
  3048.        ppp:EncPasswd:102:50:PPP client login:/tmp:/etc/ppp/ppplogin
  3049.  
  3050.   and the /etc/ppp/ppplogin script might look like:
  3051.  
  3052.        #!/bin/sh
  3053.        exec /usr/sbin/pppd passive :192.1.2.23
  3054.  
  3055.   The address that you provide will be the address that the calling
  3056.   machine will be assigned.
  3057.  
  3058.   Naturally, if you want multiple users to have simultaneous access you
  3059.   would have to create a number of startup scripts and individual
  3060.   accounts for each to use, as you can only put one ip address in each
  3061.   script.
  3062.  
  3063.   12.1.5.  Where to obtain more information on PPP, or report bugs.
  3064.  
  3065.   The PPP-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html> is an
  3066.   excellent reference to obtain more comprehensive information than I
  3067.   have provided here.
  3068.  
  3069.   Most discussion on PPP for Linux takes place on the PPP mailing list.
  3070.  
  3071.   To join the Linux linux-ppp channel on the mail list server, send mail
  3072.   to:
  3073.  
  3074.        Majordomo@vger.rutgers.edu
  3075.  
  3076.   with the line:
  3077.  
  3078.        subscribe linux-ppp
  3079.  
  3080.   in the message body. The subject line is ignored.
  3081.  
  3082.   Please remember that when you are reporting bugs or problems you
  3083.   should include as much information relevant to the problem as you can
  3084.   to assist those that will help you understand your problem.
  3085.  
  3086.   You might also like to check out:
  3087.  
  3088.   RFCS 1548, 1331, 1332, 1333 and 1334. These are the definitive
  3089.   documents for PPP.
  3090.  
  3091.   W. Richard Stevens also describes PPP in his book `TCP/IP Illustrated
  3092.   Volume 1', (Addison-Wessley, 1994, ISBN 0-201-63346-9).
  3093.  
  3094.   12.2.  Configuring Linux as a Slip Server.
  3095.  
  3096.   If you have a machine that is perhaps network connected, that you'd
  3097.   like other people be able to dial into and provide network services,
  3098.   then you will need to configure your machine as a server. If you want
  3099.   to use SLIP as the serial line protocol, then currently you have three
  3100.   options as to how to configure your Linux machine as a SLIP server. My
  3101.   preference would be to use the first presented, sliplogin, as it seems
  3102.   the easiest to configure and understand, but I will present a summary
  3103.   of each, so you make your mind.
  3104.  
  3105.   12.2.1.  Slip Server using sliplogin.
  3106.  
  3107.   sliplogin is a program that you can use in place of the normal login
  3108.   shell for SLIP users that converts the terminal line into a SLIP line.
  3109.   It allows you to configure your Linux machine as either a static
  3110.   address server, users get the same address everytime they call in, or
  3111.   a dynamic address server, where users get an address allocated for
  3112.   them which will not necessarily be the same as the last time they
  3113.   called.
  3114.  
  3115.   The caller will login as per the standard login process, entering
  3116.   their username and password, but instead of being presented with a
  3117.   shell after their login, sliplogin is executed which searches its
  3118.   configuration file (/etc/slip.hosts) for an entry with a login name
  3119.   that matches that of the caller. If it locates one, it configures the
  3120.   line as an 8bit clean line, and uses an ioctl call to convert the line
  3121.   discipline to SLIP. When this process is complete, the last stage of
  3122.   configuration takes place, where sliplogin invokes a shell script
  3123.   which configures the SLIP interface with the relevant ip address,
  3124.   netmask and sets appropriate routing in place.  This script is usually
  3125.   called /etc/slip.login, but in a similar manner to getty, if you have
  3126.   certain callers that require special initialisation, then you can
  3127.   create configuration scripts called /etc/slip.login.loginname that
  3128.   will be run instead of the default specifically for them.
  3129.  
  3130.   There are either three or four files that you need to configure to get
  3131.   sliplogin working for you. I will detail how and where to get the
  3132.   software and how each is configured in detail. The files are:
  3133.  
  3134.   ╖  /etc/passwd, for the dialin user accounts.
  3135.  
  3136.   ╖  /etc/slip.hosts, to contain the information unique to each dial-in
  3137.      user.
  3138.  
  3139.   ╖  /etc/slip.login, which manages the configuration of the routing
  3140.      that needs to be performed for the user.
  3141.  
  3142.   ╖  /etc/slip.tty, which is required only if you are configuring your
  3143.      server for dynamic address allocation and contains a table of
  3144.      addresses to allocate
  3145.  
  3146.   ╖  /etc/slip.logout, which contains commands to clean up after the
  3147.      user has hung up or logged out.
  3148.  
  3149.   12.2.1.1.  Where to get sliplogin
  3150.  
  3151.   sliplogin can be obtained from:
  3152.  
  3153.   sunsite.unc.edu
  3154.  
  3155.        /pub/Linux/system/Network/serial/sliplogin-2.0.tar.gz
  3156.  
  3157.   The tar file contains both source, precompiled binaries and a man
  3158.   page.
  3159.  
  3160.   To ensure that only authorised users will be able to run sliplogin
  3161.   program, you should add an entry to your /etc/group file similar to
  3162.   the following:
  3163.  
  3164.    ..
  3165.   SLIP::13:radio,fred
  3166.    ..
  3167.  
  3168.   When you install the sliplogin package, the Makefile will change the
  3169.   group ownership of the sliplogin program to SLIP, and this will mean
  3170.   that only users who belong to that group will be able to execute it.
  3171.   The example above will allow only users radio and fred to execute
  3172.   sliplogin.
  3173.  
  3174.   To install the binaries into your /sbin directory and the man page
  3175.   into section 8, do the following:
  3176.  
  3177.        # cd /usr/src
  3178.        # gzip -dc .../sliplogin-2.0.tar.gz | tar xvf -
  3179.        # <..edit the Makefile if you don't use shadow passwords..>
  3180.        # make install
  3181.  
  3182.   If you want to recompile the binaries before installation, add a make
  3183.   clean before the make install. If you want to install the binaries
  3184.   somewhere else, you will need to edit the Makefile install rule.
  3185.  
  3186.   Please read the README files that come with the package for more
  3187.   information.
  3188.  
  3189.   12.2.1.2.  Configuring /etc/passwd for Slip hosts.
  3190.  
  3191.   Normally you would create some special logins for Slip callers in your
  3192.   /etc/passwd file. A convention commonly followed is to use the
  3193.   hostname of the calling host with a capital `S' prefixing it. So, for
  3194.   example, if the calling host is called radio then you could create a
  3195.   /etc/passwd entry that looked like:
  3196.  
  3197.        Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin
  3198.  
  3199.   It doesn't really matter what the account is called, so long as it is
  3200.   meaningful to you.
  3201.  
  3202.   Note: the caller doesn't need any special home directory, as they will
  3203.   not be presented with a shell from this machine, so /tmp is a good
  3204.   choice.  Also note that sliplogin is used in place of the normal login
  3205.   shell.
  3206.  
  3207.   12.2.1.3.  Configuring /etc/slip.hosts
  3208.  
  3209.   The /etc/slip.hosts file is the file that sliplogin searches for
  3210.   entries matching the login name to obtain configuration details for
  3211.   this caller. It is this file where you specify the ip address and
  3212.   netmask that will be assigned to the caller and configured for their
  3213.   use. Sample entries for two hosts, one a static configuration for host
  3214.   radio and another, a dynamic configuration for user host albert might
  3215.   look like:
  3216.  
  3217.        #
  3218.        Sradio    44.136.8.99    44.136.8.100   0xffffff00   normal
  3219.        Salbert   44.136.8.99    DYNAMIC        0xffffff00   compressed
  3220.        #
  3221.  
  3222.   The /etc/slip.hosts file entries are:
  3223.  
  3224.   1. the login name of the caller.
  3225.  
  3226.   2. ip address of the server machine, ie this machine.
  3227.  
  3228.   3. ip address that the caller will be assigned. If this field is coded
  3229.      DYNAMIC then an ip address will be allocated based on the
  3230.      information contained in your /etc/slip.tty file discussed later.
  3231.      Note: you must be using at least version 1.3 of sliplogin for this
  3232.      to work.
  3233.  
  3234.   4. the netmask assigned to the calling machine in hexadecimal notation
  3235.      eg 0xffffff00 for a Class C network mask.
  3236.  
  3237.   5. optional parameters to enable/disable compression and other
  3238.      features.
  3239.  
  3240.   Note: You can use either hostnames or IP addresses in dotted decimal
  3241.   notation for fields 2 and 3. If you use hostnames then those hosts
  3242.   must be resolvable, that is, your machine must be able to locate an ip
  3243.   address for those hostnames, otherwise the script will fail when it is
  3244.   called. You can test this by trying trying to telnet to the hostname,
  3245.   if you get the Trying nnn.nnn.nnn... message then your machine has
  3246.   been able to find an ip address for that name. If you get the message
  3247.   Unknown host, then it has not. If not, either use ip addresses in
  3248.   dotted decimal notation, or fix up your name resolver configuration
  3249.   (See section Name Resolution).
  3250.  
  3251.   The most commonly used optional parameters for the opt1 and opt2
  3252.   fields are:
  3253.  
  3254.      normal
  3255.         to enable normal uncompressed SLIP.
  3256.  
  3257.      compressed
  3258.         to enable van Jacobsen header compression (cSLIP)
  3259.  
  3260.   Naturally these are mutually exclusive, you can use one or the other.
  3261.   For more information on the other options available, refer to the man
  3262.   pages.
  3263.  
  3264.   12.2.1.4.  Configuring the /etc/slip.login file.
  3265.  
  3266.   After sliplogin has searched the /etc/slip.hosts and found a matching
  3267.   entry, it will attempt to execute the /etc/slip.login file to actually
  3268.   configure the SLIP interface with its ip address and netmask.
  3269.  
  3270.   The sample /etc/slip.login file supplied with the sliplogin package
  3271.   looks like this:
  3272.  
  3273.        #!/bin/sh -
  3274.        #
  3275.        #       @(#)slip.login  5.1 (Berkeley) 7/1/90
  3276.        #
  3277.        # generic login file for a SLIP line.  sliplogin invokes this with
  3278.        # the parameters:
  3279.        #     $1       $2        $3       $4         $5        $6    $7-n
  3280.        #   SLIPunit ttyspeed loginname local-addr remote-addr mask opt-args
  3281.        #
  3282.        /sbin/ifconfig $1 $4 pointopoint $5 mtu 1500 -trailers up
  3283.        /sbin/route add $5
  3284.        arp -s $5 <hw_addr> pub
  3285.        exit 0
  3286.        #
  3287.  
  3288.   You will note that this script simply uses the ifconfig and route
  3289.   commands to configure the SLIP device with its ipaddress, remote ip
  3290.   address and netmask and creates a route for the remote address via the
  3291.   SLIP device. Just the same as you would if you were using the slattach
  3292.   command.
  3293.  
  3294.   Note also the use of Proxy ARP to ensure that other hosts on the same
  3295.   ethernet as the server machine will know how to reach the dial-in
  3296.   host.  The <hw_addr> field should be the hardware address of the
  3297.   ethernet card in the machine. If your server machine isn't on an
  3298.   ethernet network then you can leave this line out completely.
  3299.  
  3300.   12.2.1.5.  Configuring the /etc/slip.logout file.
  3301.  
  3302.   When the call drops out, you want to ensure that the serial device is
  3303.   restored to its normal state so that future callers will be able to
  3304.   login correctly.  This is achieved with the use of the
  3305.   /etc/slip.logout file. It is quite simple in format.
  3306.  
  3307.        #!/bin/sh -
  3308.        #
  3309.        #               slip.logout
  3310.        #
  3311.        /sbin/ifconfig $1 down
  3312.        /sbin/route del $5
  3313.        arp -d $5
  3314.        exit 0
  3315.        #
  3316.  
  3317.   All it does is `down' the interface and delete the manual route
  3318.   previously created. It also uses the arp command to delete any proxy
  3319.   arp put in place, again, you don't need the arp command in the script
  3320.   if your server machine does not have an ethernet port.
  3321.  
  3322.   12.2.1.6.  Configuring the /etc/slip.tty file.
  3323.  
  3324.   If you are using dynamic ip address allocation (have any hosts
  3325.   configured with the DYNAMIC keyword in the /etc/slip.hosts file, then
  3326.   you must configure the /etc/slip.tty file to list what addresses are
  3327.   assigned to what port. You only need this file if you wish your server
  3328.   to dynamically allocate addresses to users.
  3329.   The file is a table that lists the tty devices that will support dial-
  3330.   in SLIP connections and the ip address that should be assigned to
  3331.   users who call in on that port.
  3332.  
  3333.   Its format is as follows:
  3334.  
  3335.        # slip.tty    tty -> IP address mappings for dynamic SLIP
  3336.        # format: /dev/tty?? xxx.xxx.xxx.xxx
  3337.        #
  3338.        /dev/ttyS0      192.168.0.100
  3339.        /dev/ttyS1      192.168.0.101
  3340.        #
  3341.  
  3342.   What this table says is that callers that dial in on port /dev/ttyS0
  3343.   who have their remote address field in the /etc/slip.hosts file set to
  3344.   DYNAMIC will be assigned an address of 192.168.0.100.
  3345.  
  3346.   In this way you need only allocate one address per port for all users
  3347.   who do not require an dedicated address for themselves. This helps you
  3348.   keep the number of addresses you need down to a minimum to avoid
  3349.   wastage.
  3350.  
  3351.   12.2.2.  Slip Server using dip.
  3352.  
  3353.   Let me start by saying that some of the information below came from
  3354.   the dip man pages, where how to run Linux as a SLIP server is briefly
  3355.   documented. Please also beware that the following has been based on
  3356.   the dip337j-uri.tgz package and probably will not apply to other
  3357.   versions of dip.
  3358.  
  3359.   dip has an input mode of operation, where it automatically locates an
  3360.   entry for the user who invoked it and configures the serial line as a
  3361.   SLIP link according to information it finds in the /etc/diphosts file.
  3362.   This input mode of operation is activated by invoking dip as diplogin.
  3363.   This therefore is how you use dip as a SLIP server, by creating
  3364.   special accounts where diplogin is used as the login shell.
  3365.  
  3366.   The first thing you will need to do is to make a symbolic link as
  3367.   follows:
  3368.  
  3369.        # ln -sf /usr/sbin/dip /usr/sbin/diplogin
  3370.  
  3371.   You then need to add entries to both your /etc/passwd and your
  3372.   /etc/diphosts files. The entries you need to make are formatted as
  3373.   follows:
  3374.  
  3375.   To configure Linux as a SLIP server with dip, you need to create some
  3376.   special SLIP accounts for users, where dip (in input mode) is used as
  3377.   the login shell. A suggested convention is that of having all SLIP
  3378.   accounts begin with a capital `S', eg `Sfredm'.
  3379.  
  3380.   A sample /etc/passwd entry for a SLIP user looks like:
  3381.  
  3382.   Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
  3383.   ^^         ^^        ^^  ^^   ^^   ^^   ^^
  3384.   |          |         |   |    |    |    \__ diplogin as login shell
  3385.   |          |         |   |    |    \_______ Home directory
  3386.   |          |         |   |    \____________ User Full Name
  3387.   |          |         |   \_________________ User Group ID
  3388.   |          |         \_____________________ User ID
  3389.   |          \_______________________________ Encrypted User Password
  3390.   \__________________________________________ Slip User Login Name
  3391.  
  3392.   After the user logs in, the login(1) program, if it finds and verifies
  3393.   the user ok, will execute the diplogin command. dip, when invoked as
  3394.   diplogin knows that it should automatically assume that it is being
  3395.   used a login shell. When it is started as diplogin the first thing it
  3396.   does is use the getuid() function call to get the userid of whoever
  3397.   has invoked it. It then searches the /etc/diphosts file for the first
  3398.   entry that matches either the userid or the name of the tty device
  3399.   that the call has come in on and configures itself appropriately.  By
  3400.   judicious decision as to whether to give a user an entry in the
  3401.   diphosts file, or whether to let the user be given the default
  3402.   configuration you can build your server in such a way that you can
  3403.   have a mix of static and dynamically assigned address users.
  3404.  
  3405.   dip will automatically add a `Proxy-ARP' entry if invoked in input
  3406.   mode, so you do not need to worry about manually adding such entries.
  3407.  
  3408.   12.2.2.1.  Configuring /etc/diphosts
  3409.  
  3410.   /etc/diphosts is used by dip to lookup preset configurations for
  3411.   remote hosts. These remote hosts might be users dialing into your
  3412.   linux machine, or they might be for machines that you dial into with
  3413.   your linux machine.
  3414.  
  3415.   The general format for /etc/diphosts is as follows:
  3416.  
  3417.         ..
  3418.        Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
  3419.        ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
  3420.         ..
  3421.  
  3422.   The fields are:
  3423.  
  3424.   1. login name: as returned by getpwuid(getuid()) or tty name.
  3425.  
  3426.   2. unused: compat. with passwd
  3427.  
  3428.   3. Remote Address: IP address of the calling host, either numeric or
  3429.      by name
  3430.  
  3431.   4. Local Address: IP address of this machine, again numeric or by name
  3432.  
  3433.   5. Netmask: in dotted decimal notation
  3434.  
  3435.   6. Comment field: put whatever you want here.
  3436.  
  3437.   7. protocol: Slip, CSlip etc.
  3438.  
  3439.   8. MTU: decimal number
  3440.  
  3441.   An example /etc/net/diphosts entry for a remote SLIP user might be:
  3442.  
  3443.        Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296
  3444.  
  3445.   which specifies a SLIP link with remote address of 145.71.34.1 and MTU
  3446.   of 296, or:
  3447.  
  3448.        Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
  3449.  
  3450.   which specifies a cSLIP-capable link with remote address 145.71.34.1
  3451.   and MTU of 1006.
  3452.  
  3453.   Therefore, all users who you wish to be allowed a statically allocated
  3454.   dial-up IP access should have an entry in the /etc/diphosts and if you
  3455.   want users who call a particular port to have their details
  3456.   dynamically allocated you must have an entry for the tty device and do
  3457.   not configure a user based entry. You should remember to configure at
  3458.   least one entry for each tty device that your dialup users use to
  3459.   ensure that a suitable configuration is available for them regardless
  3460.   of which modem they call in on.
  3461.  
  3462.   When a user logs in, they will receive a normal login and password
  3463.   prompt, at which they should enter their SLIP-login userid and
  3464.   password. If they check out ok, then the user will see no special
  3465.   messages, they should just change into SLIP mode at their end and then
  3466.   they should be able to connect ok and be configured with the
  3467.   parameters from the diphosts file.
  3468.  
  3469.   12.2.3.  SLIP server using the dSLIP package.
  3470.  
  3471.   Matt Dillon <dillon@apollo.west.oic.com> has written a package that
  3472.   does not only dial-in but also dial-out SLIP. Matt's package is a
  3473.   combination of small programs and scripts that manage your connections
  3474.   for you. You will need to have tcsh installed as at least one of the
  3475.   scripts requires it. Matt supplies a binary copy of the expect utility
  3476.   as it too is needed by one of the scripts. You will most likely need
  3477.   some experience with expect to get this package working to your
  3478.   liking, but don't let that put you off.
  3479.  
  3480.   Matt has written a good set of installation instructions in the README
  3481.   file, so I won't bother repeating them.
  3482.  
  3483.   You can get the dSLIP package from its home site at:
  3484.  
  3485.   apollo.west.oic.com
  3486.  
  3487.        /pub/linux/dillon_src/dSLIP203.tgz
  3488.  
  3489.   or from:
  3490.  
  3491.   sunsite.unc.edu
  3492.  
  3493.        /pub/Linux/system/Network/serial/dSLIP203.tgz
  3494.  
  3495.   Read the README file and create the /etc/passwd and /etc/group entries
  3496.   before doing a make install.
  3497.  
  3498.   12.3.  Using the Automounter Daemon - AMD.
  3499.  
  3500.   This section has been supplied by Mitch DSouza and I've included it
  3501.   with minimal editing, as he supplied it. Thanks Mitch.
  3502.  
  3503.   12.3.1.  What is an automounter and why would I use one ?
  3504.  
  3505.   An automounter provides a convenient means of mounting filesystems on
  3506.   demand, i.e. when required. This will reduce both the server and the
  3507.   client load and provides a great deal of flexibility even with non-NFS
  3508.   mounts. It also offers a redundancy mechanism whereby a mount point
  3509.   will automatically switch to a secondary server should a primary one
  3510.   be unavailable. A rather useful mount called the union mount gives the
  3511.   automounter the ability to merge the contents of multiple directories
  3512.   into a single directory. The documentation MST be read thoroughly to
  3513.   make full use of its extensive capabilities.
  3514.  
  3515.   A few important points must be remembered - (in no particular order):
  3516.  
  3517.   ╖  amd maps are not compatible with Sun maps, which in turn are not
  3518.      compatible with HP maps ad infinitum. The point here however is
  3519.      that amd is freely available and compatible with all the systems
  3520.      mentioned above and more, thus giving you the ability to share maps
  3521.      if amd is installed throughout your network. Mitch uses it with a
  3522.      mixture of Linux/Dec/NeXt/Sun machines.
  3523.  
  3524.   ╖  Sun automount maps can be converted to amd style maps by using the
  3525.      perl script in the contrib directory - automount2amd.pl.
  3526.  
  3527.   ╖  You must have the portmapper running before starting amd.
  3528.  
  3529.   ╖  UFS mounts do not timeout.
  3530.  
  3531.   ╖  UFS mounts, in the case of Linux only, have been extended to deal
  3532.      with all varieties of native filesystems (i.e. minix, ext, ext2,
  3533.      xiafs ...) with the default being minix. This undocumented feature
  3534.      is accessed in the opts option like:
  3535.  
  3536.         ..., opts:=type=msdos,conv=auto
  3537.  
  3538.   ╖  Do not mount over existing directories unless you use a direct
  3539.      automount option, otherwise it is like mounting your disk on /home
  3540.      when some user directory is /home/fred.
  3541.  
  3542.   ╖  Always turn on full logging with the `-x all' option to amd if you
  3543.      have any troubles. Check also what the command:
  3544.  
  3545.        % amq -ms
  3546.  
  3547.   reports, as it will indicate problems as they occur.
  3548.  
  3549.   ╖  GNU getopt() is too clever for its own good sometimes. You should
  3550.      always use `--' before the non-options e.g.
  3551.  
  3552.        # /etc/amd -x all -l syslog -a /amd -- /net /etc/amd.net
  3553.  
  3554.   12.3.2.  Where to get AMD, the automounter daemon.
  3555.  
  3556.   amd can be obtained from:
  3557.  
  3558.   sunsite.unc.edu
  3559.  
  3560.        /pub/Linux/system/Misc/mount/amd920824upl67.tar.gz
  3561.  
  3562.   This contains ready-to-run binaries, full sources and documentation in
  3563.   texinfo format.
  3564.  
  3565.   12.3.3.  An example AMD configuration.
  3566.  
  3567.   You do not configure the automounter from the /etc/fstab file, which
  3568.   you will already be using to contain information about your
  3569.   filesystems, instead it is command line driven.
  3570.  
  3571.   To mount two nfs filesystems using your /etc/fstab file you would use
  3572.   two entries that looked like:
  3573.  
  3574.        server-1:/export/disk  /nfs/server-1  nfs  defaults
  3575.        server-2:/export/disk  /nfs/server-2  nfs  defaults
  3576.  
  3577.   i.e. you were nfs mounting server-1 and server-2 on your linux disk on
  3578.   the /nfs/server-1 and /nfs/server-2 directories.
  3579.  
  3580.   After commenting out, or deleting the above lines from your /etc/fstab
  3581.   file, you could amd to perform the same task with the following
  3582.   syntax:
  3583.  
  3584.   /etc/amd -x all -l syslog -a /amd -- /nfs /etc/amd.server
  3585.   |      | |    | |       | |     |  | |  | |             |
  3586.   |      | |    | |       | |     |  | |  | |             |
  3587.   `------' `----' `-------' `-----' -' `--' `-------------'
  3588.   |        |      |         |      |   |    |
  3589.   (1)      (2)    (3)       (4)    (5) (6)  (7)
  3590.  
  3591.   Where:
  3592.  
  3593.   1. The full amd binary path (obviously optional) depending on your
  3594.      $PATH setting, so just `amd' may be specified here.
  3595.  
  3596.   2. `-x all' means turn full logging on. Read the documentation for the
  3597.      other logging levels
  3598.  
  3599.   3. `-l syslog' means log the message via the syslog daemon. This could
  3600.      mean put it to a file, dump it, or pass it, to an unused tty
  3601.      console. This (syslog) can be changed to the name of a file, i.e.
  3602.      `-l foo' will record to a file called foo.
  3603.  
  3604.   4. `-a /amd' means use the /amd directory as a temporary place for
  3605.      automount points. This directory is created automatically by amd
  3606.      and should be removed before starting amd in your /etc/rc scripts.
  3607.  
  3608.   5. `--' means tell getopt() to stop attempting to parse the rest of
  3609.      the command line for options. This is especially useful when
  3610.      specifying the `type:=' options on the command line, otherwise
  3611.      getopt() tries to decode it incorrectly.
  3612.  
  3613.   6. `/nfs' is the real nfs mount point. Again this is automatically
  3614.      created and should not generally contain subdirectories unless the
  3615.      `type:=direct' option is used.
  3616.  
  3617.   7. The amd map (i.e. a file) named `amd.server' contains the lines:
  3618.  
  3619.        # /etc/amd.server
  3620.        /defaults    opts:=rw;type:=nfs
  3621.        server-1     rhost:=server-1;rfs:=/export/disk
  3622.        server-2     rhost:=server-2;rfs:=/export/disk
  3623.  
  3624.   Once started and successfully running, you can query the status of the
  3625.   mounts with the command:
  3626.  
  3627.        % amq -ms
  3628.  
  3629.   Now if you say:
  3630.  
  3631.        % ls /nfs
  3632.  
  3633.   you should see no files. However the command:
  3634.  
  3635.        % ls /nfs/server-1
  3636.  
  3637.   will mount the host `server-1' automatically. voila! amd is running.
  3638.   After the default timeout has expired, this will automatically be
  3639.   unmounted. Your /etc/password file could contain entries like:
  3640.  
  3641.         ...
  3642.        linus:EncPass:10:0:God:/nfs/server-1/home/linus:/bin/sh
  3643.        mitch:EncPass:20:10:Mitch DSouza:/nfs/server-1/home/mitch:/bin/tcsh
  3644.        matt:EncPass:20:10:Matt Welsh:/nfs/server-1/home/matt:/bin/csh
  3645.  
  3646.   which would mean that when Linus, Matt, or Mitch are logged in, their
  3647.   home directory will be remotely mounted from the appropriate server
  3648.   and unmounted when they log out.
  3649.  
  3650.   12.4.  Using Linux as a router
  3651.  
  3652.   Linux will function just fine as a router. You should run a routing
  3653.   daemon such as gated, or if you have simple routing requirements use
  3654.   hard coded routes. If you are using a late version kernel (1.1.*) then
  3655.   you should ensure that you have answered `y' to:
  3656.  
  3657.        IP forwarding/gatewaying (CONFIG_IP_FORWARD) [y] y
  3658.  
  3659.   when building your kernel.
  3660.  
  3661.   Olaf Kirch's Network Administrators Guide discusses network design and
  3662.   routing issues and you should read it for more information. A
  3663.   reference to it is in the "Related Documentation" section of this
  3664.   document.
  3665.  
  3666.   12.5.  NIS - Sun Network Information System.
  3667.  
  3668.   There is now an NIS-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/NIS-
  3669.   HOWTO.html> which you should read if you are interested in using NIS.
  3670.   It details how to obtain, install and configure the NIS system for
  3671.   Linux.
  3672.  
  3673.   13.  Experimental and Developmental modules.
  3674.  
  3675.   There are a number of people developing new features and modules for
  3676.   the Linux networking code. Some of these are in quite an advanced
  3677.   state (read working) and it is these that I intend to include in this
  3678.   section until they are standard release code, when they will be moved
  3679.   forward.
  3680.   The AX25 section has been relocated into the HAM-HOWTO
  3681.   <http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html> because it was
  3682.   fairly specific to Amateur Radio.
  3683.  
  3684.   13.1.  snmp agent.
  3685.  
  3686.   There is an experimental snmp agent for linux, ported from the cmu-
  3687.   snmp source by Erik Schoenfelder, <schoenfr@ibr.cs.tu-bs.de>.
  3688.  
  3689.   It is available from:
  3690.  
  3691.   ftp.ibr.cs.tu-bs.de
  3692.  
  3693.        /pub/local/cmu-snmp2.1.2l3-src.tar.gz
  3694.  
  3695.   Please read the file called cmu-snmp2.1.2l3.README, as it contains
  3696.   information that you will need to know about the package.
  3697.  
  3698.   This package provides a nearly complete MIB-II variable set. and parts
  3699.   of the host MIB. Setting of system group variables is provided. The
  3700.   private community string is settable in the config file.
  3701.  
  3702.   nstat.tar.gz contains a formatter of the output from /proc/net/snmp
  3703.   called nstat.
  3704.  
  3705.   You will need Linux v1.1.60 and libc v4.6.27 or higher to compile and
  3706.   run the agent.
  3707.  
  3708.   13.2.  Experimental Token Ring driver
  3709.  
  3710.   An experimental Token Ring driver is being developed by Peter De
  3711.   Schrijver <stud11@cc4.kuleuven.ac.be>. His latest version, at the time
  3712.   of writing is available in the Linux 1.3.* kernel release kernels.
  3713.   For older kernel versions the driver patches are located at:
  3714.  
  3715.   linux3.cc.kuleuven.ac.be
  3716.  
  3717.        /pub/Linux/TokenRing/TokenRing.patch-1.2.0.gz
  3718.  
  3719.   ftp.cs.kuleuven.ac.be
  3720.  
  3721.        /pub/unix/linux/TokenRing.patch-1.1.64.gz
  3722.  
  3723.   There are a number of patch files against various kernel versions.
  3724.   Just pick the one that suits your kernel.
  3725.  
  3726.   Note also that there are versions of the network tools to suit Token
  3727.   Ring in the same directory at linux3.cc.kuleven.ac.be.
  3728.  
  3729.   Most boards based on IBM's TROPIC chipset should work now. The
  3730.   following boards are known to be working with the driver :
  3731.  
  3732.   ╖  IBM Token Ring Adapter II
  3733.  
  3734.   ╖  IBM Token Ring 16/4 Adapter
  3735.  
  3736.   ╖  IBM Token Ring Adapter/A
  3737.  
  3738.   ╖  IBM Token Ring 16/4 Adapter/A
  3739.  
  3740.   ╖  HyperRing Classic 16/4
  3741.  
  3742.   Boards which use the TI chipset or busmastering DMA won't work with
  3743.   the current driver. However someone is working on a driver for the IBM
  3744.   busmaster adapters.
  3745.  
  3746.   13.3.  V.35 interface board
  3747.  
  3748.   V.35 is a C.C.I.T.T. standard interface that provides a high speed
  3749.   balanced serial interface suitable for speeds up to about 2 Mbps. The
  3750.   use of differential pair balanced transmission allows the V.35
  3751.   interface to support longer cables than can the more familiar
  3752.   V.24/RS232C type interface and higher data rates.
  3753.  
  3754.   13.3.1.  Internet Technologies International XNET-1
  3755.  
  3756.   Matti Aarnio <mea@mea.utu.fi> represents Internet Technologies
  3757.   International <mailto:intec@digiw.fi>.  They have an 8 bit X.21 card
  3758.   available called the XNET-1 which will work for V.35 with an
  3759.   appropriate cable. You can obtain information on the card itself from:
  3760.  
  3761.        Internet Technologies International OY,
  3762.        Helsinki, Finland  <intec@digiw.fi>
  3763.        Internet Technologies International OY (Ltd)
  3764.        PO BOX 51
  3765.        00641 Helsinki
  3766.        FINLAND
  3767.        Fax: +356-0-7523939
  3768.  
  3769.   The driver for the card is available from ftp.funet.fi
  3770.   <ftp://ftp.funet.fi/pub/Linux/kernel/xnet-sync-driver.tar.gz>.
  3771.  
  3772.   13.3.2.  SDL Communications N2 card.
  3773.  
  3774.   SDL Communications <http://www.ici.net/cust_pages/sdl/sdl.html>
  3775.   produce a variety of controller cards supporting V.35 for ISA based
  3776.   machines.
  3777.  
  3778.   The beta release driver can be found at:
  3779.  
  3780.   ftp.sdlcomm.com
  3781.  
  3782.        /business/sdlcomm/n2/linux
  3783.  
  3784.   For further information you can contact Rubin Dhillon at SDL Sales
  3785.   <mailto:sales@sdlcomm.com>
  3786.   13.4.  Demand Dial SLIP/PPP package
  3787.  
  3788.   Eric Schenk <schenk@cs.toronto.edu> has written a demand dial daemon
  3789.   that will work with either SLIP or PPP. It relies on you having a SLIP
  3790.   device configured which the daemon connects to via a pty. When your
  3791.   SLIP connection is not active all datagrams for non local hosts will
  3792.   be routed to this device and the daemon will detect them, when it
  3793.   receives a datagram it executes a script to activate your network link
  3794.   and then reroutes datagrams to that link.
  3795.  
  3796.   The software is available at:
  3797.  
  3798.   sunsite.unc.edu
  3799.  
  3800.        /pub/Linux/system/Network/serial/diald-0.7.tar.gz
  3801.  
  3802.   Note: You must configure your kernel so that it includes the SLIP
  3803.   driver, even if you only want to run PPP.
  3804.  
  3805.   The included documentation describes how to install and configure the
  3806.   software.
  3807.  
  3808.   13.5.  ISDN support
  3809.  
  3810.   There are various ISDN support efforts underway. The ones that I know
  3811.   of are:
  3812.  
  3813.   13.5.1.  3Com-Sonix PC/Arpeggio driver
  3814.  
  3815.   Alan Cox has started a driver for the 3Com arpeggio ISDN card. It is
  3816.   currently capable of supporting Async PPP only.
  3817.  
  3818.   sunsite.unc.edu
  3819.  
  3820.        /pub/Linux/kernel/patches/network/sonix.tgz
  3821.  
  3822.   13.5.2.  DIEHL SCOM card
  3823.  
  3824.   sunsite.unc.edu
  3825.  
  3826.        /pub/Linux/kernel/patches/network/isdndrv-0.1.1.tar.gz
  3827.  
  3828.   13.5.3.  ICN ISDN and/or Teles ISDN card and/or Creatix AVM ISDN board
  3829.  
  3830.   Fritz Elfert, Jan den Ouden and Thinking Objects have written a linux
  3831.   driver for the ICN ISDN card. Some of the documentation for this
  3832.   driver is in German.  There seem to be various versions of this driver
  3833.   around that apparently support other ISDN cards, if you obtain one and
  3834.   it doesn't support your card take a look at another of the sites. You
  3835.   can obtain them from:
  3836.   ftp.franken.de
  3837.  
  3838.        /pub/isdn4linux/
  3839.  
  3840.   or: ftp.gwdg.de
  3841.  
  3842.        /pub/linux/misc/isdn4linux/
  3843.  
  3844.   13.5.4.  Euro-ISDN card ?
  3845.  
  3846.   Matthias Urlichs <urlichs@smurf.noris.de> has developed some
  3847.   experimental Streams based ISDN support for Linux. The most recent
  3848.   version was for kernel version 1.3.* and is reported to work.
  3849.  
  3850.   It is available at:
  3851.  
  3852.   ftp.uni-stuttgart.de
  3853.  
  3854.        /pub/systems/linux/isdn/ftp.noris.de/
  3855.  
  3856.   Be warned, the documentation is in German and the code is designed to
  3857.   support the european ISDN network. Matthias is working on a english
  3858.   version of the documentation.
  3859.  
  3860.   13.5.5.  Combinet's Everyware 1000 ISDN card
  3861.  
  3862.   Joel Katz <stimpson@panix.com> has developed a driver for Combinet's
  3863.   Everyware 1000 series of plug-in ISDN cards.
  3864.  
  3865.   It is available from: sunsite.unc.edu
  3866.  
  3867.        /pub/Linux/kernel/patches/network/combinet1000isdn-1.02.tar.gz
  3868.  
  3869.   13.5.6.  More information:
  3870.  
  3871.   Harald Milz has put together a World Wide Web page for Linux ISDN
  3872.   support and it is available at Linux ISDN Web Page
  3873.   <http://www.ix.de/ix/linux/linux-isdn.html>.  A more generic site
  3874.   containing information about ISDN is available at Dan Kegel's ISDN
  3875.   home page <http://alumni.caltech.edu/~dank/isdn/>.
  3876.  
  3877.   13.6.  System-V Streams
  3878.  
  3879.   The LiS (Linux Streams) project has formed to develop and implement
  3880.   System-V Streams for Linux. They have a World Wide Web page at Linux
  3881.   Streams Web Page <http://www.uc3m.es/~LiS/> where the status of the
  3882.   project can be obtained and where you can locate contact information
  3883.   and test code.
  3884.  
  3885.   13.7.  ATM (Asynchronous Transfer Mode) support.
  3886.  
  3887.   Werner Almesberger has put together a World Wide site on the topic of
  3888.   Linux support for ATM. It is available at lrcwww.epfl.ch
  3889.   <http://lrcwww.epfl.ch/linux-atm/>.  There is experimental software
  3890.   which supports raw ATM connections and some basic IP over ATM
  3891.   available at the pre-alpha stage and this can be obtained from the Web
  3892.   Site. The site contains a good deal of interesting information on ATM.
  3893.  
  3894.   A mail list has been established to discuss ATM for Linux and you can
  3895.   subscribe by sending a mail message with the body subscribe linux-atm
  3896.   to: majordomo@vger.rutgers.edu
  3897.  
  3898.   13.8.  X.25 support.
  3899.  
  3900.   Many people have enquired about X.25 support for Linux. There is some
  3901.   development work taking place but the apparently small community of
  3902.   people that are interested in it don't seem to have enough momentum to
  3903.   produce very quickly. If you are interested in X.25 support then you
  3904.   might volunteer some assistance to help accelerate the existing
  3905.   development effort. The only information that I have available on X.25
  3906.   development efforts are a note on Alan Cox's webserver to say that
  3907.   someone has volunteered to do the job and the following World Wide Web
  3908.   site which provides information about two development efforts that
  3909.   seem to be making some progress:
  3910.  
  3911.   X.25 for Linux is at: www.ping.be <http://www.ping.be/~ping0778/linux-
  3912.   x.25/>
  3913.  
  3914.   13.9.  Appletalk support.
  3915.  
  3916.   If you have some Apple machines on your network that you'd like your
  3917.   linux machine to be able to share filesystems and printers with then
  3918.   the linux appletalk support is what you are after.
  3919.  
  3920.   The following information was supplied mostly by Cees de Groot
  3921.   <cg@tricbbs.fn.sub.org who compiled it from his own experience with
  3922.   assistance from Dana Basken <dana@millenium.tiac.net> and others on
  3923.   the net.
  3924.  
  3925.   13.9.1.  Building the kernel with Appletalk DDP support
  3926.  
  3927.   Alan Cox has developed some experimental and working support for the
  3928.   Apple Ethertalk specification. It is now a part of the later 1.2.*
  3929.   revision kernels and the new linux 1.3.* revision kernels so to build
  3930.   the kernel support for it you need only compile up a recent kernel,
  3931.   make sure you select the following configuration option:
  3932.  
  3933.   #
  3934.   # cd /usr/src/linux
  3935.   # make config
  3936.    ...
  3937.    ...
  3938.       Appletalk DDP ? y
  3939.    ...
  3940.    ...
  3941.   #
  3942.  
  3943.   13.9.2.  Building the Appletalk configuration tools and daemons.
  3944.  
  3945.   You will need some additional software as the kernel support only
  3946.   provides enough to do basic networking, none of the higher layer
  3947.   protocols are implemented in the kernel.
  3948.  
  3949.   Wesley Craig <netatalk@umich.edu represents a team called the Research
  3950.   Systems Unix Group at the University of Michigan and they have
  3951.   produced a package called netatalk which provides software that
  3952.   implements the Appletalk protocol stack and some useful utilities.
  3953.  
  3954.   You can obtain it from:
  3955.  
  3956.   University of Michigan
  3957.   <ftp://terminator.rs.itd.umich.edu/unix/netatalk/>
  3958.  
  3959.   you will need at least version 1.3.3b2 as earlier versions did not
  3960.   support Linux.
  3961.  
  3962.   To build and install that package something like:
  3963.  
  3964.        # cd /usr/src
  3965.        # tar xvfz .../netatalk
  3966.        - You may want to edit the `Makefile' at this point, specifically to change
  3967.          the DESTDIR variable which defines where the files will be installed later.
  3968.          The default of /usr/local/atalk is fairly safe.
  3969.        - You should then just have to make the software. My `uname' program wasn't
  3970.          in the /bin directory so I edited the Makefile to reflect this change too.
  3971.        # make
  3972.        - as root:
  3973.        # make install
  3974.  
  3975.   You should then end up with a whole range of new commands to play
  3976.   with.
  3977.  
  3978.   13.9.3.  Configuring the Appletalk software.
  3979.  
  3980.   The first thing you need to do to make it all work is add the contents
  3981.   of the services.atalk file to your /etc/services file, just append it
  3982.   to the end of the file.
  3983.  
  3984.   The next step is to create the appletalk configuration files in the
  3985.   /usr/local/atalk/etc directory (or wherever you installed the
  3986.   package).
  3987.  
  3988.   The first file to create is the /usr/local/atalk/etc/Atalkd.conf file.
  3989.   To start this file needs only one line that gives the name of the
  3990.   network device that support the network that your Apple machines are
  3991.   on:
  3992.  
  3993.        eth0
  3994.  
  3995.   The Appletalk daemon program will add extra details after it is run.
  3996.  
  3997.   13.9.4.  Exporting a Linux filesystems via Appletalk.
  3998.  
  3999.   You can export filesystems from your linux machine to the network so
  4000.   that Apple machine on the network can share them.
  4001.  
  4002.   To do this you must configure the
  4003.   /usr/local/atalk/etc/AppleVolumes.system file.
  4004.  
  4005.   Full details on how to do this and what the various options are can be
  4006.   found in the afpd man page.
  4007.  
  4008.   A sample would look like:
  4009.  
  4010.        /tmp Scratch
  4011.        /home/ftp/pub Public
  4012.  
  4013.   Which would export your /tmp filesystem as AppleShare Volume `Scratch'
  4014.   and your ftp public directory as AppleShare Volume `Public'.  The
  4015.   volume names are not mandatory, the daemon will choose some for you,
  4016.   but it won't hurt to specify them anyway.
  4017.  
  4018.   13.9.5.  Sharing your Linux printer across Appletalk.
  4019.  
  4020.   You can share your linux printer with your Apple machines quite
  4021.   simply.  You need to run the papd program which is the Appletalk
  4022.   Printer Access Protocol Daemon. When you run this program it will
  4023.   accept requests from your Apple machines and spool the print job to
  4024.   your local line printer daemon for printing.
  4025.  
  4026.   You need to edit the /usr/local/atalk/etc/papd.conf file to configure
  4027.   the daemon. The syntax of this file is the same as that of your usual
  4028.   /etc/printcap file. The name you give to the definition is registered
  4029.   with the Appletalk naming protocol, NBP.
  4030.  
  4031.   A sample configuration might look like:
  4032.  
  4033.        TricWriter:\
  4034.           :pr=lp:op=cg:
  4035.  
  4036.   Which would make a printer named `TricWriter' available to your
  4037.   Appletalk network and all accepted jobs would be printed to the linux
  4038.   `lp' printer using lpd.
  4039.  
  4040.   13.9.6.  Starting the appletalk software.
  4041.  
  4042.   Ok, you should now be ready to test this basic configuration. There is
  4043.   an rc file supplied with the netatalk package that should work ok for
  4044.   you, so all you should have to do is:
  4045.  
  4046.        # /usr/local/atalk/etc/rc.atalk
  4047.  
  4048.   and all should startup and run ok. You should see no error messages
  4049.   and the software will send messages to the console indicating each
  4050.   stage as it starts.
  4051.  
  4052.   13.9.7.  Testing the appletalk software.
  4053.  
  4054.   To test that the software is functioning properly, go to one of your
  4055.   Apple machines, pull down the Apple menu, select the Chooser, click on
  4056.   AppleShare, and your Linux box should appear.
  4057.  
  4058.   13.9.8.  Caveats of the appletalk software.
  4059.  
  4060.   ╖  You may need to start the Appletalk support before you configure
  4061.      your IP network. If you have problems starting the Appletalk
  4062.      programs, or if after you start them you have trouble with your IP
  4063.      network, then try starting the Appletalk software before you run
  4064.      your /etc/rc.d/rc.inet1 file.
  4065.  
  4066.   ╖  The afpd (Apple Filing Protocol Daemon) severely messes up your
  4067.      hard disk. Below the mount points it creates a couple of
  4068.      directories: directory you access it will create a .AppleDouble
  4069.      below it so it can store resource forks, etc. So think twice before
  4070.      exporting /, you will have a great time cleaning up afterwards.
  4071.  
  4072.   ╖  The afpd program expects clear text passwords from the Macs.
  4073.      Security could be a problem, so be very careful when you run this
  4074.      daemon on a machine connected to the Internet, you have yourself to
  4075.      blame if somebody nasty does something bad.
  4076.  
  4077.   ╖  The existing diagnostic tools such as netstat and ifconfig don't
  4078.      support Appletalk. The raw information is available in the
  4079.      /proc/net/ directory if you need it.
  4080.  
  4081.   13.10.  IP_MASQUERADE - allow a number of hosts to pretend to be one.
  4082.  
  4083.   If you are one of the many people who have some sort of local network
  4084.   at home, whether it be a couple of machine connected via a
  4085.   SLIP/plip/ppp link to each other, or a number of machines connected to
  4086.   a private ethernet network who also has a dial-up Internet connection
  4087.   then you have probably at one time or another wanted the machines not
  4088.   directly connected to be able to communicate with the Internet. This
  4089.   is normally achieved by getting a valid register IP network address
  4090.   for your local network and asking your Internet Service Provider to
  4091.   kindly provide a network route to your network connection instead of
  4092.   the single host route they were previously providing. Unfortunately
  4093.   many Internet Service Providers will ask you to provide a good deal
  4094.   more dollars for the privilege of better utilising the bandwidth of
  4095.   your connection and you probably don't much like that idea.
  4096.  
  4097.   IP_MASQUERADING provides a clever solution to this problem by making
  4098.   all of the machines on your network look like one very active
  4099.   networked machine.  It does this by performing real-time, on the fly
  4100.   address translations. Most of the code was authored by Pauline
  4101.   Middelink <middelin@polyware.iaf.nl>.
  4102.  
  4103.   Ken Eaves <keves@eves.com provided most the information contained
  4104.   below so if you find the following helpful, thank Ken.
  4105.  
  4106.   13.10.1.  Obtaining the `masq' software.
  4107.  
  4108.   The IP_Masquerade software currently comes as a patch to the later
  4109.   linux 1.2.* series kernels and a new version of the ipfw command.  The
  4110.   ipfw program that comes with the net-tools software releases to
  4111.   configure it does not yet have the `masquerade' option built into it.
  4112.   The kernel you are using must support the ip_firewalling option for
  4113.   ip_masquerade to work.
  4114.  
  4115.   The patch file is available from:
  4116.  
  4117.   ftp.eves.com
  4118.  
  4119.        /pub/masq
  4120.  
  4121.   In this directory you will find patch files, new versions of the ipfw
  4122.   command and Ken's original Masquerade FAQ on which this text is based.
  4123.  
  4124.   The patch file is called masq-patch.1.2.n, so you must retrieve it.
  4125.   The files ipfw and ipfw-for-1.3.10 are for kernel version 1.2.* and
  4126.   1.3.10 respectively.
  4127.  
  4128.   13.10.2.  How do I install and compile the patch ?
  4129.  
  4130.   Assuming you have the source to a recent 1.2.* version kernel
  4131.   installed in the /usr/src/linux directory you would do the following:
  4132.  
  4133.   #
  4134.   # cd /usr/src
  4135.   # patch -p0 <.../masq-patch.1.2.n 2>patch.errs
  4136.   - check the patch.errs file for the string `fail'. If you can't find
  4137.     it then the patch applied successfully. If you can find it then something
  4138.     may have gone wrong double check that you have the correct version of
  4139.     kernel source.
  4140.   # cd /usr/src/linux
  4141.   # make config
  4142.   - You must answer `y' to:
  4143.     ...
  4144.     IP: forwarding/gatewaying (CONFIG_IP_FORWARD) [y]
  4145.     IP: firewalling (CONFIG_IP_FIREWALL) [y]
  4146.     IP: masquerading (ALPHA) [y]
  4147.     ...
  4148.   - The rest of the options you should answer as you normally would.
  4149.   # make dep
  4150.   # make clean
  4151.   - Build as you normally would, normally this would be:
  4152.   # make zlilo
  4153.   #
  4154.  
  4155.   After making sure that you are actually running your newly built
  4156.   kernel you need only ensure that you have a working copy of the ipfw
  4157.   program.  ipfw is normally installed in the /sbin so after testing the
  4158.   masquerade version you can simply copy it to /sbin/ipfw.  This is all
  4159.   that is necessary to get the kernel support installed.
  4160.  
  4161.   13.10.3.  How do I configure the IP_MASQUERADE software ?
  4162.  
  4163.   How you configure the IP_MASQUERADE function depends completely on how
  4164.   your network is built. The general idea is as follows: all of your
  4165.   local machine that you want to have access to the Internet must have
  4166.   their network default route pointing to your linux machine supporting
  4167.   IP_MASQUERADE.  Secondly, you must have an entry in the linux firewall
  4168.   table that says that your local machines should be masqueraded.
  4169.  
  4170.   To configure the IP-MASQUERADE function you use the ipfw command.  The
  4171.   ipfw command is normally used to configure the Linux firewall facility
  4172.   and because your masquerading host is acting as a firewall of sorts
  4173.   ipfw has been modified to take on this additional function.
  4174.  
  4175.   I'll present two example configurations that will probably cover most
  4176.   situations, if you have anything more complicated than these designs
  4177.   then you probably have the experience to work it out for yourself.
  4178.  
  4179.   Two machines connected to each other by SLIP or ppp:
  4180.  
  4181.         .-------.             .-------.
  4182.         |       |    SLIP     | linux |   SLIP/ppp
  4183.         | local |-----//------| masq  |-----//-------> To ISP
  4184.         |       |             | svr   |
  4185.         ._______.             ._______.
  4186.  
  4187.                 ^            ^         ^
  4188.                 |            |         |
  4189.            192.168.0.2   192.168.0.1  dynamically assigned
  4190.  
  4191.   Your /etc/rc.d/rc.inet1 file would have something like the following
  4192.   appended:
  4193.  
  4194.         ...
  4195.         ...
  4196.        # Allow machine 192.168.0.2 to be masqueraded to everybody
  4197.        ipfw a m all from 192.168.0.2/32 to 0.0.0.0/0
  4198.         ...
  4199.         ...
  4200.  
  4201.   Note the iii.iii.iii.iii/nn syntax. You might wonder what the /nn
  4202.   means and how you calculate it. This syntax is a means of encoding
  4203.   both an ip address and a netmask. What this syntax says is all
  4204.   addresses in which the first nn bits match those of iii.iii.iii.iii.
  4205.   The above example is for a single host, so all bits must match, since
  4206.   there are 32 bits in an IP address the syntax is /32.
  4207.  
  4208.   A private ethernet network of machines sharing a single internet link:
  4209.  
  4210.         .-------.    _
  4211.         |       | .2 |
  4212.         | local |----|
  4213.         |       |    | <-- Ethernet lan
  4214.         ._______.    |     192.168.0.0 netmask 255.255.255.0
  4215.                      |
  4216.                      |
  4217.         .-------.    |        .-------.
  4218.         |       | .3 |     .1 | linux |   SLIP/ppp
  4219.         | local |----|--------| masq  |-----//-------> To ISP
  4220.         |       |    |        | svr   |
  4221.         ._______.    -        ._______.
  4222.  
  4223.                                        ^
  4224.                                        |
  4225.                                       dynamically assigned
  4226.  
  4227.   For this configuration you have a single entry that describes the
  4228.   whole network, so you would use something like:
  4229.  
  4230.         ...
  4231.         ...
  4232.        # Allow all machines on network 192.168.0.0 to be masqueraded to everybody
  4233.        ipfw a m all from 192.168.0.2/24 to 0.0.0.0/0
  4234.         ...
  4235.         ...
  4236.  
  4237.   Again note the relationship between the netmask (255.255.255.0) and
  4238.   the ipfw syntax. A class C network (255.255.255.0) has 24 bits in its
  4239.   netmask.
  4240.  
  4241.   To make the job a little easier for you, here is a table of common
  4242.   network masks against matching bits:
  4243.  
  4244.        netmask             ipfw
  4245.        ---------------     ----
  4246.        255.0.0.0           /8
  4247.        255.255.0.0.0       /16
  4248.        255.255.255.0       /24
  4249.        255.255.255.128     /25
  4250.        255.255.255.192     /26
  4251.        255.255.255.224     /27
  4252.        255.255.255.240     /28
  4253.        255.255.255.248     /29
  4254.        255.255.255.255     /32
  4255.  
  4256.   13.10.4.  Where is IP_MASQUERADE being discussed ?
  4257.  
  4258.   There was a support mailing list at masq@eves.com. Unfortunately it
  4259.   has now closed down.
  4260.  
  4261.   13.11.  IPALIAS - multiple address per interface.
  4262.  
  4263.   If you are running a world wide web server and want to supports
  4264.   multiple virtual servers, or your network support multiple subnets on
  4265.   the same piece of wire then you'll need to be able to have your
  4266.   machine respond to more than one address per interface.
  4267.  
  4268.   A facility called ipalias allows you to configure more than one
  4269.   address per interface.
  4270.  
  4271.   Robert Sanders <rsanders@mindspring.com> has written linux support for
  4272.   this feature as patches against version 1.2.* kernels and Juan Jose
  4273.   Ciarlante <jjciarla@raiz.uncu.edu.ar> has developed a brand new and
  4274.   very sophisticated implementation for version 1.3.50++ kernels.
  4275.  
  4276.   13.11.1.  Support for 1.2.* kernels
  4277.  
  4278.   You can obtain the patch from:
  4279.  
  4280.   ftp.procyon.com
  4281.  
  4282.        /pub/linux/ipalias
  4283.  
  4284.   To install it you need the 1.2.1 kernel source installed and then:
  4285.  
  4286.        # cd /usr/src/linux
  4287.        # patch -p1 .../alias-patch-1.2.1-v1
  4288.        # make config
  4289.        # make dep; make clean; make zlilo
  4290.  
  4291.   You will also need to get the alias-net-tools.tar.gz file as it
  4292.   contains new versions of the ifconfig and netstat commands.
  4293.  
  4294.   13.11.1.1.  Configuring ip aliases for 1.2.*.
  4295.  
  4296.   To configure an ip alias use the new ifconfig command as follows:
  4297.  
  4298.        # ifconfig eth0 alias 198.71.200.5
  4299.  
  4300.   This presumes that you already have the device configured to operate
  4301.   on your network and that you want 198.71.200.5 configured as a second
  4302.   address.
  4303.  
  4304.   13.11.2.  Support for 1.3.50++ kernels
  4305.  
  4306.   You do not need any patches, simply answer yes to the question:
  4307.   Network aliasing (CONFIG_NET_ALIAS) [N/y/?] when prompted during make
  4308.   config.
  4309.  
  4310.   13.11.2.1.  Configuring IP_ALIAS for 1.3.50++
  4311.  
  4312.   The new ip_alias facilities actually create new network interfaces to
  4313.   more properly. To check if your kernel actually has proper support for
  4314.   the new facility you should look for /proc/net/alias*. If your kernel
  4315.   has been properly built then two file will exist, aliases and
  4316.   alias_types in the /proc/net directory.
  4317.  
  4318.   To configure aliases you use a special trick using a normal unmodified
  4319.   ifconfig program. The new alias ports are specified by including a
  4320.   suffix for the physical port name as follows:
  4321.  
  4322.        # ifconfig eth0:0 192.168.1.1
  4323.        # route add -host 192.168.1.1 dev eth0:0
  4324.  
  4325.   Note that aliases start at '0'. So eth0:1 would be the second alias
  4326.   for the physical eth0 device.
  4327.  
  4328.   To delete an alias you again use the ifconfig command as follows:
  4329.  
  4330.        # ifconfig eth0:0- 0
  4331.  
  4332.   The '-' character signifies to the kernel that the alias should be
  4333.   deleted and all routes and arp entries that point to it should be
  4334.   deleted.
  4335.  
  4336.   14.  Diagnostic tools - How do I find out what is wrong?
  4337.  
  4338.   In this section I'll briefly describe some of the commonly used
  4339.   diagnostic tools that are available for your Linux network and how you
  4340.   might use them to identify the cause of your network problems, or to
  4341.   teach yourself a bit more about how tcp/ip networking works. I'll
  4342.   gloss over some of the detail of how the tools work because this
  4343.   document is not an appropriate forum for describing that sort of
  4344.   detail, but I hope I'll have presented enough information that you'll
  4345.   have an understanding of how to use the tool and to better understand
  4346.   the relevant man page or other documentation.
  4347.  
  4348.   14.1.  ping - are you there?
  4349.  
  4350.   The ping tool is located in the NetKit-B distribution as detailed
  4351.   above in the `Network Applications' section. ping, as the name
  4352.   implies, allows you to transmit a datagram at another host that it
  4353.   will reflect back at you if it is alive and working ok and the network
  4354.   in between is also ok. In its simplest form you would simply say:
  4355.  
  4356.        # ping gw
  4357.        PING gw.vk2ktj.ampr.org (44.136.8.97): 56 data bytes
  4358.        64 bytes from 44.136.8.97: icmp_seq=0 ttl=254 time=35.9 ms
  4359.        64 bytes from 44.136.8.97: icmp_seq=1 ttl=254 time=22.1 ms
  4360.        64 bytes from 44.136.8.97: icmp_seq=2 ttl=254 time=26.0 ms
  4361.        ^C
  4362.  
  4363.        --- gw.vk2ktj.ampr.org ping statistics ---
  4364.        3 packets transmitted, 3 packets received, 0% packet loss
  4365.        round-trip min/avg/max = 22.1/28.0/35.9 ms
  4366.        #
  4367.  
  4368.   What ping has done is resolved the hostname to an address and using
  4369.   the icmp protocol has transmitted an icmp echo request datagram to the
  4370.   remote host periodically. For each echo request that the remote host
  4371.   receives it will formulate an icmp echo reply datagram which it will
  4372.   transmit back to you. Each line beginning with `64 bytes from ...'
  4373.   represents an echo reply received in response to an echo request. Each
  4374.   line tells you the address of the host that sent you the reply, the
  4375.   sequence number to which the reply was for, the time to live field and
  4376.   the total round trip time that was taken. The round trip time is the
  4377.   time between when the echo request datagram is transmitted and the
  4378.   corresponding echo reply is received. This can be used as a measure of
  4379.   how fast or slow the network connection between the two machines is.
  4380.  
  4381.   The last two lines tell you how many datagrams were transmitted, how
  4382.   many valid responses were received and what percentage of the
  4383.   datagrams were lost. The percentage lost figure is a measure of how
  4384.   good or error free the network connection is. High percentage lost
  4385.   figures indicate such problems as a high error rate on a link
  4386.   somewhere between the hosts, exhausted capacity on a router or link
  4387.   somewhere, or high collision rate on an ethernet lan. You can use ping
  4388.   to identify where this problem might be by running ping sessions to
  4389.   each of the routed points that make up the network path. When you find
  4390.   that you can ping somewhere without any datagram loss, but pinging
  4391.   anywhere past there causes you packet loss, you can deduce that the
  4392.   problem lies somewhere between those two points.
  4393.  
  4394.   14.2.  traceroute - How do I get there?
  4395.  
  4396.   The traceroute tool is found in the NetKit-A distribution detailed
  4397.   earlier. traceroute is primarily used for testing and displaying the
  4398.   path that your network connection would take to a destination host.
  4399.   traceroute also uses the icmp protocol, but it uses a clever trick to
  4400.   get each point along the path to send it back a reply as it creeps its
  4401.   way along. Its trick is to manually manipulate the time to live field
  4402.   of the datagrams it transmits. The time to live field is a mechanism
  4403.   that ensures that rogue datagrams do not get caught in a routing loop.
  4404.   Each time a datagram passes through a router it decrements the time to
  4405.   live field by one. If the time to live reaches zero then that router
  4406.   or host sends an icmp time to live expired message back to the host
  4407.   who transmitted the datagram to let it know the datagram has expired.
  4408.   traceroute uses this mechanism by sending a series of udp datagrams
  4409.   with the time to live beginning set at one and incrementing each step
  4410.   it takes. By recording the addresses from the icmp time to live
  4411.   expired replies it receives in response to the datagrams dying it can
  4412.   determine the path taken to get to the destination.  An example of its
  4413.   use would look something like:
  4414.  
  4415.        # traceroute minnie.vk1xwt.ampr.org
  4416.        traceroute to minnie.vk1xwt (44.136.7.129), 30 hops max, 40 byte packets
  4417.         1  gw (44.136.8.97)  51.618 ms  30.431 ms  34.396 ms
  4418.         2  gw.uts (44.136.8.68) 2017.322 ms  2060.121 ms 1997.793 ms
  4419.         3  minnie.vk1xwt (44.136.7.129) 2205.335 ms  2319.728 ms  2279.643 ms
  4420.        #
  4421.  
  4422.   The first column tells us how many hops away (what the ttl value was),
  4423.   the second column is the hostname and address that responded if it
  4424.   could be resolved or just its address if it could not. The third,
  4425.   fourth and fifth columns are the round trip time for three consecutive
  4426.   datagrams to that point.  This tells us that the first hop in the
  4427.   network route is via gw.vk2ktj and the three figures following are the
  4428.   round trip times to that router. The next hop was via gw.uts.ampr.org
  4429.   and minnie.vk1xwt.ampr.org is one hop further away.  You can deduce
  4430.   information about the network route by looking at the difference in
  4431.   times between each step in the route. You can see that the round trip
  4432.   times to gw are fairly fast, it is an ethernet connected host. gw.uts
  4433.   is substantially slower to get to than gw, it is across a low speed
  4434.   radio link, so you have the ethernet time plus the radio link time
  4435.   added together.  minnie.vk1xwt is only slightly slower than gw.uts,
  4436.   they are connected via a high speed network.
  4437.  
  4438.   If you perform a traceroute and you see the string !N appear after the
  4439.   time figure, this indicates that your traceroute program received a
  4440.   network unreachable response. This message tells you that the host or
  4441.   router who sent you the message did not know how to route to the
  4442.   destination address. This normally indicates that there is a network
  4443.   link down somewhere.  The last address listed is as far as you get
  4444.   before you find the faulty link.
  4445.  
  4446.   Similarly if you see the string !H this indicates that a host
  4447.   unreachable message has been received. This might suggest that you got
  4448.   as far as the ethernet that the remote host is connected to, but the
  4449.   host itself is not responding or is faulty.
  4450.  
  4451.   14.3.  tcpdump - capturing and displaying network activity.
  4452.  
  4453.   Adam Caldwell <acaldwel@103mort2.cs.ohiou.edu> has ported the tcpdump
  4454.   utility to linux. tcpdump allows you to take traces of network
  4455.   activity by intercepting the datagrams on their way in and out of your
  4456.   machine. This is useful for diagnosing difficult to identify network
  4457.   problems.
  4458.  
  4459.   You can find the source and binaries at: 103mor2.cs.ohiou.edu
  4460.   <ftp://ftp.funet.fi/pub/OS/Linux/PEOPLE/Linus/net-
  4461.   source/tools/tcpdump-3.0.3.tar.gz>
  4462.  
  4463.   tcpdump decodes each of the datagrams that it intercepts and displays
  4464.   them in a slightly cryptic looking format in text. You would use
  4465.   tcpdump if you were trying to diagnose a problem like protocol errors,
  4466.   or strange disconnections, as it allows you to actually see what has
  4467.   happened on the network. To properly use tcpdump you would need some
  4468.   understanding of the protocols and how they work, but it is useful for
  4469.   simpler duties such as ensuring that datagrams are actually leaving
  4470.   your machine on the correct port if you are trying to diagnose routing
  4471.   problems and for seeing if you are receiving datagrams from remote
  4472.   destinations.
  4473.  
  4474.   A sample of tcpdump output looks like this:
  4475.  
  4476.        # tcpdump -i eth0
  4477.        tcpdump: listening on eth0
  4478.        13:51:36.168219 arp who-has gw.vk2ktj.ampr.org tell albert.vk2ktj.ampr.org
  4479.        13:51:36.193830 arp reply gw.vk2ktj.ampr.org is-at 2:60:8c:9c:ec:d4
  4480.        13:51:37.373561 albert.vk2ktj.ampr.org > gw.vk2ktj.ampr.org: icmp: echo request
  4481.        13:51:37.388036 gw.vk2ktj.ampr.org > albert.vk2ktj.ampr.org: icmp: echo reply
  4482.        13:51:38.383578 albert.vk2ktj.ampr.org > gw.vk2ktj.ampr.org: icmp: echo request
  4483.        13:51:38.400592 gw.vk2ktj.ampr.org > albert.vk2ktj.ampr.org: icmp: echo reply
  4484.        13:51:49.303196 albert.vk2ktj.ampr.org.1104 > gw.vk2ktj.ampr.org.telnet: S 700506986:700506986(0) win 512 <mss 1436>
  4485.        13:51:49.363933 albert.vk2ktj.ampr.org.1104 > gw.vk2ktj.ampr.org.telnet: . ack 1103372289 win 14261
  4486.        13:51:49.367328 gw.vk2ktj.ampr.org.telnet > albert.vk2ktj.ampr.org.1104: S 1103372288:1103372288(0) ack 700506987 win 2048 <mss 432>
  4487.        13:51:49.391800 albert.vk2ktj.ampr.org.1104 > gw.vk2ktj.ampr.org.telnet: . ack 134 win 14198
  4488.        13:51:49.394524 gw.vk2ktj.ampr.org.telnet > albert.vk2ktj.ampr.org.1104: P 1:134(133) ack 1 win 2048
  4489.        13:51:49.524930 albert.vk2ktj.ampr.org.1104 > gw.vk2ktj.ampr.org.telnet: P 1:28(27) ack 134 win 14335
  4490.  
  4491.         ..
  4492.        #
  4493.  
  4494.   When you start tcpdump without arguments it grabs the first (lowest
  4495.   numbered) network device that is not the loopback device. You can
  4496.   specify which device to monitor with a command line argument as shown
  4497.   above.  tcpdump then decodes each datagram transmitted or received and
  4498.   displays them, one line each, in a textual form. The first column is
  4499.   obviously the time the datagram was transmitted or received. The
  4500.   remainder of the line is then dependent on the type of datagram. The
  4501.   first two lines in the sample are what an arp request from
  4502.   albert.vk2ktj for gw.vk2ktj look like. The next four lines are two
  4503.   pings from albert.vk2ktj to gw.vk2ktj, note that tcpdump actually
  4504.   tells you the name of the icmp datagram transmitted or received. The
  4505.   greater-than (>) symbol tells you which way the datagram was
  4506.   transmitted, that is, from who, to who. It points from the sender, to
  4507.   the receiver. The remainder of the sample trace are the establishment
  4508.   of a telnet connection from albert.vk2ktj to gw.vk2ktj.
  4509.  
  4510.   The number or name at the end of each hostname tells you what socket
  4511.   number is being used. tcpdump looks in your /etc/services file to do
  4512.   this translation.
  4513.  
  4514.   tcpdump explodes each of the fields and so you can see the values of
  4515.   the window and mss parameters in some of the datagrams.
  4516.  
  4517.   The man page documents all of the options available to you.
  4518.  
  4519.   Note for PPP users: The version of tcpdump that is currently available
  4520.   does not support the PPP suite of protocols. Al Longyear has produced
  4521.   a pair of patches to correct this, but these have not been built into
  4522.   a tcpdump distribution yet. The patch files are located in the same
  4523.   directory on sunsite.unc.edu as the tcpdump package.
  4524.  
  4525.   14.4.  icmpinfo - logs icmp messages received.
  4526.  
  4527.   ICMP then Internet Control Message Protocol conveys useful information
  4528.   about the health of your IP network. Often ICMP messages are received
  4529.   and acted on silently with you never knowing of their presence.
  4530.   icmpinfo is a tool that will allow you to view ICMP messages much like
  4531.   tcpdump does.  Laurent Demailly <dl@hplyot.obspm.fr> took the bsd ping
  4532.   source and modified it heavily.
  4533.  
  4534.   Version 1.10 is available from:
  4535.  
  4536.   hplyot.obspm.fr
  4537.  
  4538.        /net/icmpinfo-1.10.tar.gz
  4539.  
  4540.   Compilation is as simple as:
  4541.  
  4542.        # cd /usr/src
  4543.        # cd icmpinfo-1.10
  4544.        # gzip -dc icmpinfo-1.10.tar.gz | tar xvf -
  4545.        # make
  4546.  
  4547.   You must be root to run icmpinfo. icmpinfo can either decode to the
  4548.   tty it was called from or send its output to the syslog utility.
  4549.  
  4550.   To test out how it works, try running icmpinfo and starting a
  4551.   traceroute to a remote host. You will see the icmp messages that
  4552.   traceroute uses listed on the output.
  4553.  
  4554.   15.  Some Frequently Asked Questions, with brief Answers.
  4555.  
  4556.   Following are some questions and answers that are commonly asked.
  4557.  
  4558.   15.1.  General questions:
  4559.  
  4560.      I have only a dialin terminal access to a machine on the net, can I
  4561.         use
  4562.         this as a network connection ?"  Yes you can, take a look at
  4563.         TERM. TERM allows you you to run network connections over a
  4564.         normal terminal session. It requires some modifications to the
  4565.         network applications to work with it, but binaries and sources
  4566.         are available for the most common ones already. take a look at
  4567.         the TERM-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Term-
  4568.         HOWTO.html> for lots more information.
  4569.  
  4570.      When I telnet/ftp/rlogin to my machine it takes forever, why?
  4571.         You do not have your name resolver configured properly. Reread
  4572.         the section on /etc/resolv.conf. You must have at least a
  4573.         nameserver entry configured.
  4574.  
  4575.      I want to build my own standalone network, what addresses do I use
  4576.         ?
  4577.         RFC1597 has specifically reserved some IP addresses for private
  4578.         networks.  You should use these as they prevent anything nasty
  4579.         happening if you accidentally get connected to the Internet. The
  4580.         addresses reserved are:
  4581.  
  4582.           10.0.0.0        -   10.255.255.255
  4583.           172.16.0.0      -   172.31.255.255
  4584.           192.168.0.0     -   192.168.255.255
  4585.  
  4586.      Note, reserved network addresses are of classes A, B and C, so you
  4587.      are not restricted in your network design or size. Since you won't
  4588.      be connecting to the Internet it doesn't matter if you use the same
  4589.      address as some other group or network, just so long as the
  4590.      addresses you use are unique within your network.
  4591.  
  4592.      I want the machines on my local network to work via my dial-ip
  4593.         Internet connection, how do I do it?
  4594.         You have three options. They are as follows:
  4595.  
  4596.      ╖  Ask your Internet Service Provider to provide a network route to
  4597.         you instead of a host route. This is likely to be expensive but
  4598.         is the best performing and technical option.
  4599.  
  4600.      ╖  Set up your machine that supports your dial-up link as a `SOCKS'
  4601.         based firewall. This will inherently provide a proxy function
  4602.         where the outside world thinks it is your router machine doing
  4603.         the talking where in fact it is doing it on behalf of the
  4604.         machines on your network. Check the Firewall-HOWTO
  4605.         <http://sunsite.unc.edu/mdw/HOWTO/Firewall-HOWTO.html> for
  4606.         detailed information on how to do this. This will require the
  4607.         machines on your network to have client programs that support
  4608.         the SOCKS capability.
  4609.  
  4610.      ╖  Configure and run the IP-Masquerade software. This is probably
  4611.         the simplest way, as it is fairly straightforward to do and
  4612.         doesn't require special clients on your machines. This software
  4613.         very cleverly performs address translations that make the
  4614.         machines on your network look like they are the machine
  4615.         supporting your dial-up connection. There are some limitations
  4616.         to how well this will work, but it is much lighter-weight than
  4617.         running a full firewall gateway.
  4618.  
  4619.      If ftp.linux.org.uk is down, how do I get the files specified ?
  4620.         Alan's archive is mirrored on:
  4621.  
  4622.         ftp.Uni-Mainz.DE
  4623.  
  4624.           /pub/Linux/packages/Net2Debugged
  4625.  
  4626.      and/or:
  4627.  
  4628.      ftp.infomagic.com
  4629.  
  4630.           /pub/mirrors/linux/sunacm
  4631.  
  4632.      How do I know what version of kernel/net code I am running ?
  4633.         The network code and kernel now have synchronised version
  4634.         numbers, so try:
  4635.  
  4636.         uname -a
  4637.  
  4638.         or:
  4639.  
  4640.         cat /proc/version
  4641.  
  4642.      How do I change the message that telnet users are given at connect?
  4643.         The /etc/issue is the message that is given to normal getty
  4644.         users when they login. Some telnetd programs use a different
  4645.         file /etc/issue.net instead. So if you find that changing your
  4646.         issue file doesn't work, try changing the other.
  4647.  
  4648.   15.2.  Error messages:
  4649.  
  4650.      I keep getting the error `eth0: transmit timed out'. What does this
  4651.         mean?
  4652.         This usually means that your Ethernet cable is unplugged, or
  4653.         that the setup parameters for your card (I/O address, IRQ, etc.)
  4654.         are not set correctly.  Check the messages at boot time and make
  4655.         sure that your card is recognized with the correct Ethernet
  4656.         address. If it is, check that there is no conflict with any
  4657.         other hardware in your machine, eg you might have a soundblaster
  4658.         sharing the same IRQ or i/o control port.
  4659.  
  4660.      I get errors `check Ethernet cable' when using the network.
  4661.         You probably have your Ethernet card configured incorrectly.
  4662.         Double check the settings in /usr/src/linux/drivers/net/CONFIG.
  4663.         If this checks out ok, you may in fact have a cabling problem,
  4664.         check the cables are plugged in securely.
  4665.  
  4666.   15.3.  Routing questions:
  4667.  
  4668.      Why do I get the message `obsolete route request' when I use the
  4669.         route command ?
  4670.         You are using a version of route that is older than your kernel.
  4671.         You should upgrade to a newer version of route. Refer to the
  4672.         "The network configuration tool suite" section of this document
  4673.         for information on where to obtain the tool set.
  4674.  
  4675.      Why do I get a `network unreachable' message when I try and net¡
  4676.         work?
  4677.         This message means that yours, or some other, machine doesn't
  4678.         know how to route to the host that you are attempting to ping or
  4679.         connect to. If it occurs for all hosts that you try, then it is
  4680.         probable that you don't have your default route set up properly,
  4681.         reread the `routing' section.
  4682.  
  4683.      I can ping my server/gateway, but can't ping or connect to anyone
  4684.         remote.
  4685.         This is probably due to a routing problem. Reread the `routing'
  4686.         section in this document. If this looks ok, then make sure that
  4687.         the host you are attempting to connect to has a route to you. If
  4688.         you are a dialin user then this is a common cause of problems,
  4689.         ensure that your server is either running a routing program like
  4690.         gated or routed, or that it is `proxy arping' for you, otherwise
  4691.         you will be able to get datagrams to the remote host, but it
  4692.         won't know how to return datagrams to you.
  4693.  
  4694.   15.4.  Using Linux with Novell fileservers or NFS:
  4695.  
  4696.      How do I use my existing Novell fileserver with my Linux machine ?
  4697.         You should read the IPX-HOWTO
  4698.         <http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html> as it has
  4699.         information on Linux software that will allow you to do this
  4700.         without having to worry about using NFS.
  4701.  
  4702.      Files get corrupted when running NFS over a network.
  4703.         Certain vendors (Sun primarily) shipped many machines running
  4704.         NFS without UDP checksums. Great on ethernet, suicide otherwise.
  4705.         UDP checksums can be enabled on most file servers. Linux has it
  4706.         enabled by default from pl13 onwards - but both ends need to
  4707.         have it enabled...
  4708.  
  4709.      Why are my NFS files all read only ?
  4710.         The Linux NFS server defaults to read only. RTFM the `exports'
  4711.         and nfsd manual pages. With non Linux servers you may also need
  4712.         to alter /etc/exports
  4713.  
  4714.   15.5.  SLIP questions:
  4715.  
  4716.      What do I do if I don't know my SLIP servers address ?
  4717.         dip doesn't really need to know the address of your SLIP server
  4718.         for SLIP to function. The remote option was added as a
  4719.         convenience so that dip could automate the ifconfig and route
  4720.         commands for you. If you don't know and cannot find out the
  4721.         address of your SLIP server then Peter D. Junger
  4722.         Junger@samsara.law.cwru.edu has suggested that he simply used
  4723.         his own address wherever a dip script called for a remote
  4724.         address. This is a small kludge but it works ok, as the server's
  4725.         address never actually appears in the SLIP headers anyway.
  4726.  
  4727.      `dip' only works for root. How do I make it work for others?
  4728.         dip needs to be setuid root to do some of the things it needs to
  4729.         do, such as modifying the routing table. Uri Blumenthal
  4730.         recommends the following:
  4731.  
  4732.      ╖  Create a new group called dip in your /etc/group file and place
  4733.         each person who you want to allow dial out operation in it.
  4734.  
  4735.      ╖  Then when logged in as root, do the following:
  4736.  
  4737.         # chown root.dip /usr/bin/dip
  4738.         # chmod u=rx,g=x,o= /usr/bin/dip
  4739.         # chmod u+s /usr/bin/dip
  4740.  
  4741.      Dial-In users will be restricted in what they can do by what is
  4742.      contained in the /etc/diphosts file.
  4743.  
  4744.      I get `DIP: tty: set_disc(1): Invalid argument', why?
  4745.         This usually suggests that your kernel has not been compiled
  4746.         with SLIP support in it. Check that /proc/net/dev contains
  4747.         devices called sl0, sl1 etc. It could also mean that your
  4748.         version of dip is very old. You should upgrade to a newer
  4749.         version.
  4750.  
  4751.      When I ping a host I get `wrong data byte #17...', why?
  4752.         This generally means that you have your modem configured for
  4753.         XON/XOFF flow control. SLIP must have an eight bit clean line,
  4754.         so you cannot use XON/XOFF flow control. Hardware handshaking
  4755.         works better anyway, use it.
  4756.  
  4757.      With SLIP I can ping my server and other hosts, but telnet or ftp
  4758.         don't
  4759.         work."  This is most likely caused by a disagreement on the use
  4760.         of header compression between your server and your machine.
  4761.         Double check that both ends either are, or are not, using
  4762.         compression. They must match.
  4763.  
  4764.      How can I hang up the phone line when I'm done using SLIP?
  4765.         If you use dip to dial out on the SLIP line, just `dip -k'
  4766.         should do the trick. If not, try to kill the dip process that is
  4767.         running. When dip dies it should hang up the call. To give it
  4768.         the best chance to clean up after itself, try killing the
  4769.         process in the following sequence: `kill <pid>', `kill -hup
  4770.         <pid>' and finally, if the dip process still refuses to die, try
  4771.         `kill -9 <pid>'. The same philosophy should be applied to all
  4772.         unix processes that you are attempting to kill.
  4773.  
  4774.      I see a lot of overrun errors on my SLIP port, why ?
  4775.         The older network tools incorrectly report number of packets
  4776.         compressed as the number of packets overrun. This has been
  4777.         corrected and shouldn't occur of you are running the new version
  4778.         kernel and tools. If it still is it probably indicates that your
  4779.         machine isn't keeping up with the rate of data incoming. If you
  4780.         are not using 16550AFN UARTs then you should upgrade to them.
  4781.         16450, or 8250 generate an interrupt for every character they
  4782.         receive and are therefore very reliant on the processor to be
  4783.         able to find time to stop what it is doing an collect the
  4784.         character from them to ensure none get lost. The 16550AFN has a
  4785.         16 character FIFO and they only generate interrupts when the
  4786.         FIFO is nearly full, or when they have had character waiting,
  4787.         this means that less interrupts get generated for the same
  4788.         amount of data and that less time is spent servicing your serial
  4789.         port. If you want to use multiple serial ports you should
  4790.         mandatorily upgrade to 16550AFN UARTs anyway.
  4791.  
  4792.      Can I use two SLIP interfaces ?
  4793.         Yes. If you have, for example, three machines which you would
  4794.         like to interconnect, then you most certainly could use two SLIP
  4795.         interfaces on one machine and connect each of the other machines
  4796.         to it. Simply configure the second interface as you did the
  4797.         first. NOTE that the second interface will require a different
  4798.         IP address to the first. You may need to play with the routing a
  4799.         bit to get it to do what you want, but it should work.
  4800.  
  4801.      I have a multiport i/o card, how do I use more than 4 SLIP ports ?
  4802.         The kernel SLIP comes with a default of a maximum of 4 SLIP
  4803.         devices configured, this is set in the
  4804.         /usr/src/linux/drivers/net/slip.h file.  To increase it, say to
  4805.         16, change the #define SL_NRUNIT to 16, in place of the 4 that
  4806.         will be there. You also need to edit
  4807.         /usr/src/linux/drivers/net/Space.c and add sections for sl4, sl5
  4808.         etc. You can copy the existing driver definition as a template
  4809.         to make it easier. You will need to recompile the kernel for the
  4810.         change to take effect.
  4811.  
  4812.   15.6.  PPP questions.
  4813.  
  4814.   You should refer to the PPP-HOWTO
  4815.   <http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html> for a list of PPP
  4816.   questions and answers compiled by Al Longyear.
  4817.  
  4818.   16.  Quick Guide - SLIP or PPP Server
  4819.  
  4820.   Configuring your linux machine as a SLIP or PPP server is a
  4821.   deceptively simple thing to do. The actual process is simple, but
  4822.   there are a number of different aspects to the configuration and
  4823.   understanding how each of the stages interact with each other is what
  4824.   will help you diagnose any problems you experience.  Here are the
  4825.   steps that you must follow to configure your linux machine as a SLIP
  4826.   or PPP server:
  4827.  
  4828.   1. Assemble your hardware. Avoid IRQ and shared memory conflicts. Test
  4829.      each of the serial ports by connecting a dumb terminal to each of
  4830.      the ports and use a null modem cable and a comms program like
  4831.      minicom or seyon to talk to each. Make sure you can send and
  4832.      receive characters. If you intend running a number of serial ports
  4833.      then try to use a smart serial board and use 16550AFN UART's. This
  4834.      will help ease some of the work of handling interrupts generated by
  4835.      the serial ports.
  4836.  
  4837.   2. Build your kernel, make sure it has networking configured, IP
  4838.      Forwarding enabled if you want users to route via your server and
  4839.      SLIP or PPP configured as is appropriate for your configuration.
  4840.      Make sure you configure CSLIP if you wish to use it. Double check
  4841.      you have IP Forwarding enabled if you don't then dialin users will
  4842.      only be able to connect directly to your machine.
  4843.  
  4844.   3. Install your kernel. Test the kernel. Check the /proc/net/dev file
  4845.      and make sure that you have sl* ppp* devices listed. If not then
  4846.      you have probably made some error in configuring your kernel, or
  4847.      you are not actually running your new kernel. Double check that you
  4848.      have actually run lilo to install the new kernel.
  4849.  
  4850.   4. Configure a getty on the serial port(s) that you wish to use for
  4851.      your incoming calls. You should refer to the Serial-HOWTO
  4852.      <http://sunsite.unc.edu/mdw/HOWTO/Serial-HOWTO.html> for a
  4853.      description of how to do this. Remember to configure your modem so
  4854.      that the DCD pin tracks received carrier, this is how most getty
  4855.      programs detect an incoming call (mgetty is an exception to this
  4856.      and uses the RING message so you must be sure you have your modem
  4857.      configured to generate it: ATQ0V1 is usually enough).
  4858.  
  4859.   5. Test the getty to make sure it works. It is important that you do
  4860.      this before you start worrying about the actual SLIP or PPP
  4861.      configuration. Try dialing into your system, you should get a
  4862.      login: prompt and be able to login to a shell account normally.
  4863.      Check for lost or garbled characters that might indicate a flow
  4864.      control problem.
  4865.  
  4866.   6. Decide how you want your server to allocate addresses. If you want
  4867.      your users to get the same address each time they call then you
  4868.      want a static server, if you want to minimise the number of
  4869.      addresses you use and don't care what address your users are
  4870.      allocated then you want a dynamic server.
  4871.  
  4872.   7. Decide how you are going to build the SLIP or PPP server, whether
  4873.      you are going to use sliplogin, dip or dSLIP for SLIP for example.
  4874.      If you wish to use the sliplogin package then refer to the "Slip
  4875.      Server using Sliplogin" section. If you are going to use dip then
  4876.      refer to section "Slip Server using DIP". If you want to build your
  4877.      SLIP server using the dSLIP package then refer to section "Slip
  4878.      Server using dSLIP". For PPP you will need to use the pppd program,
  4879.      so make sure you read the PPP-HOWTO
  4880.      <http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html> on how to
  4881.      configure this. Ensure you have the appropriate software, that it
  4882.      is a recent version and that it is compiled and installed if
  4883.      necessary.
  4884.  
  4885.   8. If the addresses you are allocating to you SLIP users are part of
  4886.      your ethernet network, then make sure you read the Proxy ARP
  4887.      section and configure a proxy arp for each address. You may do this
  4888.      in the /etc/sliplogin and /etc/SLIPlogout files if you are using
  4889.      the sliplogin package. If you are configuring a PPP server then
  4890.      make sure you use the pppd proxyarp option. If the addresses you
  4891.      are allocating are from a network seperate to your ethernet network
  4892.      then you will need to use a routing daemon program like gated. If
  4893.      you use gated then refer to the "gated" section.
  4894.  
  4895.   9. Test your SLIP/PPP server.
  4896.  
  4897.   10.
  4898.      Get someone else to test your SLIP/PPP server.
  4899.  
  4900.   17.  Known Bugs.
  4901.  
  4902.   The Linux networking code is still an evolving thing. It still has
  4903.   bugs though they are becoming less frequently reported now. The Linux
  4904.   Networking News <http://iifeak.swan.ac.uk/NetNews.html> is a World
  4905.   Wide Web page maintained by Alan Cox which contains information on the
  4906.   status of the NET-3 networking code. You can obtain information on
  4907.   what is known and what isn't, by reading the
  4908.   /usr/src/linux/net/inet/README file that accompanies the kernel
  4909.   source, or by joining the linux-net channel.
  4910.  
  4911.   18.  Copyright Message.
  4912.  
  4913.   The NET-2-HOWTO is Copyright (c) 1995 Terry Dawson and Matt Welsh.
  4914.  
  4915.   Permission is granted to make and distribute verbatim copies of this
  4916.   document provided the copyright notice and this permission notice are
  4917.   preserved on all copies.
  4918.  
  4919.   Permission is granted to copy and distribute modified versions of this
  4920.   document under the conditions for verbatim copies above, provided a
  4921.   notice clearly stating that the document is a modified version is also
  4922.   included in the modified document.
  4923.  
  4924.   Permission is granted to copy and distribute translations of this
  4925.   document into another language, under the conditions specified above
  4926.   for modified versions.
  4927.  
  4928.   Permission is granted to convert this document into another media
  4929.   under the conditions specified above for modified versions provided
  4930.   the requirement to acknowledge the source document is fulfilled by
  4931.   inclusion of an obvious reference to the source document in the new
  4932.   media. Where there is any doubt as to what defines 'obvious' the
  4933.   copyright owner reserves the right to decide.
  4934.  
  4935.   19.  Miscellaneous and Acknowledgements.
  4936.  
  4937.   There are so many people who have contributed comments and suggestions
  4938.   for this update that I have forgotten who you are. Thanks.
  4939.  
  4940.   Please, if you have any comments or suggestions then mail them to me.
  4941.   I'm fairly busy these days, so I might not get back to you straight
  4942.   away, but I will certainly consider any suggestion you have.
  4943.  
  4944.   The Linux networking code has come a long way and it hasn't been an
  4945.   easy trip, but the developers, all of them, have done an excellent job
  4946.   in getting together something that is functional, versatile, flexible
  4947.   and free for us to use. We all owe them a great debt of thanks. Linus,
  4948.   Ross, Fred, Alan, the Alpha/Beta testers, the tools developers and
  4949.   those offering moral support have all contributed to the code as it is
  4950.   today.
  4951.  
  4952.   For those that have an itch they want to scratch, happy hacking, here
  4953.   it is.
  4954.  
  4955.   regards Terry Dawson, vk2ktj.
  4956.  
  4957.   <94004531@postoffice.csu.edu.au>, or <terry@perf.no.telecom.com.au>
  4958.  
  4959.