Linux Networking FAQ (Part 2)

Linux Networking FAQ (Part 2)

Post by Matt Wel » Sat, 20 Feb 1993 05:33:34



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

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

-------
6. Names and name servers, what /etc/hosts is all about.

        The internet protocol document defines names, addresses and routes
        as follows:

                A name indicates what we seek.
                An address indicates where it is.
                A route indicates how to get there.

        Every network interface attached to a tcp/ip network is identified by a
        unique 32-bit IP address. A name (hostname) can be assigned to any
        device that has an IP address. Names are assigned to devices because,
        compared to numeric Internet addresses, names are easier to remember
        and type correctly. In use, most of the tcp/ip software on linux can
        interchangeably use name or ip address but whichever is chosen, it is
        always the IP address that is used to make connections. Translating
        names into addressses isn't simply a "local" issue. The command
        'telnet fred.at.linux.net' is expected to work correctly on every host
        that is connected to the network. If the machine is connected to the
        Internet, hosts all over the world should be able to translate the
        name into a valid IP address, therefore, some facility must exist on
        the net to translate the name into the numeric IP address.

        There are two methods for doing this: one involves using a local lookup
        table ('/usr/etc/inet/hosts') and the other uses DNS (Domain Name
        System) to remotely interrogate the network for the IP address.

6.1 hosts
        '/usr/etc/inet/hosts' (or /etc/hosts) is a very simple file which
        contains a numeric IP address followed by one or more hostname
        aliases:

        # /usr/etc/hosts example
        # note that the hash is a comment, no text is processed after
        # it until the next <cr>
        #
        123.45.67.20    csd csdsun csd.uwe.ac.uk csdsun.ac.uk
        123.45.67.21    manic manic.uwe.ac.uk   # Tom's machine
        123.45.67.22    chef chef.uwe.ac.uk     # Main waste of money
        # other nets
        192.35.173.1    hal hal-9000            # local hidden host
        192.35.173.2    slave slave.uwe.ac.uk   # linux engine 485 25
        192.35.173.30   zen zen.uwe.ac.uk       # Interactive 2.2.1 386 33
        192.35.173.35   thing
        # external nets
        162.34.32.22    weird.emer.cty.oz

        Clearly this has a limitation in that on large networks ALL machines
        would have to have this information on disk and that could have 1000's
        of entries. Just think what that means if an extra 120 machines were
        added! 1000's of machines would have to have their /etc/hosts table
        updated either by hand or automatic shell scripts calling the list
        from a main machine... (see where this is leading?) Enter the DNS
        service...

        The SLS /etc/inet/hosts file is more involved, it specifies the
        router, network, and IP addresses. It's pretty self-explanatory
        but you should edit this file (because most everything's set here,
        as install.net isn't used with SLS).

6.2 DNS: Domain Name Service
        DNS scales well. It doesn't rely on a single large table; it is a
        distributed database system that doesn't bog down as the database
        grows.  DNS currently provides information on approximately 700,000
        hosts. DNS also guarentees thst the new host information will be
        disseminated to the rest of the network as it is needed.

6.2.1 named: running DNS from your own machine
        If you don't have a nameserver (which services DNS requests for you),
        and aren't just using loopback, then you can run named on your own
        machine. Named will allow you to setup a subsection of the DNS database
        for use on your own machine and local network. There are a number of
        files to be edited.

        These are:
                /usr/etc/inet/resolv.conf
                /usr/etc/inet/named.boot
                /usr/etc/inet/a_hosts_table (can be called anything, usu.
                  just named.hosts)

        If you have a nameserver, the only file you need is resolv.conf,
        where you define your domain name and nameserver's IP address.
        These are both set up by install.net. For example:

resolv.conf:    
        domain          uwe.ac.uk
        nameserver      192.35.173.21

        However, if you're going to run named you need to define the
        'nameserver' in resolv.conf to be YOUR OWN IP address. And you need
        to provide information in named.boot and a_hosts_table....

resolv.conf:
        domain          uwe.ac.uk
        nameserver      192.35.173.2

named.boot:
        domain  uwe.ac.uk
        primary uwe.ac.uk       /usr/etc/inet/a_hosts_table

a_hosts_table:
        @       IN      SOA     slave.uwe.ac.uk. root (
                        1.1     ;serial
                        3600    ;refresh every 10 hours
                        300     ;retry every 6 minutes
                        36000000;expire after 1000 hours
                        3600 )  ; default ttl is 100 hours
                IN      NS      slave.uwe.ac.uk.
        slave   IN      A       192.35.173.2  
        hal     IN      A       192.35.173.1
        zen     IN      A       192.35.173.30
        .
        .
        .
        mother  IN      A       192.35.173.69

        If you're going to run named, resolv.conf, named.boot, and
        a_hosts_table will suffice, BUT there are more (for other fun named
        options, etc.)

6.2.2 More complete list of named setup files
        YOU DON'T NEED to run named if you're only using loopback OR if
        you have a nameserver. It's a waste of CPU time and memory. But if
        you don't have a nameserver or if you just feel like hacking it,
        here's a more complete named setup:

        resolv.conf:    If this file exists, it is read each time a process
                        using the resolver starts. As a result, the file is
                        not normally created unless necessary and isn't used
                        if named is running. You should have it anyway in case
                        named dies. :)
        named.boot:     Sets general named parameters and points to the
                        sources of the domain database information used
                        by this server. The sources can be local disks or
                        remote servers.
        named.ca:       Points to the root domain servers
        named.local:    Used to locally resolve the loopback address
        named.hosts:    The zone info file that maps host names to IP addresses
        named.rev:      the zone file for the reverse domain that maps IP  
                        addresses to host names (you'll prob never touch it
                        so i'm going to skip it's description unless people
                        get upset enough to lynch me)

