Routing configuration

Routing configuration

Post by Clark Smit » Wed, 01 Dec 2010 02:07:36



        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?

 
 
 

Routing configuration

Post by Pascal Hambour » Wed, 01 Dec 2010 02:34:08


Hello,

Clark Smith a crit :

Quote:

>    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.

Quote:>    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.

 
 
 

Routing configuration

Post by David Schwart » Wed, 01 Dec 2010 08:59:59




Quote:> >?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. You don't need to add it on
each host. Machines in the 192.168.0.0/24 network will send packets to
hosts in the 192.168.2.0/24 network along their default route if they
don't have a more specific route. So long as the target of the default
route knows to send the packets to M, it should all work.

Quote:> > ?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.

It's not clear to me exactly what you're trying to accomplish. Is this
supposed to be a failover mechanism in case one Internet link is lost?
Or are you trying to get more bandwidth? Or are you trying to accept
inbound traffic to the other Internet link's public address? The
answer above is correct, but may or may not do what the OP wants.

DS

 
 
 

Routing configuration

Post by Pascal Hambour » Wed, 01 Dec 2010 18:33:21


David Schwartz a crit :



>>>  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 ?
 
 
 

Routing configuration

Post by David Schwart » Thu, 02 Dec 2010 05:06:04




Quote:> Wouldn't this violate the "except for the modem/router" requirement ?

I didn't read that as a requirement but as an exception to the
requirement. If someone says "everyone but Jack must have a coat",
that would normally be understood to mean that it's okay if Jack
doesn't have a coat, not that Jack must be prohibited from having one.

DS

 
 
 

Routing configuration

Post by cooldud » Thu, 02 Dec 2010 18:19:21





> > Wouldn't this violate the "except for the modem/router" requirement ?

> I didn't read that as a requirement but as an exception to the
> requirement. If someone says "everyone but Jack must have a coat",
> that would normally be understood to mean that it's okay if Jack
> doesn't have a coat, not that Jack must be prohibited from having one.

> DS

Hi All,

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.

 
 
 

Routing configuration

Post by Arun Vidarje » Thu, 02 Dec 2010 18:38:27


Hi


Quote:

> 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

 
 
 

Routing configuration

Post by Pascal Hambour » Thu, 02 Dec 2010 19:13:16


cooldude a crit :

Quote:

> 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.
 
 
 

1. IP Route Configuration Question

I am trying to employ ip route to connect 3 ADSL lines as equalized gateways
for 150+ computer LAN. I am using RH 6.1 and the following command to add
the default routes

ip route add default scope global nexthop dev eth1 \
nexthop dev eth2 \
nexthop dev eth3

This doesn't seem to work. Anyone have any experience with this?

Moe

2. Name servers

3. Permanently modify static routing configuration under redhat 7.3

4. ulimit SECURITY HOLE!

5. Please Help! eth0 routing configuration problem

6. foundry switch trunking and ethernet bonding

7. routed configuration?

8. Installing Linux

9. Route configuration?

10. Routing Configuration

11. Routing configuration

12. Problems with linux routing configuration

13. Routing configurations