Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

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

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

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
    
@3dinfluence: i have expanded the note. –  brainless Feb 1 '11 at 8:01
    
@brainless yeah that confirms what I thought and my answer. You want to be using routing here not a VPN. –  3dinfluence Feb 1 '11 at 22:20

3 Answers 3

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.

share|improve this answer
2  
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
1  
I really don't understand the other answers. OP says that both LAN's are on the same building. Just connect them with a cable/fiber. –  Saariko Sep 25 '12 at 6:50

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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