6.2.2.1 hostcvt
        *** STOP PRESS ***

        I've just found out from Ross by sheer accident that there is a
        program released in comp.sources.unix (volume25) called hostcvt (mutter
        mutter) which is supposidly capable of converting /etc/host entries
        into the nesessary corrisponding named files.

        This program is now available on sunsite.unc.edu for Linux, in
        /pub/Linux/system/network. It's also distributed on SLS.

        *** RESUME PRESS ***

6.2.3 Where DNS gets its information
        The 'named.boot' file points to sources of DNS information.
        Some of these sources are local files; others are remote servers. You
        only need to create the files referenced in the primary and the cache
        statements.

DNS commands    |  functions
----------------+--------------------------------------------------------------
directory       |      Defines a directory for all subsequent file referances
primary         |      Declares this server as primary for the specified zone
secondary       |      Declares this server as secondary for the specified zone
cache           |      Points to the cache file
forwarders      |      Lists servers to which queries are forwarded
slave           |      Forces the server to only use the Forwarders
----------------^--------------------------------------------------------------

        Here are some example setups of the named files.

6.2.4 resolv.conf
        domain          uwe.ac.uk
        nameserver      192.35.173.2

        As mentioned before, if you are going to be using named, this file is
        usually disguarded. Otherwise it points to a server that the resolver
        is to query for domain information. If no nameserver entries are
        contained in the file, the local host is queried for the information.

6.2.5 named.boot:
        ; cache only server
        ;
        primary 0.0.127.IN-ADDR.ARPA    /usr/etc/inet/named.local
        cache   .                       /usr/etc/inet/named.ca

        The loopback domain is an in-addr.arpa domain that maps the address
        127.0.0.1 to the name localhost. The idea of resolving your own loopback
        address makes sense to most people, so most named.boot files contain
        this entry.

