🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.linux.networking
17 messages
17 total messages Started by Daniele Paccaloni Sat, 16 Mar 1996 23:17
SLIP gateway on a local network
#72
Author: Daniele Paccaloni
Date: Sat, 16 Mar 1996 23:17
6 lines
850 bytes
I own two UNIX machines connected via Ethernet: A and B.
One system (A) is also connected to internet via SLIP (dynamic IP).
How can i use the SLIP connection also on the other machine (B) ?
I tried (in B) adding a default route to A, it seems that packets are sent but not
received.
Can you help me ? Thanx in advance.
Re: SLIP gateway on a local network
#74
Author: German Tischler
Date: Sun, 17 Mar 1996 07:22
14 lines
1312 bytes
Daniele Paccaloni (ddt@bbs.infosquare.it) wrote:
: I own two UNIX machines connected via Ethernet: A and B.
: One system (A) is also connected to internet via SLIP (dynamic IP).
: How can i use the SLIP connection also on the other machine (B) ?
: I tried (in B) adding a default route to A, it seems that packets are
: sent but not received.

Your internet gateway needs to "know" about your second machine,
otherwise it won't know where to send packages back.
-- 
 ___________________________________________________________________________
| German `Tanis` Tischler   			EMail: tanis@gaspode.mayn.de|
|                   Brainstorm Computer Club Wuerzburg		      	    |
|___________________________________________________________________________|
Re: SLIP gateway on a local network
#75
Author: Timothy Murphy
Date: Mon, 18 Mar 1996 16:04
21 lines
1308 bytes
tanis@gaspode.mayn.de (German Tischler) writes:

>: I own two UNIX machines connected via Ethernet: A and B.
>: One system (A) is also connected to internet via SLIP (dynamic IP).
>: How can i use the SLIP connection also on the other machine (B) ?
>: I tried (in B) adding a default route to A, it seems that packets are
>: sent but not received.

>Your internet gateway needs to "know" about your second machine,
>otherwise it won't know where to send packages back.

Do you actually know how to solve this problem?
If you do, may I suggest you tell us
what entries you would make in what /etc files,
instead of talking mystical nonsense about machines "knowing".

-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Re: SLIP gateway on a local network
#76
Author: Cees de Groot
Date: Mon, 18 Mar 1996 19:08
24 lines
1622 bytes
In article <4ik1ho$suv@bell.maths.tcd.ie>,
Timothy Murphy <tim@maths.tcd.ie> wrote:
>
>>Your internet gateway needs to "know" about your second machine,
>>otherwise it won't know where to send packages back.
>
>Do you actually know how to solve this problem?
>If you do, may I suggest you tell us
>what entries you would make in what /etc files,
>instead of talking mystical nonsense about machines "knowing".
>
Don't start with flaming if you don't understand the original message!

What he meant, was that the gateway on the _other_ side of the line, ie.
the box in your ISP's office, should be told that it must route packets
for the second machine over the SLIP line. With dynamic SLIP, this is not
very easy. I wrote a quite extensive article about setting up masquerading
with Linux so other boxes on the LAN can go out to the net - this gives
you outbound connections without your ISP having to do anything. I'm 
sure that it still floats around on the net...

-- 
Cees de Groot                                        <C.deGroot@inter.NL.net>
OpenLink Software, Inc.
Re: SLIP gateway on a local network
#77
Author: Timothy Murphy
Date: Mon, 18 Mar 1996 20:22
50 lines
2576 bytes
C.deGroot@inter.NL.net (Cees de Groot) writes:

>>>Your internet gateway needs to "know" about your second machine,
>>>otherwise it won't know where to send packages back.
>>
>>Do you actually know how to solve this problem?
>>If you do, may I suggest you tell us
>>what entries you would make in what /etc files,
>>instead of talking mystical nonsense about machines "knowing".
>>
>Don't start with flaming if you don't understand the original message!

>What he meant, was that the gateway on the _other_ side of the line, ie.
>the box in your ISP's office, should be told that it must route packets
>for the second machine over the SLIP line. With dynamic SLIP, this is not
>very easy. I wrote a quite extensive article about setting up masquerading
>with Linux so other boxes on the LAN can go out to the net - this gives
>you outbound connections without your ISP having to do anything. I'm 
>sure that it still floats around on the net...

I've no idea where to look for things that "float around" on the net.
Do you have Irish blood by chance?

In any case, my understanding of the original question was this.
The man has a "home net" with 2 machines on it,
linked by Ethernet.
Also machine 1 is linked by SLIP to the Internet.
Now he wants to know if he can access the Internet
from machine 2 via machine 1.

