0

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.

1 Answer 1

2

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.

8
  • 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, 2010 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, 2010 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, 2010 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, 2010 at 19:38
  • 1
    Here is a diagram if someone wants/needs a picture to better understand.
    – Zoredache
    Dec 22, 2010 at 20:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .