From: Matt Welsh (mdw@TC.Cornell.EDU)
Date: 02/18/93


From: mdw@TC.Cornell.EDU (Matt Welsh)
Subject: [comp.os.linux] Linux Networking FAQ (Part 1)
Date: Thu, 18 Feb 1993 20:28:53 GMT

Archive-name: linux-faq/networking/part1
Last-modified: 17 Feb 1993

This is part 1/2 of the Linux Networking FAQ.

Note that this is still Phil's doc! I just helped with it. I will be uploading
this to tsx-11 and sunsite in a few minutes. -mdw

=============================================================================
This is the LINUX NETWORKING FAQ
by Phil Copeland (p_copela@csd.uwe.ac.uk).
=============================================================================
Last revision: 17 Feb 1993

quick disclaimer: I must appologize for my luck of a spoll checkr

0. About this NET-FAQ
        
        This is the Linux Networking FAQ, which covers all of the details
        of setting up TCP/IP under Linux, either for a network or only
        for loopback mode. It's maintained by Phil Copeland, but this revision
        is by Matt Welsh (mdw@tc.cornell.edu). New versions of this doc
        will be posted to comp.os.linux.announce and can be found on the
        major Linux FTP sites such as sunsite.unc.edu and tsx-11.mit.edu.

        The version of the kernel used in this NET-FAQ is 0.99.5 and the
        GCC compiler is 2.3.2. Thus, some of these things may or may not
        work depending on your kernel and compiler setup.

        My personal setup is a 486dx-25, 8Mb mem, 105 Mb Scsi Disk,
        Adaptec 1542B Scsi Controller, Generic Scsi Tape (60Mb),
        1200 Baud Hayes Modem (HP on com2), Inmos B004 transputer board (2Mb),
        Western Digital 8013 16Bit network card, 2 serial ports (com1/4),
        Single printer port and Paradise Pro Designer II SVGA card.

        This mountain of equipment co-exists happily with each other and
        works in harmony with each other. (I only include it here so that
        people realize that such setups can exist)

0.1. A Request
        If you find some text I've written which no longer applies or is a
        complete load of rubarb, please tell me and include a reason or
        corrective text (patch file/ context diff/ off the top of your head
        formats are very welcome)

0.2. Foreward
        This NET-FAQ has grown quite large (~70k) and the past few versions
        contained so much information and were downright confusing. So,
        we revamped it and added a "Quick Start Guide", a quick overview of
        setting up TCP/IP under Linux. It's really quite easy to get
        everything going. There is a lot of reference information here so
        don't be scared off.

1. Introduction

        Hello and welcome to the wonderful world of Linux networking.

        Networking has always been one of the most exciting things that you can
        coax a computer to take advantage of. It allows you to store/retrieve
        files from remote machines (some of which are probably located in
        countries which you'll never get to visit).

        Networking also allows computers to interactively communicate with
        other processes or users on these remote machines allowing a new
        social aspect of computing to be approached (mainly in the form of
        talk or MUD (Multi User Dungeon) sessions).

        Networking also has many stumbling blocks for the administrator to
        fall over, most notably the initial setting up of a system network
        which can send the most sane person to eating the proverbial hat
        through the hell of trying to coax their machines into networking life.

        This FAQ is designed to help you start into networking in a positive
        direction by leading you simply through the network configuration that
        best suits you, whether you have a single machine with no network
        attachment (silly I know) or a multi billion credit networking
        computer for your country's local stock exchange. Please note that
        this FAQ does not follow the 'normal' format of other FAQ's as it's
        designed to teach you networking and its idiosyncacies.

        As of 21 Jan 93 there is a Linux Networking Quickstart guide (in the
        next section) by Matt Welsh to help review the process of getting it
        all going.

1.1. Linux Networking Support
        The Linux kernel is now distributed with the TCP/IP code in it.
        Basically, Linux's network support is for either UNIX (local)
        domain sockets or INET (TCP/IP) domain. This FAQ specifically
        covers configuring TCP/IP for Linux. You can either configure it
        in "loopback mode" (which allows you to telnet, ftp, etc. only
        to your own machine) or, if you have an Ethernet card, for use
        on a network such as the Internet.

1.2. Supported Ethernet Cards
        To put your machine on a network you need an Ethernet connection
        of some kind and an Ethernet card in your machine. Linux supports
        a number of Ethernet cards, although only the WD8003 and WD8013 (aka
        SMC Elite) cards come with the standard kernel. Donald Becker wrote
        up the following information regarding Ethernet cards, prices, etc.

        The least expensive 8 bit ethercards start at $70 and are usually
        NE1000 clones. It's definitely worth it to pay an extra $10 and go
        for a 16 bit bus interface NE2000 clone. For another $10-$15 you can
        get a shared memory 8013 clone, which will give you somewhat higher
        system performance.

        You should expect to pay more than the price I listed above unless you
        do careful shopping from the back of Computer Shopper and (even
        better) LAN magazine. I've gotten network things from both MCW
        Distributors in Gaitherburg MD (good prices, sort of local, advertises
        in Comp.Shop.) and Network Express (a little more expensive).

        You'll also have to decide the kind of interface you need. "Thinnet"
        is RG58A 50ohm cable with BNC connectors. 10BaseT is twisted pair
        ("TP") to a central "hub". There is also traditional thick 50ohm
        cable, but it has no advantage in most installations. An "AUI" port
        is a 15 pin D-shell connector that can be hooked to an external
        transceiver (ca. $50 for 10BaseT or thinnet), usually for thicknet
        (in which case it's $100+). Cards typically have an AUI connector and
        either a thinnet or twisted pair transceiver. You'll pay about $20
        more and give up the AUI to get both thinnet and 10BaseT.

        Some ethercards advertise status LED. These are most useful for
        10BaseT connections, which are easy to mix up.

        IMHO, thinnet with on-card transceivers results in a _much_ cheaper
        system. You only need to buy T connectors($3ea.), cables ($6/12ft at
        RS), and two terminators ($2ea.), leading to a per-node cost of under
        $100. At these price levels it's definitely cheap enough to put on a
        home system! With twisted pair you'll need a hub which can easily
        double your per-node code. TP is only cost-effective if the wiring is
        already there and its expensive to run more.

        These drivers support all common 8390-based ethernet boards. Currently
        "common" is defined as:

2. What you need to get started

        To configure TCP/IP under Linux you need:
 
        1) A linux machine with linux kernel 0.98.5 although I'd
                recommend going all the way to 0.99.5 as many tcp/ip errors
                have been stomped out (although not all).

        2) Version 4.2 of the jump table library image (/lib/libc.so.4.2).
                This is needed for the various network binaries and so on.
                The most recent version is on sunsite.unc.edu:/pub/Linux/GCC.

        2) If you're going to use TCP/IP over the network (i.e. not just
                loopback mode), then you need one of the following Ethernet
                cards:

                wd8013
                wd8003
                SMC Elite 16
                ne2000
                Alta Combo (ne2000 clone)
                Aritsoft LANtastic AE-2 (ne2000 clone w/ extra memory)
                D-Link Ethernet II
                ne1000
                3Com 3c503 EtherlinkII
                3Com 3c503/16
                Cabletron E1010, E1010-x, E2010, E2010-x
                various HP 8390-based boards such as the HP27245, HP27247A,
                  and HP27250
        

                The wd8003, wd8013, and SMC Elite 16 are all included in the
                standard Linux kernel. The ne2000, ne1000, 3c503, Cabletron,
                HP, and and other 8390 card drivers are available for beta
                testing. This will be covered later.

        3) If you are only going to use 'loopback' mode, you won't need
                a card! A special loopback device is used to communicate
                with yourself.

                *** NOTE when talking of ethernet devices, it should
                be noted that /dev/eth0 does NOT exist, the kernel
                knows about it and thats all you need to know, /dev/eth0
                and /dev/loopback are fictionous (FS speaking)
 
        4) The tcpip-0.8 networking package. This is the old, original
                release of the TCP/IP software. The only things you need
                from this package are the 'config' program and the network
                installation scripts (such as rc.net, install.net, and so on).
                Everything else in the tcpip-0.8 package (the kernel code,
                diffs, binaries, etc.) is obsolete.

                You also need the tcpip-0.8-fixes package. You need more or
                less everything from this package: the exact files you need
                are covered later.

                NOTE: If you have SLS you should have everything you need in
                /usr/etc/inet already.

                It's available from all of the major Linux FTP sites, in the
                file tcpip-0.8.tar.Z. The fixes are in tcpip-0.8-fixes.tar.Z.
                They should both be in the same place.

        5) The net-bin-0.2 package. It's on sunsite and tsx-11 in the
                file net-bin-0.2.tar.Z.

                This file contains all of the TCP/IP clients and daemons that
                you'll need, including: telnet, telnetd, ftp, ftpd, inetd,
                named, rcp, rlogin, rsh, talk, ping, nslookup, and more.
        
        6) You don't need the net-lib-1.1 package. The libraries have
                now been added to the most recent libc.so.4.2, so if you have
                that you're set.

        7) If you want NFS support, Linux 0.99 now contains NFS as a
                of mount which lets you NFS mount a filesystem (i.e. mount a
                filesystem on another machine). Look on nic.funet.fi in
                /pub/OS/Linux/ALPHA/NFS.

        8) Know the IRQ's of your internal cards. This is to avoid
                conflicts and allow the 'drivers' to communicate with your
                hardware

        9) Also, If you do have ethernet cable, both coax (thin and thick)
                as well as twisted pair will work, the cable is only there to
                carry signals, your ethernet board works out how and the linux
                'drivers' simply stuff data onto the card.

        10) A lot of coffee and one of those stress relieving
                gadgets you can get in the local market. [Ed. note: I had
                about 3 Dr. Peppers and I was okay. -mdw]
 
 