6.2.6 named.boot:
        ; Primary name server boot
        ;
        directory                               /usr/etc/inet
        primary         big.cty.com             named.hosts
        primary         54.152.IN-ADDR.ARPA     named.rev
        primary         0.0.127.IN-ADDR-ARPA    named.local
        cache           .                       named.ca

        The directory statement tells named that all subsequent filenames are
        relative to the /usr/etc/inet directory. The first primary statement
        declares that this is the primary server for the big.cty.com domain and
        that the data for that domain is loaded from the file named.hosts. The
        second primary statement points to the file that maps IP addresses from
        152.54.xxx.xxx to hostnames. This statement says that the local server
        is the primary server for the reverse domain 54.152.in-addr.arpa and
        that the data for the domain can be loaded from the file named.rev.

6.2.7 DNS Resource Records (RR's)
        Resource Records are used in the named files to set attributes of
        addresses, networks, and so on. Here's a list of the RR types:

Resource Record         Record type     function
-----------------------------------------------------------------------------
Start of authority      SOA             Mark the beginning of a zone's data,
                                        and define parameters that affect the
                                        entire zone
Name server             NS              Identifies a domain's name server
Address                 A               Converts a host name to an address
Pointer                 PT              Converts an address to a hostname
Mail Exchange           MX              Identifies where to deliver mail for a
                                        given domain name
Canonical name          CNAME           Defines an alias host name
Host information        HINFO           describes a hosts hardware and OS
Well Known Service      WKS             Advertises network services
------------------------------------------------------------------------------

        These resourse records are defined in RFC 1033.
        The format of DNS resourse records is:
                [name] [ttl] IN type data

        name:   This is the name of the domain object the resource record
                references. It can be an individual host or an entire domain.
        ttl:    time-to-live defines the length of time in seconds that the
                information in this resource record should be kept in the
                cache. Usually this field is left blank and the default ttl
                set in the SOA is used.
        IN:     Identifies the record as an internet DNS resource record. There
                are other classes of records, but they are not used by the DNS
        type:   Identifies what kind of resourse record this is
        data:   the information specific to this type of resourse record

6.2.8 The cache Initialization file
        The basic 'named.ca' file contains "NS" records that name the root
        servers and "A" records tha provide the addresses of the root servers.
        A basic 'named.ca' is shown here:

named.ca:
        ; named.ca - typical setup
        ;
        ; Servers for the root domain
        ;
        99999999        IN      NS      tsx-11.mit.edu.
        99999999        IN      NS      nic.funet.fi.
        ;
        ; Root servers by addresses
        ;
        tsx-11.mit.edu. 99999999        IN      A       231.232.21.12
        nic.funet.fi.   99999999        IN      A       123.45.67.32

        Note that the ttl is 99999999 the largest possible size so that the
        root servers are never removed from the cache.

6.2.9 The 'named.local' file
        The 'named.local' file is used to convert the address 127.0.0.1 (the
        loopback address) into the name localhost. It's the zone file for the
        reverse domain 0.0.127.in-addr.arpa. Because ALL systems use 127.0.0.1
        as the loopback address, this file is virtually identical on every
        server.

named.local:
        @       IN      SOA     slave.uwe.ac.uk. root. (
                                1       ;       serial number
                                36000   ;       refresh every 10 hrs
                                3600    ;       retry after 1 hr
                                3600000 ;       expire after 1000 hrs
                                36000   ;       default ttl is 10 hrs
                                )
                IN      NS      slave.uwe.ac.uk.
        1       IN      PTR     localhost.

6.2.10 The 'named.hosts' file
        The 'named.hosts' file contains most of the domain information. This
        file converts host names to IP addresses, so "A" records predominate,
        but it also contains "MX", "CNAME" and other records.

named.hosts:
        ; named.hosts file example
        ;
        @       IN      SOA     slave.uwe.ac.uk.       probs. (
                                1       ;       serial
                                36000   ;       refresh every X seconds
                                3600    ;       retry every X seconds
                                3600000 ;       expire after X seconds
                                36000   ;       default time to live X seconds
                                )
        ; define nameservers and mailservers
                IN      NS      slave.uwe.ac.uk.
                IN      MX      csd.uwe.ac.uk.
        ;
        ; define localhost
        ;
        localhost       IN      A       127.0.0.1
        ;
        ;hosts in this zone
        ;
        loghost         IN      A       192.35.173.1
        hal             IN      A       192.35.173.1
        zen             IN      A       192.35.173.30
        thing           IN      A       192.35.173.35
        slave           IN      A       192.35.173.2
                        IN      MX      2       192.35.173.2
        servant         IN      CNAME   slave.uwe.ac.uk.
        mother          IN      A       192.35.173.69
        ;
        ; outside domains now follow
        ;        
        csd             IN      A       192.35.175.1
                        IN      MX      5       192.35.175.1
        csdsun          IN      CNAME   csd.uwe.ac.uk.
        chef            IN      A       192.35.176.1
        ;
        ;fictional outside gateway
        midway          IN      A       166.23.44.2
        ;
        ; etc until you have built a reasonable host table
        ; that you feel will be adaquate for your network

7. NFS: The Network File System
        Network filing systems are convenient mechinisms which allow your
        machine axcess to more disk space that it actually has by 'borrowing'
        disk space from another networked machine for either sharing of common
        data or if allowed, the storing of data generated by your machine.

        NFS has several benefits:
        1)      it reduces local disk storage requirements because
                a network can store a single copy of a directory, while
                the directory continues to be fully accessible to everyone
                on the network.
        2)      NFS simplifies central support tasks, because files can be
                updated centrally, yet be available throughout the network.
        3)      NFS allows users to use familiar UNiX commands to manipulate
                files with rather than learning new ones. There is no need
                to use rcp/tftp/ftp to copy files, just 'cp' will do.

        As of 0.99.2 support has been added into the kernel for running
        binaries on both the MSDOS and NFS filesystems (of course the
        binaries have to be Linux type binaries to run on your system).
        Linus warns that they'll be slower to load and won't be memory
        effecient; there are hopes that this will change soon.

        Linux now has the following filesystems available for it: minix,
        extfs, msdos, proc, isofs, nfs with a view to a compressed
        filesystem being worked on (zfs?) all are perfectly transparent to
        each other although filename tructation may occur. The reason that I
        mention this is that NFS will allow you filename lengths supported by
        the type of filesystem you mount eg the HP9000 here supports 15 char
        filenames on an NFS mount as does it's MAG-OPT drive whereas the
        sun4's offer 255 char filename on their NFS exports.

