How to connect a whole LAN to the 'Net via slirp
================================================

From the very beginning, slirp was designed to allow more than one host
access the 'Net at once.  And doing so is *very* easy.

First, you need to setup the LAN as if it was really going to connect to the
Internet.  That is, you must give them each a unique IP (unique relative to
each other, not globally unique... eg: you could give them all an IP in the
10.0.2.xxx class of addresses).  You also must tell each host on the LAN to
route it's IP packets to the host that is connected to the Net via slirp.

Here's a diagram:

                           [Ethernet]
        -------------------------------------------------
           |         |         |         |         |
	[Host A]  [Host B]  [Host C]  [Host D]  [Host E]
           |                                       |
	   |                                       |
	   | <- Slirp link                         | <- SLIP link
	   |                                       |
	   |                                       |
      [Remote Host]                           [Another LAN]
           |
          ... to the Internet


Now, in this diagram, Host A is the slirp-connected host.  Host's B through
to E can also access the 'Net by simply using Host A as the gateway.  Host A
also must be told to "forward" IP packets (using Remote Host as the gateway)
so that it will send any IP packets not destined for itself to slirp, and
vice versa (route all packets sent by slirp, not destined for itself, back
to their respective host's IP).

In other words, the slirp link is really a pseudo-SLIP/PPP link, hence the
title "a TCP/IP emulator over the (C)SLIP/PPP link-level protocols" :)

Note that it is possible to hook up many LAN's to the 'Net by simply
following the normal Internet conventions, and route the packets properly.
In this case Another LAN would use Host E as a gateway to the 'Net, Host E,
provided it can forward IP packets, will send them to it's gateway, Host A,
which will send it over slirp, etc. etc.  In theory, you could connect
another whole Global Internet to the current Internet with no IP address
clashes.  Not recommended though :)

If you already have a REAL SLIP/PPP connection and you want to connect the
rest of your computers to the 'Net as well, then the above diagram applies,
but Remote Host is the SLIP/PPP-connected host.  That is, you'd connect one
of the other machines to the 'Net connected machine via slirp, and route all
packets to this slirp-connected host (NOT the real SLIP connected host).
This is cumbersome, and it's also hard to establish a SLIP/PPP link over
ethernet, so you'd probably have to use a NULL modem cable to link the 2
hosts.

Have fun!


Dan ...
