[703] in linux-net channel archive
Re: Linking 2 Ethernets using SLIP
daemon@ATHENA.MIT.EDU (Al Longyear)
Sun Jul 16 20:39:10 1995
From: longyear@netcom.com (Al Longyear)
To: fpriano@ull.es (Felix Herrera Priano)
Date: Sun, 16 Jul 1995 12:30:13 -0700 (PDT)
Cc: linux-net@vger.rutgers.edu
In-Reply-To: <480*/S=fpriano/O=ull/PRMD=iris/ADMD=mensatex/C=es/@MHS> from "Felix Herrera Priano" at Jul 16, 95 09:09:49 am
Felix Herrera Priano wrote:
> Below I enclose the configuration I'm trying to setup (Actually I'am using
> the figure of an old message to this list from eichin@cygnus.com...thank you
> ..I did not feel like drawing it again):
>
> 193.145.101.61
>
> |-------| ethernet |---|
> |Gateway|------------+---------| B | 193.145.101.57
> |-------| | |---|
> |---| |
> | x | .. | <--SLIP
> |---| |
> |---|
> | A | 193.145.101.54
> |---|
> | ethernet - 7 computers
> +---------+------+---------------
> | | |
> |---| |---| |---|
> | m | | n | | o | ...
> |---| |---| |---|
>
> Machine B is acting like a SLIP server and it works great.
>
> "x" are machines on my 1st Ethernet network.
>
> "Gateway" goes to the rest of the Internet.
>
> Now I am trying to connect the 7 computers' ethernet (m, n, o, ..) to the rest
> of the World.
>
> - PLEASE, do you know how to setup machine B to do the routing between my
> two Ethernets?
!! >> Both machines A and B need the kernel compiled with the IP Forwarding
!! >> set to yes.
Aside from the gateway, none of the other systems in this network
would have this value set.
> - Probably it is better and faster to use B like a bridge. I have free
> IP numbers (193.145.101.53, 52, 51 ...) on the same subnet to do it.
> What do you think? Do I need to specify some specific routing table?
It is better that you separate the two networks into two different subnets
and use routing rather than bridging.
The routing is performed using a network route (route add -net ...) when the
SLIP link is brought up at either end. Each side would add their own route
when the link comes up and remove it when the link goes down.
Systems such as 'x' would have a network route to 'B' as the gateway for
systems on the 'A' subnet since you have two routers on the 'A' subnet.
You could just put the route for the 'A' subnet in 'B' and the gateway. If
'x' sent a frame to the gateway because it had only a default route to the
gateway then the gateway should send an ICMP redirect to 'x' telling it to
use 'B'. From then on, the frames will go directly to 'B'. Letting this add
the route table entries will be less work, but it will take a fractional
amount more time when the first frame is sent. It will, however, be easier
for you to administer.
Systems such as 'm' need only the default route to 'A' since they do not
have a separate gateway to the internet other than the services provided by
'A'.
The appropriate netmasks would have to be determined based upon the number
of systems that you plan to use on each side of the network. The more even
the numbers are on the 'A' and 'B' side, the better. Remember that the
number of systems allowable for a given netmask is (2**n)-2 where 'n' is the
number of zero bits, from the right, to the first one bit.
If you truly want to bridge the networks then and add the proxy arp
entries both A and B when the SLIP link is brought up. This works well
if you have only a few systems on one side of the link. If the 'A' side
of the net had 128 systems and 'B' had only 10 then you would add the 10
entries to the 'A' system so that it would accept frames for all of the
systems on the 'B' network.
> - Two of the seven machines (m, n) are Sun Workstations. Which is the real
> gateway I need to specify in their configuration files ("A" or "Gateway")?
Both 'm' and 'n' would use 'A' as their default route.
--
Al Longyear longyear@netcom.com
Finger for PGP key