7.1 The '/etc/exports' file
        If you want your machine to be an NFS server for other systems,
        you must run nfsd, mountd and edit /etc/exports.

        '/etc/exports' allows your machine to decide what local filesystems it
        will allow remote clients to NFS mount and decide what access those
        clients should have to your filespace.
        Example (I just love examples):

        /       slave(root_quash) moonbeam(root_quash)
        /usr    (ro,root_quash)
        /home   slave csdsun

--------v----------------------------------------------------------------------
flag    |       function
--------+----------------------------------------------------------------------
ro      |       read only, this is the default
rw      |       read and write, used to allow a client to write to that FS
--------^----------------------------------------------------------------------

        There are other options but these are covered in the README for the
        NFS kit and the above are the simplest to get to grips with.

7.2 The /usr/etc/inet/rc.net file
        The file 'rc.net' is used to start the named services and nfs the
        suggested setup is as follows:

        .
        .
        .
        if [ -f /etc/portmap ]
        then
                echo "Starting portmapper..."
                /etc/portmap
                if [ -f /etc/exports ]
                then
                        echo "Starting nfsd..."
                        /etc/nfsd
                        echo "Starting mountd...."
                        /etc/mountd
                fi
                echo
                mount -vt nfs fish:/pub /pub &
                mount -vt nfs sparky:/mnt/a /test &
        fi

        Here if the portmapper isn't running it is started. Once started, it
        is now possible to 'hang' the nfsd daemon as well as the mountd daemon
        off it.  The two mount commands are from the modified mount command
        that come with the NFS package and both are run in the background so
        that if one of the servers were unreachable the system would continue
        to try while going on to finish the system setup and allow root/users
        to login.  The '-vt nfs' bit isn't nessessary as the mount program
        understands the nfs syntax and mounts it as an nfs system but I
        include it anyway.

8. '...And on the 6th day she said, "let there be connectivity"...'

        All this is well and fine but shows nothing of how to use the various
        utilities commonly taken for granted in networking. ie telnet & ftp
        and X11.

8.1 telnet      
        Normally people would telnet over a LAN (Large area network)
        to a remote site simply to play a mud (multi user dungeon) which runs
        on a socket say port number 4000 so the command 'telnet
        wopr.magic.mount.mil 4000' would connect to a service offered by that
        machine on port 4000. Now then, sockets are most easily perceived as
        'openings' in a wall where data may pass through in a uni/bidirectional
        fashion, there are any number of ports available for use and quite a
        few reserved port sockets can be found in your /etc/services file.
        For example by telneting to port 7 of your target machine you should
        be able to communicate with the computer by typing in a few charcters
        and pressing return. Port 7 is the echo service and any input you type
        should be sent back exactly as you sent it. In normal use, however,
        telnet connects to port 23 where a login service is provided for
        interactive logins to the system.

        The canonical usage of telnet is just
                telnet <hostname>
        where <hostname> is another machine on the net that you want to
        log into.

8.2 ftp
        Ftp allows the user to transfer files from the host to the target
        machine but requires the user to login as (s)he would normally. Once
        logged in the user can transfer files both into and out of the machine
        with simple commands like 'get text.doc' or 'send report.wps'. Ofter
        ftp is used in the 'get' mode and when browsing sites it is usefull to
        know that you can peek at the contents of a small README file using
        the command 'get README.requirements /dev/tty' which will transfer the
        contents of the file to your tty line (in english: the screen)

        To start up FTP, just do
                ftp <hostname>
        where <hostname> is the machine you want to upload/download from.
        For public FTP service, login on the remote machine as "anonymous"
        and give your e-mail address as the password.

8.3 X11 and networking
        After you have networking set up, you can now run X Windows across the
        network. For example, you can login to a remote machine in one xterm,
        and from that machine run an X program and direct it to display on
        your machine. For example, if your Linux machine is called "shoop", on
        the remote machine the command
                xclock -display shoop:0 &
        would display the clock on shoop's display.

        Before you can do this, however, you must run the command "xhost" on
        shoop to allow the remote machine to display on shoop. If the
        remote machine is "loomer", from shoop you must run the command      
                xhost loomer
        to give loomer this access.

        This is the entire concept underlying X Windows: you can now run huge
        programs (such as Mathematica) on remote machines and have them
        display on your Linux box.

9. Standalone named Configuration

        What follows is an example named configuration for a local (2-machine)
        isolated network.

        Well after some peer pressure, I see that I'm going to have to include a
        standalone configuration in the FAQ as well. According to my
        sources/hallucinations, there is an accepted address that is for
        'junk' setups so as not to conflict with other machines on the
        internet. That address is 192.0.2.xxx where xxx ranges 0..255.
        (This address is not routed through the internet so you should be
        relatively safe from ip address clashes).

        I'm going to assume that your configurations will be held in /etc so
        the following files will be referanced there instead of /usr/etc/inet
        or /etc/inet. (NOTE: This deviates from the discussion above. /etc
        is fine to use instead of /usr/etc/inet as long as you're
        consistent).

        A while ago I posted a couple of messages concerning the setup
        of the named daemon config. files for a simple isolated
        network with a local nameserver. Since nobody responded with
        a ready-to-go solution I decided to dig a little deeper into
        the subject. As a result I've now got a working nameserver.
        This message describes the changes I made. Here goes:

9.1 General Info
        My isolated network consists of 2 machines, called whisky
        and jenever which are both located in the domain vdm. Whisky
        has IP address 192.0.2.1 and jenever has IP address 192.0.2.4.
        The nameserver runs on whisky, and jenever accesses whisky to
        resolve names.

        Starting point is SLS 0.98pl5. This distribution contains
        install.net and hostcvt, which are supposed to make network
        installation easier, but they where of no help to me. Instead,
        I manually changed the files concerned.

9.2 Common changes to files for both machines.
        /bin/hostname machine_name added to /etc/rc. Machine_name
        stands for either whisky or jenever. This command should
        be placed before the /bin/sh rc.local command. Further
        hostname commands removed from /etc/rc and /etc/rc.local.

        In /etc/inet/rc.net HOSTNAME=softland changed to
        HOSTNAME=machine_name. Commented out the IPADDR= line
        and inserted IPADDR=192.0.2.1 or IPADDR=192.0.2.4.

        ROUTER set to 0.0.0.0 and NET set to 192.0.2.0. In the
        third $CONFIG line eth0 changed into eth_if (I use an
        Artisoft network card, this isn't necessary for standard
        WD network cards).

9.3 Changes for the nameserver (whisky in my case).
        For a nameserver the portmap, inetd and named daemons
        should be started. This is done in the /etc/rc.net
        file.

        named.boot contains
        -----------------------------------------------------
        directory       /etc

        domain          vdm
        primary         vdm                     named.hosts
        primary         2.0.192.in-addr.arpa    named.rev
        primary         0.0.127.in-addr.arpa    named.local
        -----------------------------------------------------

        named.hosts contains
        -----------------------------------------------------
        @       IN   SOA  whisky.vdm.  root.whisky.vdm. (
                          1    ; Serial
                          3600 ; Refresh
                          300  ; Retry
                          3600000   ; Expire
                          14400 )   ; Minimum

                IN      NS      whisky.vdm.

        localhost       IN      A       127.0.0.1
        whisky          IN      A       192.0.2.1
        jenever         IN      A       192.0.2.4
        -----------------------------------------------------

        named.rev contains
        ------------------------------------------------------
        @       IN      SOA     whisky.vdm. root.whisky.vdm. (
                                1 ;
                                3600 ;
                                300 ;
                                3600000 ;
                                3600 )

                IN      NS      whisky.vdm.

        1       IN      PTR     whisky.vdm.
        4       IN      PTR     jenever.vdm.
        ------------------------------------------------------

        named.local contains
        ----------------------------------------------------------
        @       IN      SOA     whisky.vdm.     root.whisky.vdm. (
                                1;
                                36000;
                                3600;
                                3600000;
                                36000;
                                )

                IN      NS      whisky.vdm.
        1       IN      PTR     localhost.
        ----------------------------------------------------------

9.4 Changed for a non-nameserver (jenever in my case).

        For a non-nameserver only the portmap and inetd daemons
        have to be started. The startup of the named daemon in
        /etc/inet/rc.net can thus be commented out.

        A non-nameserver depends on a nameserver for name
        resolution. The non-nameserver is directed to a name-
        server by the /etc/resolv.conf file (NOT the
        /etc/resolv.conf as mentioned in a lot of doc. files).

        So, the /etc/inet/resolv.conf file on jenever contains:
        ---------------------
        domain vdm
        nameserver 192.0.2.1
        ---------------------

        That's all.

10. Troubleshooting and Common Problems

        Here are some of the most common problems with Linux tcp/ip.

10.1 config
        One of the most common complaints regards the 'config' command.  What
        isn't often noted is that this has to be recompiled from the 0.8.1
        sources (available currently as tsx-11.mit.edu:
        /pub/linux/ALPHA/tcpip/tcpip-0.8.1.tar.Z).