Several people have asked this, or a very similar, question;
and if you do have an answer, I'm sure lots of people
would like to hear it.

Could you not put out another copy of your "extensive article" on the matter?
Is it really necessary to use masquerading to solve the problem?

It is quite surprising to me that 
this simple query has not been properly answered
in eg the Network Administrators Guide,
where much more esoteric problems
most unlikely to be encountered by a Linux user
are dealt with at length.


-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Re: SLIP gateway on a local network
#78
Author: Pedro Miguel Sequeira de Justo T...
Date: Wed, 20 Mar 1996 05:38
16 lines
1127 bytes
Daniele Paccaloni wrote:
> 
> I own two UNIX machines connected via Ethernet: A and B.
> One system (A) is also connected to internet via SLIP (dynamic IP).
> How can i use the SLIP connection also on the other machine (B) ?
> I tried (in B) adding a default route to A, it seems that packets are sent but not
> received.
> Can you help me ? Thanx in advance.

	You must recompile the kernel with the GateWaying
option ON (it is off by default) for Machine B.

	This should do the trick...


			Pedro Miguel Teixeira
Re: SLIP gateway on a local network
#79
Author: Mike Meyer
Date: Fri, 22 Mar 1996 06:37
42 lines
2492 bytes
In <4ikgm4$dvm@bell.maths.tcd.ie>, tim@maths.tcd.ie (Timothy Murphy) wrote:
> C.deGroot@inter.NL.net (Cees de Groot) writes:
> In any case, my understanding of the original question was this.
> The man has a "home net" with 2 machines on it,
> linked by Ethernet.
> Also machine 1 is linked by SLIP to the Internet.
> Now he wants to know if he can access the Internet
> from machine 2 via machine 1.
> It is quite surprising to me that 
> this simple query has not been properly answered
> in eg the Network Administrators Guide,
> where much more esoteric problems
> most unlikely to be encountered by a Linux user
> are dealt with at length.

It's been answered properly here a number of times. You were to busy
complaining about your not understanding the answer to notice that.
The simple solution is:

1) Get an IP address from your ISP for the second machine. Configure
	the machine to use that address.

2) Enable GATEWAY (apparently a kernel recompile) on the machine with
	SLIP on it.

That's really all there is to it.

The problem with the simple solution could well be step 1). If your
ISP refuses to give you the IP address, then it's no longer a "simple"
question. You now have to arrange to have the gateway machine put its
IP address on packets from the interior machines before sending them
out, and figure out which incoming packets belong to it and which
belong to interior machines, and distribute them appropriately.
Documentation on how to do that is what Cees De Groot was pointing you
towards.

I haven't looked into doing this operation. However, gettting a class
C network from the NIC is simple, asking your ISP to route to that
network is simple, and finding another ISP if they refuse to do so is
also simple. Which is why that's the route I would take.

	<mike
Re: SLIP gateway on a local network
#80
Author: Timothy Murphy
Date: Fri, 22 Mar 1996 16:08
20 lines
1227 bytes
Pedro Miguel Sequeira de Justo Teixeira <pmt@hidro1.ist.utl.pt> writes:

>> I own two UNIX machines connected via Ethernet: A and B.
>> One system (A) is also connected to internet via SLIP (dynamic IP).
>> How can i use the SLIP connection also on the other machine (B) ?
>> I tried (in B) adding a default route to A, it seems that packets are sent but not
>> received.

>	You must recompile the kernel with the GateWaying
>option ON (it is off by default) for Machine B.

Have you actually done this?
If so, please just tell us what you put in the relevant /etc files.


-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Re: SLIP gateway on a local network
#81
Author: yeun0001
Date: Fri, 22 Mar 1996 21:09
81 lines
3413 bytes
tim@maths.tcd.ie (Timothy Murphy) writes:

>Pedro Miguel Sequeira de Justo Teixeira <pmt@hidro1.ist.utl.pt> writes:

>>> I own two UNIX machines connected via Ethernet: A and B.
>>> One system (A) is also connected to internet via SLIP (dynamic IP).
>>> How can i use the SLIP connection also on the other machine (B) ?
>>> I tried (in B) adding a default route to A, it seems that packets are sent but not
>>> received.

>>	You must recompile the kernel with the GateWaying
>>option ON (it is off by default) for Machine B.

>Have you actually done this?
>If so, please just tell us what you put in the relevant /etc files.

