Networking Forums

Networking Forums > Computer Networking > Linux Networking > Routing configuration

Reply
Thread Tools Display Modes

Routing configuration

 
 
Clark Smith
Guest
Posts: n/a

 
      11-29-2010, 04:07 PM
I am sure this is a simple networking issue, but I am not really
networking savvy.

I have two networks: 192.168.0.0 and 192.168.2.0. Each network is
connected to the Internet through a modem/router. The modem/router for
the 192.168.0.0 network has an internal IP address 192.168.0.1, whereas
for the 192.168.2.0 modem/router the internal IP address is 192.168.2.1.

In both networks I have a bunch of Linux boxes, with addresses
192.168.0.2, 192.168.0.3, etc. and 192.168.2.2, 192.168.2.3, etc.,
respectively. Each of these machines is connected to its network through
a switch. I have two switches, A for the 192.168.0.0 network and and B
for the 192.168.2.0 network.

I have a machine M with two NICs. One is connected to the
192.168.0.0 network through switch A, with IP address 192.168.0.254,
whereas the other is connected to the 192.168.2.0 network through switch
B, with IP address 192.168.2.254.

What I would like to be able to do is for all machines in the
192.168.0.0 network (except for the modem/router) to have access to all
the machines in the 192.168.2.0 network, and vice-versa. I guess this can
be done by routing packets through M, but I don't know how to do this.

Once this is done, would it be possible for a machine in the
192.168.0.0 network to have Internet access through the modem/router in
the 192.168.2.0 network, just as it is through the modem/router in its
own (the 192.168.0.0) network?

 
Reply With Quote
 
 
 
 
Pascal Hambourg
Guest
Posts: n/a

 
      11-29-2010, 04:34 PM
Hello,

Clark Smith a écrit :
>
> I have a machine M with two NICs. One is connected to the
> 192.168.0.0 network through switch A, with IP address 192.168.0.254,
> whereas the other is connected to the 192.168.2.0 network through switch
> B, with IP address 192.168.2.254.
>
> What I would like to be able to do is for all machines in the
> 192.168.0.0 network (except for the modem/router) to have access to all
> the machines in the 192.168.2.0 network, and vice-versa. I guess this can
> be done by routing packets through M, but I don't know how to do this.


Add a route to the other subnet using M as a gateway on each host and
enable IP forwarding on M.

> Once this is done, would it be possible for a machine in the
> 192.168.0.0 network to have Internet access through the modem/router in
> the 192.168.2.0 network, just as it is through the modem/router in its
> own (the 192.168.0.0) network?


Yes. Use M as the default gateway. It might also require minor
adjustments such as adding masquerading on M or a return route on the
other subnet's router router.
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      11-30-2010, 08:33 AM
David Schwartz a écrit :
> On Nov 29, 9:34 am, Pascal Hambourg <boite-a-s...@plouf.fr.eu.org>
> wrote:
>
>>> What I would like to be able to do is for all machines in the
>>> 192.168.0.0 network (except for the modem/router) to have access to all
>>> the machines in the 192.168.2.0 network, and vice-versa. I guess this can
>>> be done by routing packets through M, but I don't know how to do this.

>
>> Add a route to the other subnet using M as a gateway on each host and
>> enable IP forwarding on M.

>
> You can add the route in both routers.


Wouldn't this violate the "except for the modem/router" requirement ?
 
Reply With Quote
 
Arun Vidarjee
Guest
Posts: n/a

 
      12-01-2010, 08:38 AM
Hi

On 01.12.2010 10:19, cooldude wrote:
>
> Just a thought. What would happen if we connect both of the switches
> ( "I have two switches, A for the 192.168.0.0 network and and B for
> the 192.168.2.0 network. " ). Can the machines on both of the subnet
> communicate ? ( they can use the ARP and RARP protocol to get the
> MAC / IP ). Let me know your thoughts.


That is what I was thinking from the beginning. I'm not in touch
of the OPs exact requirements and the physical setup, but he can
wire all his computers in _one_ switch-switch-...computer in the
usual tree-like topology but devide the computers into two IP
networks. The con is, at least theoritically, computers can
listen to traffic in the other network. But with today's switches
this may not be easy (execpt physically changing the cabling).

Arun
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      12-01-2010, 09:13 AM
cooldude a écrit :
>
> Just a thought. What would happen if we connect both of the switches
> ( "I have two switches, A for the 192.168.0.0 network and and B for
> the 192.168.2.0 network. " ). Can the machines on both of the subnet
> communicate ?


Yes they can, but this solution does not change the requirement of
adding the proper route to the other subnet either on the routers or on
each host. Also it has the disadvantage that broadcast traffic from one
network will leak to the other network, increasing the overall network load.
 
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
Win2003 R2 server just stops routing traffic until I restart Routing service Martijn Tonies Windows Networking 8 11-03-2008 11:05 AM
SMail Routing Configuration Help! Doug Mitton Linux Networking 1 01-22-2007 01:27 PM
Automatic LAN Routing configuration Petsen Windows Networking 0 08-18-2006 08:24 AM
Routing Configuration with Windows Server 2003 Paul B Windows Networking 6 09-08-2005 05:49 AM
Routing configuration Pablo Silva O Linux Networking 2 11-09-2004 12:20 PM



1 2 3 4 5 6 7 8 9 10 11