home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / HOWTO / NET-2-HO < prev    next >
Encoding:
Text File  |  1995-04-20  |  175.6 KB  |  5,150 lines

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