enter image description here

I have 2 independent networks that are connected to internet. Each systems in a network can connect to the internet through the corresponding router/NAT device. i wish to connect these two LANs. I am not a networks guy. please help me by suggesting a way to connect these LANs so that i could access the files on the other LAN too. I have illustrated the scenario in the above image. Thanks.

note: the two LANs are located at same place geographically. i.e, in same building at adjacent rooms.

link|improve this question
1  
I don't think this is quite a programming question. – Matti Virkkunen Jan 29 '11 at 12:58
@Matti: yes this is not a programming question but some one could help me to solve this scenario. – brainless Jan 29 '11 at 13:00
@brainless: Stack Overflow is for programming questions, for networking help, you could try serverfault.com (or just wait until this gets moved there). – Matti Virkkunen Jan 29 '11 at 13:03
1  
What are the router/nat devices ? – Iain Jan 29 '11 at 16:11
2  
Can you expand on the note about the LANs being located at the same place geographically? Are we talking about the same building, same campus, same metro area? – 3dinfluence Jan 29 '11 at 20:23
show 3 more comments
feedback

migrated from stackoverflow.com Jan 29 '11 at 13:10

This question came from our site for professional and enthusiast programmers.

4 Answers

To answer your question: This is normally solved with VPNs. You can do it either at layer 2 or layer 3 (i.e. make it look like one LAN or routing between two LANs).

Normally you will find routers than have this feature are quite expensive, but OpenWRT can be run on cheap consumer routers and offer this functionality.

link|improve this answer
feedback

Your note indicates that these LANs are located at the same location. If so this could just be a routing problem. With some NAT if both networks share the same subnet. But you'll likely need routers that are more capable than average consumer equipment or a layer3 managed switch that supports static routes if you don't need NAT.

Basically just need a static route in each router to the other routers subnet. This can be done over cat5e type cable if they two locations are close enough. For longer distances this would require either fiber or metro ethernet if that's available in your area. This will provide much better performance compared to a VPN solution and leave your Internet connection free to do other things.

Depending on your routers you could also use dynamic routing protocols to provide some WAN redundancy for egress traffic to the Internet at least. For example if LAN 1's Internet connection was down the traffic could be sent to LAN 2's router and use it's Internet connection and vice versa.

link|improve this answer
1  
This is the right answer... but most soho routers offer some way to set static routes, even if not via the GUI. – Joris Jan 29 '11 at 20:50
feedback

You need a VPN. I suggest openvpn. Its very easy to setup, compared to other VPN solutions. I would start with the simple static key method.

You would install a box with openvpn on both subnets, setup openvpn with a static key, then on your routers setup a static route to direct traffic to openvpn. Both LANs will need to be on different subnets.

link|improve this answer
feedback

The best solution if your routers support them is a site to site vpn connection. Then all the routing is taken care of for you when the connection is setup

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.