3. Quick Start Guide to setting up Linux TCP/IP

        This is a rundown of what you need to do to setup TCP/IP. Read it
        through and then keep it all in mind as you're cleaning up all of
        the details below. It's not difficult if you do everything correctly.

        It's not as quick as I wanted it to be. Basically I get all of the
        installation stuff straight and then let Phil explain the details
        of setting up named, etc. later in the NET-FAQ. This section was
        written by Matt Welsh.

        - NOTE: In this discussion, the directory /usr/etc/inet is used
          to hold the tcp/ip daemons, configuration files, and so on.
          You can use ANY directory you want, as long as you're consistent.
          Two popular alternatives are /etc/inet or just /etc. I like to
          keep all of my tcp/ip stuff in /usr/etc/inet just to keep it
          seperate from my other /etc files (because I toy with it a lot).
          This is mostly personal taste.

          TCP/IP clients (such as telnet, ftp, and so on) can go anywhere
          on your user's path. The canonical place is /usr/bin. It doesn't
          really matter; here I install clients in /usr/bin.

        - (Another) NOTE: Some programs, like fingerd, expect certain files
          to be in certain places. For example, fingerd won't work if
          finger is not in /usr/bin. The easiest solution is to make a
          symbolic link if you put your clients, etc. elsewhere. If
          something doesn't seem to be working, make sure everything's
          in the right place and has correct permissions. One way to
          find out where a program expects companion programs or files
          to be is to use 'strings'. For example,
                strings fingerd | more
          will show you all of the printable strings in the fingerd
          binary; you can use this information to find out where fingerd
          expects finger to be, and so on.

        - First things first: Get all of the files, etc. listed above in
          section 2.0. When unpacking the tcpip-0.8, tcpip-0.8-fixes, and
          net-bin packages, it's helpful to unpack them in separate directories,
          because we'll be moving the files around to the right places. For
          example, unpack tcpip-0.8.tar.Z in /usr/src/tcpip-0.8 and
          net-bin-0.2.tar.Z in /usr/src/net-bin (or something like that).

          NOTE: The current version of SLS (0.99.2 and up) already have
          pretty much everything you need to get networking going. The
          configuration files all live in /etc/inet, with /usr/etc/inet
          being a logical link to this location. So if you have SLS you
          probably don't need to get all of these files.

        - Most of the files in tcpip-0.8 you don't need. After you've unpacked
          it somewhere, take inet.tar and unpack it in /usr/etc/inet (which you
          may need to create). You can delete the following files in
          /usr/etc/inet:
                config
                inetd
                named-xfer
                telnetd
                named
          (Don't worry; later we replace them with newer versions).
 
        - The rest of the files from tcpip-0.8.tar.Z you can delete.

        - Unpack tcpip-0.8-fixes.tar.Z in /usr/etc/inet. You can delete
          the file 'config' from it.

        - Take the config.c (from tcpip-0.8-fixes) and compile it in
          /usr/etc/inet with the command
                gcc -o config config.c

          NOTE: If you do not recompile config, you will probably get an
          ioctl error when you reboot with networking installed. To avoid
          problems, you should recompile the program with the above command.

        - Having unpacked net-bin-0.2.tar.Z in /usr/src somewhere, you
          can install these binaries. The following files are copied to
          /usr/bin:
                ftp
                telnet
                ping (must be setuid root; i.e. do 'chmod 4755 /usr/bin/ping')
                nslookup
                nsquery
                nstest
                rsh (must be setuid root)
                rcp (must be setuid root)
                rlogin (must be setuid root)
                finger
                talk
                tftp
          The following files are copied to /usr/etc/inet:
                ftpd
                telnetd
                inetd
                named
                named-xfer
                rshd
                rlogind
                fingerd
                ntalkd
                tftpd
          The man pages are copied to /usr/man... for example, all *.1 are
          copied to /usr/man/man1 and *.8 are copied to /usr/man/man8.
        
        - Now you've got all the software installed, you need to recompile
          your kernel with TCP/IP enabled. This is easy unless you have an
          old kernel (pre-0.99) or need to install the ne2000/3c503/ne1000
          drivers. Here's how.

          IF you're installing the 8390/n2000/3c503/ne1000 drivers (from
          super.org, directory /pub/linux/newether), follow the directions
          below for installing the driver. If you're NOT installing the
          8390 driver (or only want to use loopback), just skip down to
          compiling the kernel.

          Get the files that you need. See the README's there for full details.
          Basically you need:
                8390.c
                8390.h
                Space.c
                auto_irq.c
                GNUmakefile
                one or more of ne.c, wd.c, 3c503.c/3c503reg.h, and so on,
                  depending on the card you have.
                
                Note that if you have 0.99.pl5 or above you need to get the
                8390.c from /pub/linux/ether-995 instead (as a lot of
                kernel TCP/IP code changed/got better with 0.99.pl5).

          Just follow the directions found in the file INSTALL on super.org.
          It's easy. Just:
              - Put the files above in /usr/src/linux/net/tcp.
              - Edit the GNUmakefile to define which card you have, your
                base address, and your IRQ. Note that with these new
                drivers if EI8390 (the base address) and EI8390_IRQ (the
                IRQ) are defined to be 0, they will be automatically
                detected at bootup time.
              - Edit Space.c (if needed),
              - If you changed the GNUmakefile to use "eth_if" instead of
                "eth0" (note that the newest 8390 drivers use "eth0" like
                everyone else, they previously used "eth_if"), then you need to
                edit /usr/etc/inet/rc.net to run $CONFIG on "eth_if" instead of
                "eth0". If not you'll get an ioctl error from config.

          If you have problems with the 8390 driver, contact becker@super.org.

        - If you're NOT installing the 8390 driver (i.e. just using the wd8003
          driver with the standard kernel), then you need to edit
          /usr/src/linux/net/tcp/Space.c to reflect your card's IRQ, base
          address, and so on. If you're only using loopback you can skip
          this step, too.

          Anyway for those who are flexible, the standard kernel parameters
          for this are :
            
              IRQ: 5 (card interrupt)
              mem: D0000 (where in memory to buffer data)
              i/o addr: 280 (low level address of card)
              mem start: D0000 (nearly all boards have a jumper to
                                       set this)
              mem end: D2000 (for wd8013, make this D4000)
 
          NOTE: If you have problems with the memory start addr for the
          WD80[0/1]3, please get in touch with bir7@leland.stanford.edu.

        - Now you're all set to compile the kernel. I really suggest that
          you use version 0.99.pl4 or newer (probably 1.0 by the time this
          is out). If you don't have at least 0.99 you can't run 'make config'
          to autoconfigure the kernel and you'll have to do some stuff by
          hand.

          In any case, it's easy. If you have 0.99 or newer, just cd to
          /usr/src/linux and do a 'make config'. Make sure you answer 'yes'
          to the question on configuring TCP/IP. The rest of the options are
          up to you. Also make sure you edit /usr/src/linux/Makefile to fix
          your root device, keyboard, and so on.
          
          Then do a 'make dep' to fix your dependencies--- THIS
          STEP IS VERY IMPORTANT. Then (if you've already compiled this
          version of the kernel) do a 'make clean'. FINALLY you're ready to
          just do 'make' to compile the kernel.

          When you're done you'll have the new kernel in /usr/src/linux/Image.
          Copy it to a floppy or install it in /etc for use with LILO, or
          whatever. Reboot with your new kernel.

        - Once you're rebooted you can configure the stuff in /usr/etc/inet.
          Run the script 'install.net' there, and answer the questions to
          set your IP address, net address, router, domain name, and
          nameserver. This is covered later in the NET-FAQ.

          NOTE: If you have SLS then the "install.net" file isn't used. Instead
          you need to edit hosts, resolv.conf, rc.net, and so on by hand to
          set up the various addresses. It's very straightforward; just make
          sure that the various configuration files (discussed below) in
          /etc/inet have the correct information.

          NOTE 2: If you're only using loopback, then your IP address is
          "127.0.0.1", and you don't have a router, network address, or net
          mask (these are things prompted for by install.net). For SLS,
          which doesn't have install.net, you just edit the config files
          in /etc/inet to reflect this.

        - I had to edit resolv.conf there to make sure that the hostname and
          domain names were right. No big deal. Under SLS you need to set
          your hostname in the file /etc/inet/host (not 'hosts') and set
          the domain name in /etc/inet/domain in addition to this step.

        - Set up your named configuration files. Named is the service that
          allows your machine to act as a nameserver. If you have a real
          nameserver already, you probably don't want to run named (wastes
          memory). If you're on loopback, you don't need it either (just put
          all of your hostnames and ip addresses in /usr/etc/inet/hosts).
          Named is nice if you have a LAN setup and want your Linux box to be
          the name server. This is covered in detail later in the NET-FAQ as
          well.

          In general you don't need to run named unless you really like
          hacking with DNS. I don't see any need for it, since you can put
          all of your hostnames in /usr/etc/inet/hosts and/or consult
          another nameserver.
        
        - Create the file /usr/etc/inet/host.conf. This file tells the
          name-binding libraries how to look up names: in this case, we're
          going to tell the libraries to check first /usr/etc/inet/hosts
          and THEN ask the nameserver (if any). So, create
          /usr/etc/inet/host.conf. It should contain only these 2 lines:
                order hosts,bind
                multi
          This is VERY IMPORTANT. If you don't create this file then you
          probably won't be able to look up names as expected.

        - Set up inetd.conf to include lines for all of the tcp/ip daemons
          (such as telnetd, fingerd, etc.) that you have in /usr/etc/inet.
          This is covered later.

        - Make sure that /usr/etc/rc.net is run from your /etc/rc.local.

        - Edit rc.net to make sure it's getting your IP address right. As
          it stands now it tries to grep for it in /usr/etc/inet/hosts,
          and this doesn't always work. I just hardcode my IP address in
          rc.net since my IP address isn't going to change much. :)

          SLS also tries to look up your net and router address from
          /etc/inet/hosts. I just hardcode these in as well as I don't
          trust grep.

          FOR LOOPBACK ONLY: If you're only using loopback, then edit
          rc.net to make your IP address 127.0.0.1, and you can ignore
          the netowkr and router addresses. In rc.net, you should only be
          running the config commands for "loopback", and no others, so
          comment out the lines which run config on "eth0".

          If you're using the 8390 driver (see above) make sure you've
          changed 'eth0' to 'eth_if' on the config commands in rc.net.

        - If you're not running named, you can comment out the lines which
          start it in rc.net. This will save memory and CPU time.

        - If you're not going to run NFS, you can comment out the lines in
          rc.net which run nfsd, mountd, portmapper, and routed.

        - If you want to use NFS (network file system), you're on your
          own. It should suffice to say that you need the nfs-client
          stuff from tsx-11 and nfs enabled in your kernel. Should be easy,
          I haven't played with it yet.

        - If you didn't already, read all of the README files that come
          with net-bin-0.2 and all that. They contain more up-to-date
          info. NOTE that the info in tcpip-0.8's README file is mostly
          out-of-date, follow the directions above and you'll be okay.

        - At this point you should be able to reboot your system, rc.net will
          run, and you'll see something like
                loomer -> 128.253.153.53
                Starting /usr/etc/inet/inetd
          which is output from rc.net. If you don't see this (or if there are
          errors) then there's a problem; the best way to fix this is to
          edit rc.net and the other files in /usr/etc/inet and make sure you
          have your IP addresses and everything set right.

        Okay, that's about it for this so-called "Quick Start" guide. the
        rest of the NET-FAQ will fill in the gaps and talk more about
        networking than how to install the softs and configure the kernel.

4. Running install.net

        As mentioned above, to set the various network numbers, etc.
        for your system you need to run the install.net script, which sets
        lots of things in /usr/etc/inetd (mostly in hosts, resolv.conf, and
        so on).

        NOTE: If you're running SLS you don't have the install.net script.
        Just edit the files discussed in sections 5 and 6 of this net-faq by
        hand, it's not very difficult. All install.net does is put default
        values in these files for you.

        NOTE: If you're only on loopback, the only IP address you should
        be using is '127.0.0.1' which stands for loopback. You will
        be your own nameserver (either running named or just using
        /usr/etc/inet/hosts), and you don't need to worry about the router
        and subnetwork addresses.

        When running install.net you'll have to answer these questions:

                Enter IP Address for (your host) (aaa.bbb.ccc.ddd)

        Here you are being asked what network address you would like to be known
        as. Ip address are unique numbers so as to identify your machine from
        another on a multiuser network. Normally if you reside in the Internet
        you will have a network address assigned by the NIC or your local
        network controller and you really must stick to it since there is no
        room for you to bugger up the network by using someone elses ip
        address. If you do not have a connection to the Internet, you will
        have less of a problem although it would still be a good idea to apply
        for a internet class c/d network number depending on your setup.

        There is a convention being used that allows people who are completely
        bemused by all the ip registration stuff that allocates a band of ip
        numbers (192.0.2.xxx) which are encouraged to be safely ignored by the
        rest of the internet. So if you don't know what ip you'll be assigned
        or (naughty) can't be bothered, please use that range to avoid
        bringing sections of the internet around your ears.

        IP numbers are typically of the 0-255.0-255.0-255.0-255 range so
        valid answers are 243.123.4.23 or 192.35.173.3, etc. 324.234.545.2
        is completely wrong.
 
                Enter Net Address for (your hostname) (aaa.bbb.ccc.0)
 
        Here you are being asked for your subnetwork address. This requires a
        bit of explaination. Subnets are a "unit" of connectivity which depict
        how many possible hosts 'live' on the same piece of cable as you do
        (typically this never exceeds 253 on one piece on cable) a quick way
        of getting the question right is to type in whatever you have for your
        ip address but make the last number 0 eg if my ip address were
        135.56.33.155, my 'safe' Net address would be 135.56.33.0. 0.0.0.0
        means the whole world and is probably what slip people should use.
 
                Enter Router Address for (your hostname) (aaa.bbb.ccc.ddd)
 
        Wibble! Ok here what is being asked is if you have a gateway machine
        through which IP traffic can be passed to the great blue yonder. We
        are sneekily getting the routeing machine to do some hard work for
        us. Routers tend to have 2 ethernet boards in them with differing
        network numbers for them so that they can 'bridge' between different
        numbered networks, eg you could not talk directly to a ip address of
        192.35.173.12 from an ip address of 192.35.175.15 but a machine in the
        middle with two ip address 192.35.173.4 and 192.35.175.3 can 'collect'
        the data from the 192.35.173.xxx network and transfer it to the
        192.35.175.xxx network. All we have to do here is stick in the ip
        address of the local router. You need to find this out from your local
        network admin types. If you don't have a router use 0.0.0.0 meaning
        don't route anything.
 
                Enter Domain name for (your host)
 
        This isn't too bad, domain names are 'convenient' labels eg uwe.ac.uk is
        the domain name that appends to all the machines on site so that a sun
        called csd would be known as csd.uwe.ac.uk This is so that you don't
        have to know the full ip number of the host, it's more convenient to
        call out a semi inteligable name eg 192.35.175.1 = csd.uwe.ac.uk but
        the 192.35.175 is aliased to uwe.ac.uk (University in the West of
        England, academic community, United Kingdom). Again this should be
        given to you with a registered ip address but for now you could put
        in 'at.linux.net' it can be changed later.

        mdw: In short the domain name is the name of your ENTIRE domain.
        For instance, my machine is loomer.ithaca.ny.us. The full hostname
        of the machine is 'loomer.ithaca.ny.us', and the DOMAIN name is just
        'ithaca.ny.us'. Here you're being asked for the DOMAIN name only.
 
                Name Server for Domain (aaa.bbb.ccc.ddd)

        If you're on a University or business network, you'll probably have
        a nameserver. A name server just looks up machine names for you.
        For example, if you want to telnet to 'shoop.vpizza.com', you don't
        have to tell your machine what shoop.vpizza.com's IP address is; your
        machine can ask the nameserver instead.

        Ask your local network people what the nameserver for your network is.
        Here you're being asked for the IP address (number) of the machine,
        not the name. If you don't have a nameserver, then just put in your
        own IP address, and you can either run named or go without a nameserver
        (putting all of your names/IP addrs in /usr/etc/inet/hosts).
 
5. Other /usr/etc/inet configuration files

        Ok time for a quick check of what you minimally *SHOULD* have in
        /usr/etc/inet:
 
        config - This sets up the ethernet ip tables.
        inetd - Daemon process that invokes other network daemons
        inetd.conf - Configuration file for inetd about the other daemons
        install.net - The semi automatic script I just talked about
        named-xfer - Used for updating the nameserver records
        named.reload - used to load in the named
        named.restart - user to stop and restart the named process
        rc.net - a network rc file called from /etc/rc.local
        services - a file specifying what 'port' numbers certain
                          services are available on
        telnetd - daemon for accpting incoming telnet requests
        named - the nameservice daemon
        Other daemons, such as fingerd, tftpd, and so on.
 
Time for some explainations I think...

5.1 config
        'config' is a general do it all 'fix your ethernet board to your
        local setup' command. It was configured when you ran the install.net
        script and if you look at the rc.net file you'll see where it plugged
        in all the IP stuff that you fed the script with... a bit technical
        but otherwise nothing to worry too much about provided that your
        original information was correct. One thing though, I have found that
        it is best to edit the rc.net file and 'hard wire' the ip addresses
        directly in rather than relying on the grep search from /etc/hosts but
        you may disagree (personal preferance).

5.2 host.conf
        You'll have to create this file yourself if you don't have it.

        With the new net-libs being made available by Mitch, you will find
        that it is possible to set up how ip addresses are looked up using the
        file /usr/etc/inet/host.conf with the entries:

                order hosts,bind
                multi

        which tells it in what order it should attempt to resolve an IP/domain
        name. In this case, when trying to match hostnames & ip addresses,
        the name binding libraries will search /etc/hosts and if no match is
        found then query the nameserver).

        If you run named then this is moot; you're your own nameserver. See
        below about named.

5.3 inetd
        'inetd' is a daemon process that wait's for certain events to happen
        upon which it will select which process to run eg if no network
        communication is happening, only inetd will be running but if a telnet
        session is requested by a remote machine, inetd will start running
        telnetd for that incoming call to connect to.

5.4 inetd.conf
        Of much more interest is 'inetd.conf' which has information about what
        services to run and where to find them. Here's an example:

# Serv type packet wait/nowait run as program to run invoke as
#
telnet stream tcp nowait root /usr/etc/inet/telnetd telnetd
talk dgram udp wait root /usr/etc/inet/ntalkd talkd
echo dgram tcp nowait root internal
ftp stream tcp nowait root /usr/etc/inet/ftpd ftpd -l

        The net-bin-0.2 README file has a list of entries which you may add
        to inetd.conf. NOTE that inetd.conf cannot have any blank lines in it.
        This is a bug which will be fixed soon. Also, don't start services
        you don't need or don't understand, like tftpd. They will only waste
        resources and may have security implications.

5.5 protocols
        Now another file that comes to mind at this stage is /etc/protocols or
        rather /usr/etc/inet/protocols (I've made the symlink
        /etc/protocols -> /usr/etc/inet/protocols)
        This file contain's information on what protocol is to be used
        when the datagram packet arrives ie how it is to be treated.

        Here's an example /usr/etc/inet/protocols file:

        # protocols - standard well defined IP protocols
        ip 0 # internet protcol, pseudo protocol number
        icmp 1 # internet control message protocol
        igmp 2 # internet group multicast protocol
        ggp 3 # gateway -> gateway protocol
        tcp 6 # transmission control protocol
        egp 8
        pup 12 # PARC universal packet protocol
        udp 17 # user datagram protocol
        idp 22
        raw 255 # raw

        There are others but these are normally never needed.
        (NOTE: the /etc/protocols from the tcpip-0.8 distribution defines ggp
        to be 2 which isn't the case)

        If this file is missing or empty, you will never get any transports
        (ftp/telnet) to work and will be told that there isn't any such
        protocol.

5.6 services
        'services' is a file which informs the tcp/ip code what port number a
        particular program will run on for example if you telnetted to port 7
        on a sun you would be connected to an echo service which would send
        back a carbon copy of what you typed in but that service has a
        specially allocated port number referenced in the /etc/services file
        of both machines.
 
        There is a complete standardized services file in circulation from Ross
        Biro; it is included in the tcpip-0.8-fixes.tar.Z package.
 
        Ross: This is the one I made from the relevant rfc. It has some
        typos and such here, but it is probably ok for most use.

        Here's a *small* excerpt (not the entire file):

# /usr/etc/inet/services
tcpmux 1/tcp # TCP Port Service Multiplexer
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/udp users
systat 11/tcp users
daytime 13/udp
daytime 13/tcp
daytime 13/udp
ftp-data 20/tcp
ftp 21/tcp
telnet 23/tcp
smtp 25/tcp mail #Simple Mail Transfer
time 37/udp timserver
time 37/tcp timerserver # time
name 42/tcp nameserver
name 42/udp nameserver
whois 43/udp nicname
whois 43/tcp nicname
nameserver 53/tcp domain
nameserver 53/udp domain

        The other files in /usr/etc/inet are described in the named section
        below.

---- end of part 1/2

-- 
Matt Welsh, mdw@tc.cornell.edu 
  "What are you doing, Dave?"