public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Routing: how to enable..
@ 2007-02-17 20:22 Roman Naumann
  2007-02-17 20:42 ` JT Justman
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Roman Naumann @ 2007-02-17 20:22 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

Hi, please forgive this most probably very simple question, but I cannot find
the correct configuration file to enable routing...

I have two PCs, one HAS a internet connection to the internet-proxy, the
 other one hasn't.
The internet-pc (and I do not mean the proxy-pc) has two ethernet devices,
 ra0 and eth0.

eth0 connects it with the non-internet pc.

I set up a route to the internet-proxy-px on the internet-pc and it works
 fine on it, but the the non-internet pc can't use it!

Even though the non-internet pc has it's default gw set to the eth0 ip of the
internet pc.

Thanks for your help.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Routing: how to enable..
  2007-02-17 20:22 [gentoo-user] Routing: how to enable Roman Naumann
@ 2007-02-17 20:42 ` JT Justman
  2007-02-17 22:07   ` Roman Naumann
  2007-02-17 20:46 ` sunnavy
  2007-02-22 23:27 ` Dan Farrell
  2 siblings, 1 reply; 7+ messages in thread
From: JT Justman @ 2007-02-17 20:42 UTC (permalink / raw
  To: gentoo-user

Roman Naumann wrote:
> Hi, please forgive this most probably very simple question, but I cannot find
> the correct configuration file to enable routing...
> 
> I have two PCs, one HAS a internet connection to the internet-proxy, the
>  other one hasn't.
> The internet-pc (and I do not mean the proxy-pc) has two ethernet devices,
>  ra0 and eth0.
> 
> eth0 connects it with the non-internet pc.
> 
> I set up a route to the internet-proxy-px on the internet-pc and it works
>  fine on it, but the the non-internet pc can't use it!
> 
> Even though the non-internet pc has it's default gw set to the eth0 ip of the
> internet pc.
> 
> Thanks for your help.

Roman,

I'm not quite clear on your configuration. What sort of device is the
internet-proxy? Is it a NAT router, or something else? Are all three
devices in the same subnet? It sounds like you're either trying to work
around not having a hub, or not having a NAT device.

JT

-- 
Web:    http://www.signless.com
E-Mail: jt@signless.com
Voice:  (503) 616-4816
Cell:   (503) 419-8806
Skype:  jt.justman
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Routing: how to enable..
  2007-02-17 20:22 [gentoo-user] Routing: how to enable Roman Naumann
  2007-02-17 20:42 ` JT Justman
@ 2007-02-17 20:46 ` sunnavy
  2007-02-22 23:27 ` Dan Farrell
  2 siblings, 0 replies; 7+ messages in thread
From: sunnavy @ 2007-02-17 20:46 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

You need something like NAT to be configured on your internet-pc.
This maybe help(especially the NAT part): 
http://www.gentoo.org/doc/en/home-router-howto.xml

Best wishes, ;-)
On 21:22 Sat 17 Feb     , Roman Naumann wrote:
> Hi, please forgive this most probably very simple question, but I cannot find
> the correct configuration file to enable routing...
> 
> I have two PCs, one HAS a internet connection to the internet-proxy, the
>  other one hasn't.
> The internet-pc (and I do not mean the proxy-pc) has two ethernet devices,
>  ra0 and eth0.
> 
> eth0 connects it with the non-internet pc.
> 
> I set up a route to the internet-proxy-px on the internet-pc and it works
>  fine on it, but the the non-internet pc can't use it!
> 
> Even though the non-internet pc has it's default gw set to the eth0 ip of the
> internet pc.
> 
> Thanks for your help.



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Routing: how to enable..
  2007-02-17 20:42 ` JT Justman
@ 2007-02-17 22:07   ` Roman Naumann
  2007-02-17 22:28     ` Michal 'vorner' Vaner
  0 siblings, 1 reply; 7+ messages in thread
From: Roman Naumann @ 2007-02-17 22:07 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

> Roman,
>
> I'm not quite clear on your configuration. What sort of device is the
> internet-proxy? Is it a NAT router, or something else? Are all three
> devices in the same subnet? It sounds like you're either trying to work
> around not having a hub, or not having a NAT device.

Thanks for your answer.

Here the whole configuration: (imagine it as a complicated line of different 
connections through the entire house...)

PC1 (the proxy-running-pc) is running windows and a proxy software for the 
internals of my skydsl connection.

[PC1 and Router1 are connected via wired-lan]

Router1 is acting as a wlan-lan bridge (but without any direct internet 
functions..).

[Router1 and PC2 are connected via wireless-lan]

PC2 (the internet-pc) is running gentoo and has a wireless and a wired-lan 
connection.

[PC2 and PC3 are connected via wired-lan]

PC3 (the non-internet-pc) is running genoo and only has a wired-lan 
connection.

All I need is (ping like) access to PC1 to use the internet connection. 
(Usually adding the http_proxy environment variable or something to PC1's 
IP-address.)

PC2 has Router1 set as the default gateway and can ping PC1 hence.

PC3 has set PC2 as the default gateway, but cannot ping anything else than 
PC2. (...which is directly connected anyway...)

I think NAT isn't what I'm looking for, I just need ping access to _one_ 
specific ip, so, some static routes should do the job.

I hope that clarifies my situation.

Thanks for your help so far.


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Routing: how to enable..
  2007-02-17 22:07   ` Roman Naumann
@ 2007-02-17 22:28     ` Michal 'vorner' Vaner
  2007-02-18  0:13       ` JT Justman
  0 siblings, 1 reply; 7+ messages in thread
From: Michal 'vorner' Vaner @ 2007-02-17 22:28 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

Hello,

On Sat, Feb 17, 2007 at 11:07:34PM +0100, Roman Naumann wrote:
> Here the whole configuration: (imagine it as a complicated line of different 
> connections through the entire house...)
> [SNIP]

Hm, I think in theory you should have the PC in the middle with 2 IP
addresses, on each interface different. On each segment (each side of
the middle one) should be IPs from different range and there should be
allowed routing (that I do not know how). It would look like this:

-->( PC1 <IP-A/Range1> ) -- ( <IP-B/Range1> PC2 <IP-C/Range2> ) -- ( <IP-D/Range2> PC3 )

PC2 can comm with all (since it is on both nets). PC3 shloud use IP-C as
its gateway, which will allow it to access PC1. PC1 should have static
route for whole Range2 to IP-B, so it can send to PC3. Now, how is that
set in Windows, who knows..

After this all is set, PC1 and PC3 should be able to talk to each other.
However, you will not see the pings unless both directions work.

So, you need to:
• PC3: /etc/conf.d/net:routes_eth0 = { default via IP-C }
• PC2: enable routing (I guess /etc/conf.d/net too)
• PC1: add a static route Range2 -> IP-B.

I just hope I did not mess that up.

Or you can set up a bridge on PC2 to make both segments one net only:
http://gentoo-wiki.com/HOWTO_setup_a_gentoo_bridge

Have a nice day

-- 
BOFH Excuse #452:

Somebody ran the operating system through a spelling checker.

Michal 'vorner' Vaner

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Routing: how to enable..
  2007-02-17 22:28     ` Michal 'vorner' Vaner
@ 2007-02-18  0:13       ` JT Justman
  0 siblings, 0 replies; 7+ messages in thread
From: JT Justman @ 2007-02-18  0:13 UTC (permalink / raw
  To: gentoo-user

Michal 'vorner' Vaner wrote:
> Hello,
> 
> On Sat, Feb 17, 2007 at 11:07:34PM +0100, Roman Naumann wrote:
>> Here the whole configuration: (imagine it as a complicated line of different 
>> connections through the entire house...)
>> [SNIP]
> 
> Hm, I think in theory you should have the PC in the middle with 2 IP
> addresses, on each interface different. On each segment (each side of
> the middle one) should be IPs from different range and there should be
> allowed routing (that I do not know how). It would look like this:
> 
> -->( PC1 <IP-A/Range1> ) -- ( <IP-B/Range1> PC2 <IP-C/Range2> ) -- ( <IP-D/Range2> PC3 )
> 
> PC2 can comm with all (since it is on both nets). PC3 shloud use IP-C as
> its gateway, which will allow it to access PC1. PC1 should have static
> route for whole Range2 to IP-B, so it can send to PC3. Now, how is that
> set in Windows, who knows..
> 
> After this all is set, PC1 and PC3 should be able to talk to each other.
> However, you will not see the pings unless both directions work.
> 
...snip...

Yeah, this sounds pretty good to me. The subnet assignments are key, as
is confirming connectivity at each point. Bridging on PC2 is a good
choice too. Not sure if your WiFi router is really in bridge mode or
not. Be sure its 'WAN' side is in Range1 and its 'LAN' side is in Range2.

JT

-- 
Web:    http://www.signless.com
E-Mail: jt@signless.com
Voice:  (503) 616-4816
Cell:   (503) 419-8806
Skype:  jt.justman
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Routing: how to enable..
  2007-02-17 20:22 [gentoo-user] Routing: how to enable Roman Naumann
  2007-02-17 20:42 ` JT Justman
  2007-02-17 20:46 ` sunnavy
@ 2007-02-22 23:27 ` Dan Farrell
  2 siblings, 0 replies; 7+ messages in thread
From: Dan Farrell @ 2007-02-22 23:27 UTC (permalink / raw
  To: gentoo-user

On Sat, 17 Feb 2007 21:22:16 +0100
Roman Naumann <sapiens.dyslexia@googlemail.com> wrote:

> Hi, please forgive this most probably very simple question, but I
> cannot find the correct configuration file to enable routing...
> 
> I have two PCs, one HAS a internet connection to the internet-proxy,
> the other one hasn't.
> The internet-pc (and I do not mean the proxy-pc) has two ethernet
> devices, ra0 and eth0.
> 
> eth0 connects it with the non-internet pc.
> 
> I set up a route to the internet-proxy-px on the internet-pc and it
> works fine on it, but the the non-internet pc can't use it!
> 
> Even though the non-internet pc has it's default gw set to the eth0
> ip of the internet pc.
> 
> Thanks for your help.
 "Michal 'vorner' Vaner" was basically correct.  

PC2 is now a router, and in its tasks are included not only forwarding
packets from PC3 to the outside world, but also forwarding them back to
PC3.  In the routing table PC2 will need routes to PC3 through eth0,
and the same default it has now.  Without the right routes, PC2 will
try to respond to PC3 through ra0, the default route (I assume). Here
is an annotated routing table from a router of mine.
>zeus ~ # route
>Kernel IP routing table
>Destination     Gateway    Genmask         Flags Metric Ref    Use
>Iface
>192.168.1.0     *          255.255.255.0   U     0      0        0 eth1
you can see there the route to the subnet it's plugged into, doesn't
need to go through the default rout below.
>192.168.10.0    *          255.255.255.0   U     0      0        0 eth0
there's the subnet it forwards for, you'll notice it's different.  In
my case.  There must of course be some way to distinguish between them
for routing purposes, but you could also route to a host specifically.
>loopback        *          255.0.0.0       U     0      0        0 lo
>default         davey.spore.ath 0.0.0.0    UG    0      0        0 eth1
theres where all other traffic goes, through my internet firewall.

However the same is true of the default router davey from the lastline
above.
>davey ~ # route
>Kernel IP routing table
>Destination    Gateway         Genmask  Flags Metric Ref Use Iface
>192.168.2.0    *               255.255.255.0  U  0 0 0 ath0 
it routes to a wireless network just like PC1/PC2 in your configuration.
>192.168.1.0     *               255.255.255.0  U  0 0 0 eth0 
and same as before, for route to the subnet it's plugged into.
>c-24-245-14-0.h *               255.255.255.0  U  0 0 0 eth1 
for comcast, my cable company's subnet im plugged into
>192.168.10.0    zeus.spore.ath. 255.255.255.0  UG 0 0 0 eth0
for the subnet above, this is what im talking about.
>loopback        *               255.0.0.0      U  0 0 0 lo
yep
>default         c-3-0-ubr02.eag 0.0.0.0        UG 0 0 0 eth1
and by default, out the cable modem on eth1.

this last part is probably the problem Roman Naumann has or had.  

Don't forget you must enable ip forwarding if you desire to use it:
>zeus ~ # cat /proc/sys/net/ipv4/ip_forward 
>1
here you can see that ip_forward is set to 1 to indicate that i wish to
enable forwarding for other computers.  To set it as such, command the
computer thusly.
>zeus ~ # echo 1 > /proc/sys/net/ipv4/ip_forward 


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-22 23:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-17 20:22 [gentoo-user] Routing: how to enable Roman Naumann
2007-02-17 20:42 ` JT Justman
2007-02-17 22:07   ` Roman Naumann
2007-02-17 22:28     ` Michal 'vorner' Vaner
2007-02-18  0:13       ` JT Justman
2007-02-17 20:46 ` sunnavy
2007-02-22 23:27 ` Dan Farrell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox