Subject: Re:IPNAT question
To: None <tech-net@netbsd.org>
From: =?iso-8859-1?Q?=D8yvin_Halfdan_Thuv?= <netbsd@online.no>
List: tech-net
Date: 04/12/2001 11:49:41
This is a multi-part message in MIME format.

------=_NextPart_000_005B_01C0C346.A8CBA7E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Mr. B. Martin wrote:
> Yes, very easily, have a look at the Networking section of the NetBSD

Thanks for the quick reply!

The first thing I did was of course to check out the networking faq. It =
was very good indeed, so what I did after reading it was to exec the =
following on what I described as PC3 in my previous mail.

"sysctl -w net.inet.ip.forwarding=3D1"

the two netcards I configured with /etc/ifconfig.ep0 (a 10Mbit card, =
3Com) and /etc/ifconfig.tlp0(a 100Mbit NetGear card)

ep0 has the ip-number 10.0.0.1 and netmask 255.0.0.0 (class A)
tlp0 has the ip-number 192.168.0.30 and netmask 255.255.255.0 (class C)

ep0 is connected to an amiga with the IP 10.0.0.2, and this macine is =
used to run an X-server for PC3(this works fine)
tlp0 is connected to 192.168.0.1 that is the gateway for internet.

I can ping anything on the web from PC3

The amiga (PC4) has netmask 255.0.0.0 and uses 10.0.0.1 as the default =
gateway it can ping 10.0.0.1 (and 192.168.0.30!) but nothing on the web =
and it can't ping 192.168.0.1 either.

thanks in advance for any good ideas.

--
=D8yvin


 -----Original Message-----

Subject: IPNAT question


  would this work? :

                       internet
                           |
                       router(w2k)
                    /      |      \
               PC1  PC2  PC3(*)
                                     \
                                     PC4


  (*) netbsd with "net.inet.ip.forwarding=3D1" (routing)

  With setup:
  router as 192.168.0.1  (netmask 255.255.255.0)
  PC1 as 192.168.0.10  (          --    ||    --           )
  PC2 as 192.168.0.20  (          --    ||    --           )
  PC3 as 192.168.0.30 and another ethernetcard as 10.0.0.1 (netmask =
255.255.255.0 and 255.0.0.0)
  PC4 as 10.0.0.2 (netmask 255.0.0.0)

  PC1, PC2 and PC3 "sees" internet. PC4 "sees" PC3 (X-server is run on =
PC4 and
  clients on PC3) but does not "see" internet.

  Gateway on PC4 is set to 10.0.0.1, on PC3 'sysctl =
net.inet.ip.forwarding'
  says: 'net.inet.ip.forwarding=3D1'

  would it teoretically be possible to setup PC4 to "see" internet?

------=_NextPart_000_005B_01C0C346.A8CBA7E0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Mr. B. Martin wrote:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&gt; Yes, very easily, have a look at =
the=20
Networking section of the NetBSD</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for the quick =
reply!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The first thing I did was of course to =
check out=20
the networking faq. It was very good indeed, so what I did after reading =
it was=20
to exec the following on what I described as PC3 in my previous=20
mail.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"sysctl -w =
net.inet.ip.forwarding=3D1"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>the two netcards I configured with=20
/etc/ifconfig.ep0 (a 10Mbit card, 3Com) and /etc/ifconfig.tlp0(a 100Mbit =
NetGear=20
card)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ep0 has the ip-number 10.0.0.1 and =
netmask=20
255.0.0.0 (class A)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tlp0 has the ip-number 192.168.0.30 and =
netmask=20
255.255.255.0 (class C)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ep0 is connected to an amiga with the =
IP 10.0.0.2,=20
and this macine is used to run an X-server for PC3(this works =
fine)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tlp0 is connected to 192.168.0.1 that =
is the=20
gateway for internet.</FONT><FONT face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I can ping anything on the web from=20
PC3</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The amiga (PC4) has netmask 255.0.0.0 =
and uses=20
10.0.0.1 as the default gateway it can ping 10.0.0.1 (and 192.168.0.30!) =
but=20
nothing on the web and it can't ping 192.168.0.1 either.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thanks in advance for any good =
ideas.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>--</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>=D8yvin</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>&nbsp;-----Original =
Message-----<BR></FONT><FONT=20
face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Subject: IPNAT question</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><BR>&nbsp; would this work? =
:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
internet<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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bs=
p;=20
PC4</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><BR>&nbsp; (*) netbsd with=20
"net.inet.ip.forwarding=3D1" (routing)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; With setup:<BR>&nbsp; router as=20
192.168.0.1&nbsp; (netmask 255.255.255.0)<BR>&nbsp; PC1 as =
192.168.0.10&nbsp;=20
(&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
--&nbsp;&nbsp;&nbsp;=20
||&nbsp;&nbsp;&nbsp;=20
--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
)<BR>&nbsp; PC2=20
as 192.168.0.20&nbsp; =
(&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
--&nbsp;&nbsp;&nbsp; ||&nbsp;&nbsp;&nbsp;=20
--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
)<BR>&nbsp; PC3=20
as 192.168.0.30 and another ethernetcard as 10.0.0.1 (netmask =
255.255.255.0 and=20
255.0.0.0)<BR>&nbsp; PC4 as 10.0.0.2 (netmask 255.0.0.0)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; PC1, PC2 and PC3 "sees" =
internet. PC4 "sees"=20
PC3 (X-server is run on PC4 and<BR>&nbsp; clients on PC3) but does not =
"see"=20
internet.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; Gateway on PC4 is set to =
10.0.0.1, on PC3=20
'sysctl net.inet.ip.forwarding'<BR>&nbsp; says:=20
'net.inet.ip.forwarding=3D1'</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; would it teoretically be =
possible to setup=20
PC4 to "see" internet?</FONT></DIV></BODY></HTML>

------=_NextPart_000_005B_01C0C346.A8CBA7E0--