I think I'll post my method here so someone can try it out:

1. Assume that Machine A has a modem and will be used to dial out and
   establish SLIP connection.

2. get "ipfwadm" from ftp://ftp.xos.nl/pub/linux/ipfwadm/
   and install the program.
   For kernel version 1.3.60 or older, get ipfwadm-1.2.tar.gz
   Otherwise, get ipfwadm-2.0beta2.tar.gz. 

3. Before we setup the connection, recompile the kernel in Machine A
   with CONFIG_FIREWALL, CONFIG_IP_FORWARD, CONFIG_IP_FIREWALL, and
   CONFIG_IP_MASQUERADE set to 'y'.

4. Connect A and B via ethernet and assign an IP address to each of them.
   (In this case, A is 10.0.0.1, and B is 10.0.0.2)

5. Modify /etc/rc.d/rc.inet1 in Machine A to:
	#! /bin/sh
	HOSTNAME=`cat /etc/HOSTNAME`
	/sbin/ifconfig lo 127.0.0.1
	/sbin/route add -net 127.0.0.0
	IPADDR="10.0.0.1"
	NETMASK="255.0.0.0"
	NETWORK="10.0.0.0"
	BROADCAST="10.0.0.255"
	/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
	/sbin/route add -net ${NETWORK} netmask ${NETMASK}

6. Then, modify /etc/rc.d/rc.inet1 in Machine B to:
	#! /bin/sh
	HOSTNAME=`cat /etc/HOSTNAME`
	/sbin/ifconfig lo 127.0.0.1
	/sbin/route add -net 127.0.0.0
	IPADDR="10.0.0.2"
	NETMASK="255.0.0.0"
	NETWORK="10.0.0.0"
	BROADCAST="10.0.0.255"
	GATEWAY="10.0.0.1"
	/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
	/sbin/route add -net ${NETWORK} netmask ${NETMASK}
	/sbin/route add default gw ${GATEWAY} metric 1
	
7. Execute the 2 scripts to setup local connection.

8. Have Machine A dial out and establish SLIP connection.

9. On Machine A, execute the following commands:
	/sbin/ipfwadm -F -p accept
	/sbin/ipfwadm -F -a masquerade -S 10.0.0.1 -D 0.0.0.0/0
	/sbin/ipfwadm -F -a masquerade -S 10.0.0.2 -D 0.0.0.0/0

10. Machine B should be able to connect to the outside world at this point.
    To make it more convenient, edit /etc/resolv.conf to add a
    nameserver entry and restart inetd.

Good luck! :)


-- Henry Yeung
-- 
Henry Yeung                     = 2015 Riverside Avenue, #203
= yeung@freenet.msp.mn.us       = Minneapolis, MN 55454
= hyeung@empros.com             = Day:  (612)-536-4781
= yeun0001@gold.tc.umn.edu      = Home: (612)-321-0382
Re: SLIP gateway on a local network
#82
Author: Timothy Murphy
Date: Sat, 23 Mar 1996 00:39
40 lines
1979 bytes
mwm@contessa.phone.net (Mike Meyer) writes:

>It's been answered properly here a number of times. You were to busy
>complaining about your not understanding the answer to notice that.
>The simple solution is:

>1) Get an IP address from your ISP for the second machine. Configure
>	the machine to use that address.

>2) Enable GATEWAY (apparently a kernel recompile) on the machine with
>	SLIP on it.

>That's really all there is to it.

I've understood perfectly what you and others have said.
(The answers have all been different.)
However, I am not convinced that you or any of the other gurus
have actually tried what you say.

For example, with your "simple" solution,
what would distinguish the 2 networks (Ethernet & SLIP)?
Would you have an /etc/networks entry?
If so, what?

In any case, my understanding of the original question
was that the poster did not wish to register
a second IP address;
his question was whether he could route packets
from machine 2 through machine 1 to the Internet,
using SLIP with the static or dynamic IP address assigned by his ISP.

[I wish people who do not in fact know the answer to questions
would not pretend that they do.]


-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Re: SLIP gateway on a local network
#83
Author: Timothy Murphy
Date: Sat, 23 Mar 1996 12:45
13 lines
974 bytes
yeun0001@gold.tc.umn.edu writes:

>I think I'll post my method here so someone can try it out:

Thanks for your concrete suggestions.
I shall try them, and let you (and the world) know how I get on!
(It will take a little time, since my "machine 2" is a 386-25.)

