Networking Forums

Networking Forums > Computer Networking > Linux Networking > Help with routing problem?

Reply
Thread Tools Display Modes

Help with routing problem?

 
 
A Ymous
Guest
Posts: n/a

 
      09-04-2003, 11:17 PM
A friend is having problems setting up a small network. He has a PC server
with three NICs in configured as below:
____
| |-----192.168.10.1
192.168.0.2----| PC |
|____|-----192.168.20.1

The 192.168.0.2 goes via a smoothwall server (192.168.0.50) and asdl modem
to the internet. The 192.168.10 and 20 have hubs connected to them.

The problem is anything connected to either hub cannot connect to the
internet even though the PC can. We are assuming this is some kind of
routing problem but cannot figure it out. Can somebody help us out here.

Output of route -n is:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Ifac
192.168.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.50 0.0.0.0 UG 0 0 0 eth2
 
Reply With Quote
 
 
 
 
Whoever
Guest
Posts: n/a

 
      09-04-2003, 11:24 PM
On Thu, 4 Sep 2003, A Ymous wrote:

> A friend is having problems setting up a small network. He has a PC server
> with three NICs in configured as below:
> ____
> | |-----192.168.10.1
> 192.168.0.2----| PC |
> |____|-----192.168.20.1
>
> The 192.168.0.2 goes via a smoothwall server (192.168.0.50) and asdl modem
> to the internet. The 192.168.10 and 20 have hubs connected to them.
>
> The problem is anything connected to either hub cannot connect to the
> internet even though the PC can. We are assuming this is some kind of
> routing problem but cannot figure it out. Can somebody help us out here.


Have you turned on forwarding?
% echo "1" > /proc/sys/net/ipv4/ip_forward



 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      09-08-2003, 08:49 AM
On Thu, 4 Sep 2003 23:17:21 +0000 (UTC), A Ymous <(E-Mail Removed)> wrote:
> A friend is having problems setting up a small network. He has a PC server
> with three NICs in configured as below:
> ____
> | |-----192.168.10.1
> 192.168.0.2----| PC |
> |____|-----192.168.20.1
>
> The 192.168.0.2 goes via a smoothwall server (192.168.0.50) and asdl modem
> to the internet. The 192.168.10 and 20 have hubs connected to them.
>
> The problem is anything connected to either hub cannot connect to the
> internet even though the PC can. We are assuming this is some kind of
> routing problem but cannot figure it out. Can somebody help us out here.


Assuming the 3 nic PC has ip_forward enabled, does the smoothwall server
know to route 192.168.10.0 and 192.168.20.0 networks to 192.168.0.2
(and to masquerade them to internet)? For example, on smoothwall:

route add -net 192.168.10.0 gw 192.168.0.2
route add -net 192.168.20.0 gw 192.168.0.2

--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
 
Reply With Quote
 
A Ymous
Guest
Posts: n/a

 
      09-12-2003, 12:50 PM
On Thu, 4 Sep 2003 23:17:21 +0000 (UTC), A Ymous <(E-Mail Removed)>
wrote:

>A friend is having problems setting up a small network. He has a PC server
>with three NICs in configured as below:
> ____
> | |-----192.168.10.1
>192.168.0.2----| PC |
> |____|-----192.168.20.1
>
>The 192.168.0.2 goes via a smoothwall server (192.168.0.50) and asdl modem
>to the internet. The 192.168.10 and 20 have hubs connected to them.
>
>The problem is anything connected to either hub cannot connect to the
>internet even though the PC can. We are assuming this is some kind of
>routing problem but cannot figure it out. Can somebody help us out here.
>
>Output of route -n is:
>
>Kernel IP routing table
>Destination Gateway Genmask Flags Metric Ref Use Ifac
>192.168.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
>192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
>192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
>0.0.0.0 192.168.0.50 0.0.0.0 UG 0 0 0 eth2


The solution was to set up IP masquerading in iptables with the following
command:

iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE

Is this the right solution?

 
Reply With Quote
 
W Cardwell
Guest
Posts: n/a

 
      09-13-2003, 03:13 PM
If it worked, it is a fine solution. Normally, you should not need to NAT
from one 192.168.x.x address to another, because the packets must be NATed
again anyway to be routable on the Internet. It may be that the DSL router
will only accept traffic from a single IP address as a way of trying to get
you to pay extra to the ISP to hook up multiple machines.

--

wcardwell at nc dot rr dot com



 
Reply With Quote
 
 
 
Reply

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing Problem Chuck Smith Network Routers 0 06-01-2008 09:02 PM
routing problem? Hans Mugge Network Routers 7 06-26-2005 10:41 AM
routing problem Mike Ryan Windows Networking 5 05-12-2005 06:56 PM
Routing problem John Linux Networking 0 08-05-2004 07:03 PM
routing problem Dodo Windows Networking 6 06-28-2004 02:02 PM



1 2 3 4 5 6 7 8 9 10 11