[1168] in linux-net channel archive
Re: Linux as a Ether->SLIP router? (solution with exact commands)
daemon@ATHENA.MIT.EDU (Tuukka Tikkanen)
Thu Oct 5 09:33:42 1995
Date: Thu, 5 Oct 1995 07:57:49 +0000
From: Tuukka Tikkanen <tic0@sata.fi>
To: "Stephen D. Williams" <sdw@lig.net>
cc: Linux Mail <linux@VCLINUX.vic.uh.edu>, linux-net@vger.rutgers.edu
In-Reply-To: <m0t0V2m-0009ywC@sdwsys>
This seems like a FAQ so I'm posting this on the list as well. However I
have very high doubts that anyone needing this information would happen
across it... :( The following should be very generic...
On Wed, 4 Oct 1995, Stephen D. Williams wrote:
> > This seems to be a somewhat popular question, but I have yet to see this
> > variation and/or an actual solution.
> > I have a local ethernet (3 Linux boxes), I would like to use one of them
> > (via a slip connection, to another Linux box) as a router for my local
> > net to access
> > the Internet. I help to administer the net on the other end (At a local
> > College) and can assign the machines on my local net actual IP
> > addresses. I have IP-forwarding/Gatewaying compiled into the Kernel of
> > both machines (on either end of the SLIP connection). I ran routed and
> > added routes on the remote Linux box to my network, but I don't
> > think I did it right i.e. it didn't work. Since then I have read several
> > FAQ's newsgroups, irc'ed, etc, and have got answers from having to use
> > SLIRP-PROXY to using IP-masquerading. I don't see why these strange
> > methods should be necessary. This should be a simple router. I saw in
> > comp.os.linux.networking something about a gated daemon? but I have
> > Gatewaying compiled into the kernel...
Forget about gated/routed/whateverd, since this is so simple
configuration that you don't need any. This is what you want:
Internet
|
router-------college network-------------------
| | | |
foo bar linux (1) baz
| slip
linux (3) linux (4) linux (2)
| | |
--------private ethernet---------------
On box 1 (college slip server)
a) setup whatever is needed for normal operation without all this
b) get slip link up (just get sl0 up)
c) ifconfig sl0 <linux-1-name-or-address-here> netmask 255.255.255.254
d) route add <linux-2-name-or-address-here> sl0
e) route add <linux-3-name-or-address-here> sl0
f) route add <linux-4-name-or-address-here> sl0
g) arp -s <linux-2-name-or-addr> <linux-1-ethernet-hw-addr> pub
h) arp -s <linux-2-name-or...> <linux-1-ethernet-hw-addr> pub
i) arp -s <linux-2-name-or...> <linux-1-ethernet-hw-addr> pub
steps d-f enable linux-1 to send any packets IT has appropriately over
the slip link to the other end.
steps g-i enable all other machines on college network to send their
packets to linux-1 for sending over the slip line.
On box 2
a) setup slip link
b) ifconfig sl0 <linux-2-name-or-addr>
c) ifconfig eth0 <linux-2-name-or-addr>
d) route add default sl0
e) route add <linux-3...> eth0
f) route add <linux-4...> eth0
On box 3/4
a) ifconfig eth0 <own-name-or...>
b) route add <linux-2....> eth0
c) route add <linux-3/4,the other> eth0
d) route add default gw <linux-2>
you may omit "eth0" in 2e,f and 3/4b,cc if you don't use IP masquerade.