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.

Hi I would like to setup a local linux file server (using centos and samba) that can be accessed by two independent local networks in the same house. I have 2 networks on the same floor which have Windows 7 computers, but the networks are split as we have 2 internet connections. How do I go about this?

Additional info: Currently both the networks use DropBox to send files to each other but that happens via the Internet and hence its slow. Would like to achieve the same locally to increase the speed.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The easiest way, in my opinion, is to just have a single local LAN (192.168.128.0/24) and vary who uses which internet connection by giving them a discrete gateway.

  • GW1: 192.168.128.1
  • GW2: 192.168.128.2
  • FileServer 192.168.128.20

That way everyone can access the same file-server, but when they go to the Internet they use the appropriate connection for their location. Of course changing which gateway they use is as simple as changing the, er, gateway address, but this is a simple config.

share|improve this answer
    
how can I configure the gateway on my routers? sorry for such a noobish question but I really don't know: I have 2 internet connections (both have public ip's) but have NAT enabled hence one connection's gateway is 192.168.1.1 and the other's is 192.168.0.1. Both are behind routers one lan is on 192.168.11.* and the other is 192.168.1.* Hence the gateways used on client computers are 192.168.11.1 and 192.168.1.1. Now what do I do? –  rzlines Dec 22 '10 at 19:00
1  
@rzlines If your routers have the option, configure a static route to the other local subnet, and set the default route in each discrete router to be the Internet interface for that router. –  sysadmin1138 Dec 22 '10 at 19:11
1  
Why wouldn't you disable DHCP completely on the routers, and then setup Linux box to serve DHCP. That way you could easily setup reservations serving a different gateway to each client. –  Zoredache Dec 22 '10 at 19:29
1  
@rzlines, not the way I described. Load balancing is possible, but far more advanced to setup. lartc.org/howto/lartc.rpdb.multiple-links.html –  Zoredache Dec 22 '10 at 19:38
1  
Here is a diagram if someone wants/needs a picture to better understand. –  Zoredache Dec 22 '10 at 20:46

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.