routing problem(?)

This is a discussion on routing problem(?) within the Linux Networking forums, part of the Linux Forums category; Hi, I'm trying to allow a unix machine to access the internet from its subnet. My network looks like ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-05-2006
adamfulman@yahoo.com
 
Posts: n/a
Default routing problem(?)

Hi,

I'm trying to allow a unix machine to access the internet from its
subnet.

My network looks like this:

unix machine's ip(ethernet):192.168.2.5
|
|
edimax wifi router (not connected to the internet)ip: 192.168.2.1
|
|
Windows XP machine's ip(wifi):192.168.2.55
Windows XP machine's ip(ethernet):192.168.3.70
|
|
edimax hub (which keeps the internet connection active)
|
|
router (with internet connection) (10.X.X.X)

I added
route add -inet 192.168.3.0 -netmask 255.255.255.0 192.168.2.55
to the unix machine and now the XP 2nd nic answers to
ping (192.168.3.70) but i cant ping any other internet ip like
72.14.221.147 even after adding
route add -inet 0.0.0.0 -netmask 0.0.0.0 192.168.2.55
or
route add -inet 0.0.0.0 -netmask 0.0.0.0 192.168.3.70

I enabled ip forwarding on the XP (registry key) but still no luck.

What am I doing wrong?
Could it be something with the Edimax wifi routing table?

Many Thanks,

Adam

Reply With Quote
  #2 (permalink)  
Old 08-05-2006
Floyd L. Davidson
 
Posts: n/a
Default Re: routing problem(?)

adamfulman@yahoo.com wrote:
>Hi,
>
>I'm trying to allow a unix machine to access the internet from its
>subnet.
>
>My network looks like this:
>
>unix machine's ip(ethernet):192.168.2.5
> |
> |
>edimax wifi router (not connected to the internet)ip: 192.168.2.1
> |
> |
>Windows XP machine's ip(wifi):192.168.2.55


Consider what you have above (subnet 192.168.2.xx) as a separate
entity. Your unix machine needs to be able to route packets to
both of those IP addresses, and needs *no* other specific routes!

Except of course a "default" that says anything that isn't already
routed to one of those, should go to 192.168.2.55, because that is
your gateway to the Internet. (And that WinXP machine *must* be
configured to do IP forwarding.)


>Windows XP machine's ip(ethernet):192.168.3.70
> |
> |
> edimax hub (which keeps the internet connection active)
> |
> |
> router (with internet connection) (10.X.X.X)
>
>I added
>route add -inet 192.168.3.0 -netmask 255.255.255.0 192.168.2.55


Your route commands are all nonsense. I'm not sure what you
are confusing them with, but "-inet" for example is not a valid
option for route, and you've placed an IP address where the
device should be identified. What you want are these two commands,

Note that you cannot route traffic directly to 192.168.3.x
addresses because there is no interface connected to your subnet
that has such an address. It may go out on the wire, but there
is nothing there. (I have no idea what you actually did have set
up to get ping, but it certainly wasn't that.)

Here's what you probably want:

route add -net 192.168.2.0 -netmask 255.255.255.0 eth0
route default -gw 192.158.2.55 eth0

The first command directs all 192.168.2.n packets to eth0. The
second command directs *everything else* to IP address
192.158.2.55 (which of course causes it to go via eth0 too, but
with an ethernet address for the interface on 192.158.2.55).

(If eth0 is not the correct device name, change it to whatever
the name for that interface is.)

....

>Could it be something with the Edimax wifi routing table?


I'm not familiar with an Edimax wifi router...

Typically wifi routers have an ethernet switch, with the wifi
device and 4 ethernet ports on the switch. No routing is
done. Typically they have a WLAN port too, and that port
requires routing. Hence, if your ethernet is connected to one
of the 4 ports, you do not need any special routing; however, if
it is connected to the WLAN port you *do* need to set up the
router's tables to handle what you want.

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@apaflo.com
Reply With Quote
  #3 (permalink)  
Old 08-05-2006
adamfulman@yahoo.com
 
Posts: n/a
Default Re: routing problem(?)

Hi Floyd,

I entered the route commands as written but did not get further than
before.
i can ping 192.168.3.70, but thats it.

Thanks,

Adam


Floyd L. Davidson wrote:
> adamfulman@yahoo.com wrote:
> >Hi,
> >
> >I'm trying to allow a unix machine to access the internet from its
> >subnet.
> >
> >My network looks like this:
> >
> >unix machine's ip(ethernet):192.168.2.5
> > |
> > |
> >edimax wifi router (not connected to the internet)ip: 192.168.2.1
> > |
> > |
> >Windows XP machine's ip(wifi):192.168.2.55

>
> Consider what you have above (subnet 192.168.2.xx) as a separate
> entity. Your unix machine needs to be able to route packets to
> both of those IP addresses, and needs *no* other specific routes!
>
> Except of course a "default" that says anything that isn't already
> routed to one of those, should go to 192.168.2.55, because that is
> your gateway to the Internet. (And that WinXP machine *must* be
> configured to do IP forwarding.)
>
>
> >Windows XP machine's ip(ethernet):192.168.3.70
> > |
> > |
> > edimax hub (which keeps the internet connection active)
> > |
> > |
> > router (with internet connection) (10.X.X.X)
> >
> >I added
> >route add -inet 192.168.3.0 -netmask 255.255.255.0 192.168.2.55

>
> Your route commands are all nonsense. I'm not sure what you
> are confusing them with, but "-inet" for example is not a valid
> option for route, and you've placed an IP address where the
> device should be identified. What you want are these two commands,
>
> Note that you cannot route traffic directly to 192.168.3.x
> addresses because there is no interface connected to your subnet
> that has such an address. It may go out on the wire, but there
> is nothing there. (I have no idea what you actually did have set
> up to get ping, but it certainly wasn't that.)
>
> Here's what you probably want:
>
> route add -net 192.168.2.0 -netmask 255.255.255.0 eth0
> route default -gw 192.158.2.55 eth0
>
> The first command directs all 192.168.2.n packets to eth0. The
> second command directs *everything else* to IP address
> 192.158.2.55 (which of course causes it to go via eth0 too, but
> with an ethernet address for the interface on 192.158.2.55).
>
> (If eth0 is not the correct device name, change it to whatever
> the name for that interface is.)
>
> ...
>
> >Could it be something with the Edimax wifi routing table?

>
> I'm not familiar with an Edimax wifi router...
>
> Typically wifi routers have an ethernet switch, with the wifi
> device and 4 ethernet ports on the switch. No routing is
> done. Typically they have a WLAN port too, and that port
> requires routing. Hence, if your ethernet is connected to one
> of the 4 ports, you do not need any special routing; however, if
> it is connected to the WLAN port you *do* need to set up the
> router's tables to handle what you want.
>
> --
> Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
> Ukpeagvik (Barrow, Alaska) floyd@apaflo.com


Reply With Quote
  #4 (permalink)  
Old 08-07-2006
apoorvkul
 
Posts: n/a
Default Re: routing problem(?)

In the router with internet connection add a route to 192.168.2.0
network thru 192.168.3.70 so that it can route back the ping replies

route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.3.70


adamfulman@yahoo.com wrote:
> Hi Floyd,
>
> I entered the route commands as written but did not get further than
> before.
> i can ping 192.168.3.70, but thats it.
>
> Thanks,
>
> Adam
>
>
> Floyd L. Davidson wrote:
> > adamfulman@yahoo.com wrote:
> > >Hi,
> > >
> > >I'm trying to allow a unix machine to access the internet from its
> > >subnet.
> > >
> > >My network looks like this:
> > >
> > >unix machine's ip(ethernet):192.168.2.5
> > > |
> > > |
> > >edimax wifi router (not connected to the internet)ip: 192.168.2.1
> > > |
> > > |
> > >Windows XP machine's ip(wifi):192.168.2.55

> >
> > Consider what you have above (subnet 192.168.2.xx) as a separate
> > entity. Your unix machine needs to be able to route packets to
> > both of those IP addresses, and needs *no* other specific routes!
> >
> > Except of course a "default" that says anything that isn't already
> > routed to one of those, should go to 192.168.2.55, because that is
> > your gateway to the Internet. (And that WinXP machine *must* be
> > configured to do IP forwarding.)
> >
> >
> > >Windows XP machine's ip(ethernet):192.168.3.70
> > > |
> > > |
> > > edimax hub (which keeps the internet connection active)
> > > |
> > > |
> > > router (with internet connection) (10.X.X.X)
> > >
> > >I added
> > >route add -inet 192.168.3.0 -netmask 255.255.255.0 192.168.2.55

> >
> > Your route commands are all nonsense. I'm not sure what you
> > are confusing them with, but "-inet" for example is not a valid
> > option for route, and you've placed an IP address where the
> > device should be identified. What you want are these two commands,
> >
> > Note that you cannot route traffic directly to 192.168.3.x
> > addresses because there is no interface connected to your subnet
> > that has such an address. It may go out on the wire, but there
> > is nothing there. (I have no idea what you actually did have set
> > up to get ping, but it certainly wasn't that.)
> >
> > Here's what you probably want:
> >
> > route add -net 192.168.2.0 -netmask 255.255.255.0 eth0
> > route default -gw 192.158.2.55 eth0
> >
> > The first command directs all 192.168.2.n packets to eth0. The
> > second command directs *everything else* to IP address
> > 192.158.2.55 (which of course causes it to go via eth0 too, but
> > with an ethernet address for the interface on 192.158.2.55).
> >
> > (If eth0 is not the correct device name, change it to whatever
> > the name for that interface is.)
> >
> > ...
> >
> > >Could it be something with the Edimax wifi routing table?

> >
> > I'm not familiar with an Edimax wifi router...
> >
> > Typically wifi routers have an ethernet switch, with the wifi
> > device and 4 ethernet ports on the switch. No routing is
> > done. Typically they have a WLAN port too, and that port
> > requires routing. Hence, if your ethernet is connected to one
> > of the 4 ports, you do not need any special routing; however, if
> > it is connected to the WLAN port you *do* need to set up the
> > router's tables to handle what you want.
> >
> > --
> > Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
> > Ukpeagvik (Barrow, Alaska) floyd@apaflo.com


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:22 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0