-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Re: SLIP gateway on a local network
#84
Author: Christian L. Pearce
Date: Sun, 24 Mar 1996 00:29
30 lines
2018 bytes
Cees de Groot (C.deGroot@inter.NL.net) wrote:
: In article <4ik1ho$suv@bell.maths.tcd.ie>,
: Timothy Murphy <tim@maths.tcd.ie> wrote:
: >
: >>Your internet gateway needs to "know" about your second machine,
: >>otherwise it won't know where to send packages back.
: >
: >Do you actually know how to solve this problem?
: >If you do, may I suggest you tell us
: >what entries you would make in what /etc files,
: >instead of talking mystical nonsense about machines "knowing".
: >
: Don't start with flaming if you don't understand the original message!

: What he meant, was that the gateway on the _other_ side of the line, ie.
: the box in your ISP's office, should be told that it must route packets
: for the second machine over the SLIP line. With dynamic SLIP, this is not
: very easy. I wrote a quite extensive article about setting up masquerading
: with Linux so other boxes on the LAN can go out to the net - this gives
: you outbound connections without your ISP having to do anything. I'm 
: sure that it still floats around on the net...

: -- 
: Cees de Groot                                        <C.deGroot@inter.NL.net>
: OpenLink Software, Inc.

I am also interested in the masquerading technique could you tell me 
where I could get more info on this?

Christian Pearce
Re: SLIP gateway on a local network
#85
Author: Christian L. Pearce
Date: Sun, 24 Mar 1996 00:34
21 lines
1448 bytes
Pedro Miguel Sequeira de Justo Teixeira (pmt@hidro1.ist.utl.pt) wrote:
: Daniele Paccaloni wrote:
: > 
: > I own two UNIX machines connected via Ethernet: A and B.
: > One system (A) is also connected to internet via SLIP (dynamic IP).
: > How can i use the SLIP connection also on the other machine (B) ?
: > I tried (in B) adding a default route to A, it seems that packets are sent but not
: > received.
: > Can you help me ? Thanx in advance.

: 	You must recompile the kernel with the GateWaying
: option ON (it is off by default) for Machine B.

: 	This should do the trick...


: 			Pedro Miguel Teixeira

I sent up my computers exatcly to the guy above and I have IP 
forwarding and gatewaying enable.  But it still did not "do the trick."  We 
need some serious questions answered here.
Re: SLIP gateway on a local network
#86
Author: Mike Meyer
Date: Sun, 24 Mar 1996 07:45
62 lines
3387 bytes
In <4ivh8r$e7n@bell.maths.tcd.ie>, tim@maths.tcd.ie (Timothy Murphy) wrote:
> mwm@contessa.phone.net (Mike Meyer) writes:
> >It's been answered properly here a number of times. You were to busy
> >complaining about your not understanding the answer to notice that.
> >The simple solution is:
> I've understood perfectly what you and others have said.
> (The answers have all been different.)

The ones I've seen have only been different in the way that one and 1
are different.

> >1) Get an IP address from your ISP for the second machine. Configure
> >	the machine to use that address.
> >2) Enable GATEWAY (apparently a kernel recompile) on the machine with
> >	SLIP on it.
> >That's really all there is to it.
> However, I am not convinced that you or any of the other gurus
> have actually tried what you say.

I've done it. Multiple times, in different configurations, using
different gateway platforms.

> For example, with your "simple" solution,
> what would distinguish the 2 networks (Ethernet & SLIP)?

To answer the question you asked: they are on different physical
media. To answer the question you were trying to ask: the two
interfaces on the gateway host have different IP addresses.

As a bonus, I'll point out that multiple SLIP interfaces on a single
host can share a single IP address, and are distinguished by the IP
address of the destination. I'll confess to not having tried this
particular configuration on a NetBSD box, but it works on other
BSD-based IP stacks.

> Would you have an /etc/networks entry?

You could. Not required.

> In any case, my understanding of the original question
> was that the poster did not wish to register
> a second IP address;
> his question was whether he could route packets
> from machine 2 through machine 1 to the Internet,
> using SLIP with the static or dynamic IP address assigned by his ISP.

You may or may not have been right. I pointed out that the answer to
this question was apparently YES (after all, at worst it's a SMOP, and
another poster reference his writeup on this subject), but that this
was no longer a "simple" question, and the operation was probably more
complicated than changing ISPs to one that didn't object to your
registering your own network. Of course, if you're coat-tailing on a
school or employer, that would involve actually spending money.

> [I wish people who do not in fact know the answer to questions
> would not pretend that they do.]

And I wish that people who do not have sufficient understanding of a
problem to know if an answer was correct would not pretend that they
do.

	<mike
Re: SLIP gateway on a local network
#87
Author: Frederick V. Heitkamp
Date: Tue, 26 Mar 1996 12:01
28 lines
2025 bytes
Christian L. Pearce (pear6459@kutztown.edu) wrote:
: Cees de Groot (C.deGroot@inter.NL.net) wrote:
: : In article <4ik1ho$suv@bell.maths.tcd.ie>,
: : Timothy Murphy <tim@maths.tcd.ie> wrote:
: : >
: : >>Your internet gateway needs to "know" about your second machine,
: : >>otherwise it won't know where to send packages back.
: : >
: : >Do you actually know how to solve this problem?
: : >If you do, may I suggest you tell us
: : >what entries you would make in what /etc files,
: : >instead of talking mystical nonsense about machines "knowing".
: : >
: : Don't start with flaming if you don't understand the original message!

: : What he meant, was that the gateway on the _other_ side of the line, ie.
: : the box in your ISP's office, should be told that it must route packets
: : for the second machine over the SLIP line. With dynamic SLIP, this is not
: : very easy. I wrote a quite extensive article about setting up masquerading
: : with Linux so other boxes on the LAN can go out to the net - this gives
: : you outbound connections without your ISP having to do anything. I'm 
: : sure that it still floats around on the net...

OK.  What if you wrote to the NIC (or whatever it's called) and got your
own class C addresses for the two machines?  Would you still need to do
the masquerading deal?  Do you still need to tell your ISP?

Fred Heitkamp
Re: SLIP gateway on a local network
#88
Author: Cees de Groot
Date: Tue, 26 Mar 1996 19:33
17 lines
1247 bytes
In article <4j8maf$108c@news-s01.ny.us.ibm.net>,
Frederick V. Heitkamp <fheitka@ibm.net> wrote:
>
>OK.  What if you wrote to the NIC (or whatever it's called) and got your
>own class C addresses for the two machines?  Would you still need to do
>the masquerading deal?  Do you still need to tell your ISP?
>
No. You just add the appropriate routing entries. 

ISP <-> SLIP <-> GATEWAY <-> ETHERNET <-> BOX2

Then on BOX2, you do "route add default gateway GATEWAY", and on GATEWAY,
you do "route add BOX2 eth0" (untested, out of my head, YMMV, etcetera).

-- 
Cees de Groot                                        <C.deGroot@inter.NL.net>
OpenLink Software, Inc.
Re: SLIP gateway on a local network
#89
Author: Mark Constable
Date: Thu, 28 Mar 1996 03:55
42 lines
2741 bytes
Frederick V. Heitkamp wrote:

> OK.  What if you wrote to the NIC (or whatever it's called) and got your
> own class C addresses for the two machines?  Would you still need to do
> the masquerading deal?  Do you still need to tell your ISP?

A whole C-class block for 2 machines ? Bit of a waste unless you are going
to use them for other things. Your ISP allocates you 1 IP (maybe dynamically)
otherwise you wouldn't be connected. You could use this 1 IP num and masquerading
to allow other hosts on your end access to the net, or, if your ISP (big if) is
co-operative you could ask for one more IP and see if they will add both IP
nums to their routing tables - this is not much good unless you have a permanent
connection though. If you have an ethernet on your end then another way is to
get a subnet allocated to you by your ISP and you can manage it as you see fit.

inet <-?-> isphost <-ppp-> yourhost-a <-ppp-> yourhost-b

Simplest case of two static IP nums allocated to you by your ISP. When you dial
in to isphost from yourhost-a you already have a default-route established by
doing something like: 

/usr/sbin/pppd /dev/cua1 38400 crtscts modem defaultroute proxyarp 123.45.67.89:

so when you ping anything other than yourhost-a or yourhost-b the packets will
flow out to isphost, fine. Now, to get yourhost-b working you need to have
isphost know about it, something like this needs to be done on isphost:

route yourhost-b gw yourhost-a dev ppp0

then on yourhost-b you need to do the reciprical:

route isphost gw yourhost-a dev ppp0

Without co-operation or root perms on isphost this is almost impossible to do
but gives you a little idea of one approach. The whole issue is extremely complex
and it would be excellent to have access to a small-time ISP C-class type FAQ
on IP routing, as most examples I've seen relate to B-class blocks.

-- 
Mark Constable (+61 7 55275724)
mailto:markc@ion.com.au
http://www.ion.com.au/linus/markc
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads