Networking Forums

Networking Forums > Computer Networking > Linux Networking > Connecting two networks with two linux boxes.

Reply
Thread Tools Display Modes

Connecting two networks with two linux boxes.

 
 
Markvr
Guest
Posts: n/a

 
      08-24-2006, 02:36 PM
I have 2 networks each with a linux box as the gateway to the internet.

At the moment they are VPN'd together, but are close enough to get a
cable run and I'd like to connct them like this to make it quicker
so each linux box will have 3 nics in it.

My question is possibly a dumb one! But what should the IP for the 3rd
nic in each box be?

The networks are:
network - linux box internal address
Box 1) 10.0.12.x/24 - 10.0.12.1
Box 2) 192.168.12.x/24 - 192.168.12.1

Should the 3rd NIC in the box 1 be on the 192.168.12.x range, and vice
versa but wouldn't that confuse the other network as it would think that
it is a local IP when it wouldn't be.

Should they both be on a different range althogether? And then set the
routing up on each.

ie 3 NICS in each
Box1
internal 10.0.12.1
public 123.456.78.2
"intranet" 10.0.13.1

Box2
internal 192.168.12.1
public 423.243.123.32
"intranet" 10.0.13.2

If it was 2 networks with one linux box it would be easy, just not sure
how you'd connect the two boxes together....

Any advice appreciated!

Cheers

Mark

 
Reply With Quote
 
 
 
 
Allen McIntosh
Guest
Posts: n/a

 
      08-24-2006, 03:30 PM
Markvr wrote:
> I have 2 networks each with a linux box as the gateway to the internet.
>
> At the moment they are VPN'd together, but are close enough to get a
> cable run and I'd like to connct them like this to make it quicker
> so each linux box will have 3 nics in it.
>
> My question is possibly a dumb one! But what should the IP for the 3rd
> nic in each box be?
>
> Should they both be on a different range althogether? And then set the
> routing up on each.


That should work.
 
Reply With Quote
 
Jeroen Geilman
Guest
Posts: n/a

 
      08-24-2006, 06:09 PM
Markvr wrote:
> I have 2 networks each with a linux box as the gateway to the internet.
>
> At the moment they are VPN'd together, but are close enough to get a
> cable run and I'd like to connct them like this to make it quicker
> so each linux box will have 3 nics in it.
>
> My question is possibly a dumb one! But what should the IP for the 3rd
> nic in each box be?


On a separate subnet from the other two interfaces.
All you have to do to make routing work is, on each box, add a static
route to the original internal network on the *other* box, with the IP
of the other boxes' 3rd interface as the gateway for that static route.

Box 1:
$INTERNAL1, $NEW_IF1 = 10.0.0.1 (or whatever)

Box 2:
$INTERNAL2, $NEW_IF2 = 10.0.0.2

On Box 1:
route add net $INTERNAL2 gw $NEW_IF2

On Box 2:
route add net $INTERNAL1 gw $NEW_IF1

Done.

> If it was 2 networks with one linux box it would be easy, just not sure
> how you'd connect the two boxes together....


Exactly as if there was no Internet - whether you have 3 interfaces or
28, it's all the same.

J
 
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
How to have DHCPed Linux boxes appear in AD DNS atomax@nospam.nospam Windows Networking 0 08-09-2007 04:57 AM
strange problem connecting 2 linux boxes Sting Linux Networking 6 05-16-2004 06:50 PM
Connecting 2 linux boxes directly Sting Linux Networking 1 05-07-2004 03:15 PM
VBS Login Scrips not connecting new XP boxes Andrew Windows Networking 0 12-23-2003 02:00 AM
updating MS boxes through linux? Mike Linux Networking 2 09-19-2003 10:26 PM



1 2 3 4 5 6 7 8 9 10 11