10.2 Library versions
        Another problem that crops up is that some binaries that are
        distributed require libc.2.2.2 to be present (i.e. the telnet and
        ftp in tcpip-0.8. ONLY use the binaries in net-bin-0.2 or a newer
        version (which use jump-4.2 or newer) and you're okay.

        Other people think that it's their version of libraries that cause the
        problem but can't find the source code for the various utils to
        recompile. Get the net-src-0.2.tar.Z package from sunsite or tsx-11
        and you're set; recompile at will. :)

10.3 kernel errors
        You boot the new kernel and suddenly all hell breaks loose... you
        have printk's telling you about RPC errors, framepacket errors etc...
        it looks a mess but the kernel keeps working... I suggest you grab
        HLU's bootdisk and edit your rc files again. Your problem here is most
        likely that you have accidentally attemped to use a working IP address
        as your own. If it's a sun's, you can expect the sun to lose all
        networking capabillity and not recover until lots of drastic commands
        are issued (fastboot won't help the guy either). I was asked to do
        this so I wasn't too fussed but loads os system admin people out there
        will get very ticked off if you do this deliberately.

10.4 named problems
        To check that something is working in named when it is run check out
        /usr/tmp/named_dumb.db. This is the file that named creates from all
        your configuration files. Check it exists, and contains formatted
        information similar to your named.hosts file. If it's zero length then
        something is wrong with your SOA record heading (A missing '.' perhaps).

10.5 More than one ethernet card in the machine, IRQ conflicts
        If you have more than one Ethernet card in your machine OR you have
        a device sharing the IRQ of your network card, you may have problems.
        Try pulling one of the cards and see what happens, or changing the
        IRQ (usually done with jumpers on the card).

        In the Linux kernel source, net/tcp/Space.c defines the network
        devices to configure. I hear that if you use the 8390/ne2000 driver
        on IRQ 5, the entry for the wd8003 card in Space.c will confuse things;
        thus just change the #ifdef around the wd entry in Space.c to something
        else so it's not compiled in.

        The following is provided by Ross Biro.

        If you get the message about time outs on the interrupt, you probably
        have your irq configured incorrectly.  The irq in Space.c (default 5)
        MUST match the one on your card.

        If nothing happens when you try to use an interface, check the irq
        and try to get a new copy of config.  Some versions fail to mark the
        interface as up (the config.c in tcpip-0.8-fixes should work).

        If you get messages about large packets and immpossible sizes to malloc,
        you have the memory on your card configured incorrectly, or there is a
        conflict with some other piece of hardware.  Fix this by checking that
        your memory is configued right in Space.c and if it still fails, try
        ALL possible locations in memory (people have suggested that higher
        seems to work better.)

        If you get a message about runt packets, you can safely ignore it
        and/or comment the printk (kernel debugging output function) out of
        we.c.  It indicates either a hardware problem or a initialization
        problem in we.c. It only seems to occur on some versions of the SMC
        Elite and there is other code to deal with the problem.

        Also Note if it works under DOS does NOT mean there is not a hardware
        problem.

10.6 General ideas
        Now then, to give you an idea of what is possible, I'll describe what
        I have setup and working. I have X11(Xfree86-1.2) running... In one
        xterm I have a dos session going, in another I have a telnet session
        connected to a sun (csd), and on that sun, i'm connected to a diku on
        the linux machine through 'telnet slave 4000', in yet another xterm I
        have an ftp session to yet another sun(chef) pulling CIA 10Megabugger
        world map onto an NFS mounted disk on another sun (hal) at a rate of
        about 35k/s (+/- 15k). I was going to mount up a swapfile on an NFS
        disk but decided against it on the grounds of what might happen if the
        external machine fell over while I was using that swapfile.

        Some relief can be found on the newsgroup/mailing lists but one thing
        that will *REALLY* help is this...

        #include <sanity.h>
        #include <sys/coherance.h>
        #include <sys/commonsence.h>

        char    alpha_test[1..80];
        FILE    *panic;

        if ((kernel == lastest_on_offer) && (tcpip_broke))
                {
                if (kernel_paniced)
                        {
                        fprintf(std_email,"give blurb about kernel\n");
                        system("nm ~linux/tools/system | grep <addr_of_err>");
                        listen();
                        }
                else
                        {
                        fprintf(std_email,"Conditions of error (recreatable)");
                        listen();
                        }
                }
        else
                {
                system(upgrade);
                system(try_again);
                exit();
                }

        (Sorry about that, we had a compitition to find out who could write
        the whackist pseudo C code) more simply stated, the error address that
        is reported by the kernel can be used with a kernel system file to
        tell us what function broke and how far into it it broke. See below
        for more on that:

Several things that can help

        1)      Upgrade your kernel to the latest one that you can grab  
                (currently at time of writting 0.99.4). Alternatively
                if you are running 0.98.5, all the patches are available
                on sunsite.unc.edu:/pub/Linux/system/Network/tcpip, but
                as always, think strongly of going to a higher kernel
                version as they nearly alwas have all the patches applied
                for tcpip and other misc stuff.

        2)      Join the NET mail channel, you can learn an awful lot
                from the guys on this channel (like the various new
                copyrighted techniques for tearing out your hair)

        3)      Try and upgrade your C compiler and libraries to at least
                version 2.3.3 if possible.

        4)      Binary distributions of various network probrams can be
                found on sunsite.unc.edu,.. always read the README files
                they are there for a reason! (personal show/contacts/etc..)
                nic.funet.fi and txs-11.mit.edu also have good variation
                in utilities that you can use. Also don't forget that a lot
                of network programs will compile reasonably well although,
                be prepared for unexpected weeks of fustration.

        5)      Depending on your type of problem, contacting the author
                of the software or the person who ported the software would
                be a better choice.

        6)      If you are experiencing problems with missing files which are
                placed where you think they *should* be, it's always worth
                trying the following to find out what files are being used

                        strings <prog> | less

                This should show up any hard linked files in the binary.
                eg differing versions of telnet will look at /etc/services OR
                /usr/etc/inet/services, therefore, it is a good idea to have
                a symlink from one to the other eg

                        ln -s /etc/services /usr/etc/inet/services

        7)      If the kernel panics, jot down the address next to EIP. Then do
                an 'nm /usr/src/linux/tools/system | sort -n' and find out what
                function the given EIP address is in. This will help a lot. If
                you simply post the panic message to the newsgroup, everyone's
                kernel is different so it doesn't tell us much.

        7)      Complain bitterly to me if I haven't covered your problem  
                and I'll get it sorted for the next NET-FAQ.

11. Cast of this production

Ross Biro       -       Without whom all this wouldn't be possible
                        and who pointed out holes in my documentation.
                        Also contributed the history of tcp/ip on linux
                        after he saw my rather perverted view of it.

Mitch DeSouza   -       Constant alpha tester. Also pointed out mistakes
                        and made critical and helpfull suggestions (like
                        getting a spell checker). Also gave me his Tel No.
                        which I used to annoy him with.

Rick Sladkey    -       The current author of the NFS client code in the
                        kernel.  He also ported the NFS server and the RPC
                        library.

Donald Becker   -       Author of the drop in drivers for the linux kernel
                        allowing the following cards to be used,
                        3com503, 3com503/16, NE2000, NE1000 and even a
                        3com501 (Donald: 'not recommended').

Matt Welsh      -       Trashed, er... reformatted this document, tried
                        to clean it up. Wrote the tcp/ip quick start guide and
                        answers tcp/ip config questions.

The pioneers    -       These are the fearless people who brazenly marched
                        their filesystems towards complete oblivion and
                        watched weeks of work evapourate in milliseconds
                        without a shred of hate for the OS that they had come
                        to love.

The supporting  -       You know who you are (probably, depending on how
extras                  much virtual beer you had last night) for contributing
                        to the network code with the various bug reports that
                        inevitably crop up.

Linus Torvalds  -       The elusive ecentric UNiX kernel coder who probably
                        burns more CPU time on compiling than anyone else
                        Here's to a long and healthy kernel development
                        program and a Nobel equiv award for his efforts.

The critics     -       For reminding me that it's a thursday... I never
                        could get the hang of thursday's...

Myself (Phil)   -       The only sad person to take on the FAQ because I was
                        getting annoyed at the number of 'petty' tcp/ip code
                        problems being asked on the net. Besides of which I
                        wanted to give something useful towards Linux which
                        I've used since 0.10 (does this make me a veteran?)

Phil    (The non spell checking insomniacial/palagerist who never learnt
=--=     english grammer)

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