3

I am managing the network of two schools, each one with different static public ip for internet (two routers) and ~30 computers. I want to connect the two LANs since in the main building there is a Debian server with a DHCP+DNS that should assign every IP so we can keep track of what the students are visiting.

I have tried with VPN but this way I have to install a VPN client in every device and centralized DHCP it's not possible. Maybe I have to set up a gateway server with two NICs in the other building?

Any ideas on how to do that is greatly appreciated.

2
  • I exactly want to have a centralized DHCP. But my question is, do I have to have 2 different subnets if I want to have the routing to the other building? Aug 12, 2016 at 20:52
  • Yes, this is what routing means.
    – pistache
    Aug 12, 2016 at 20:52

2 Answers 2

4

You can do this by putting a firewall on each LAN that acts at the default route. Each firewall can then run a VPN solution like OpenVPN or IPSec to make the two networks available to each other. This can be done rather easily with various free firewall distributions, such as PfSense.

Centralized DHCP doesn't make much sense (like, what happens when the VPN is down?) and DHCP isn't routable. It would make much more sense to have DHCP at each location. Same goes for the DNS... keep in mind what happens if the VPN is not working.

Late onset idea

Once you have a VPN, network resources such as DHCP and DNS information will be available from each location easily. Maybe that will be good enough for you. Or perhaps you can pull data from those servers and put it into a database or something for analysis.

6
  • He can still use DHCP relays to "route" DHCP traffic.
    – pistache
    Aug 13, 2016 at 11:59
  • 1
    @pistache Yes. But I think I'd reserve that for a very stable network, single network. This would be two local networks interconnected via the Internet which is known to go up and down, etc... What would happen? Is there a realistic, reliable way to do it? Aug 13, 2016 at 15:19
  • The OP mentioned he wants to centralize DHCP so he can "keep track of the users". While this may not be the best way to do this (and it's not enough), sharing a DHCP server is still better than spanning an L2 domain as DHCP relays can have their own caches and use an L3 tunnel with very low bandwidth. Now, the realistic, reliable way to do this is to make other decisions at upper levels (split infrastructures with configuration management, for example), but that's out of scope :)
    – pistache
    Aug 13, 2016 at 15:23
  • @pistache Yes, none of that is helpful and I believe it to be terrible advice. That's why I posted my own answer. Aug 13, 2016 at 15:41
  • 1
    @pistache You're right he did have kind of a odd request to begin with. I just feel I can't recommend something I wouldn't do myself. Aug 13, 2016 at 16:14
1

Spanning an L2 domain over the Internet is not recommended practice. Can't you have two networks with a centralized DHCP server (or two servers with centralized configuration) ? If you need to pass traffic between the two sites, you can then setup a routed tunnel at your gateways.

You must log in to answer this question.

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