1 Master Server + 1 Storage Node + DNSmasq + 2 Different location
-
Hi all
I have 2 sites with different subnets and the current fog server setup on these two locations are independent (both master) both running RC-8 in Ubuntu 14. DNSmasq installed on each of them (since I dont have access to modify the switches)
How do you configure DNSmasq to serve these two locations? For example SITE A has 10.3.XXX.XXX and SITE B has 10.40.XXX.XXX. Is it possible?
Thanks
-
@kwetiaw The internet is saying that it should be possible. One of the main questions is: Are there two different interfaces for the two different subnets on that server you are running dnsmasq on? Please tell us a bit more about your network setup.
If it only has one interface you probably need to fiddle around with dhcp relay (aka ip helpers with cisco). Check out this discussion on the dnsmasq mailinglist (possible answer with a config snippet right at the end of the discussion)
Otherwise I guess you should be fine using this kind of configuration (notice the different interfaces):
dhcp-range=eth0,10.3.XXX.XXX,10.3.XXX.XXX,4h dhcp-range=eth1,10.40.XXX.XXX,10.40.XXX.XXX,4h
-
In regards to the dhcp relay: Lets assume you have a main dhcp server at the HQ site and also dnsmasq at HQ. For the HQ site the dhcp server and dnsmasq server are in the same broadcast domain. So the dnsmasq server hears when some device requests a dhcp address. This is the design. Now when a client at a remote site requests a dhcp address the dhcp helper agent hears the request and forwards it to the dhcp server. Since this communication is a unicast communication the dnsmasq server doesn’t hear the dhcp request so no additional information is supplied.
The solution to this is to add your dnsmasq server as the last dhcp server in your dhcp relay chain. You don’t want dnsmasq to supply the dhcp address only to be aware that a dhcp request was made and to supply the missing dhcp settings to the remote client via the dhcp relay.I know that was a lot of words to just say, add your dnsmasq server last in your dhcp=relay configuration. As for the dnsmasq configuration, I don’t know the exact settings only that it should work.
-
These are pretty complex and way above my skillset i think. I might leave the 2 major locations separate with their own independent server.
Im not too sure either our network setup here as I dont have access to it.@Sebastian-Roth I might try adding the dhcp range to my ltsp.conf and see what happens.
Thanks
-
How do you specify the dhcp-range? lets say I want to cover all in 10.40.xxx.xxx range?
is this correct?
dhcp-range=10.40.1.10, proxy, 255.0.0.0
-
@kwetiaw I understand you are using dnsmasq in proxy mode?
-
Yes proxymode,
I pretty much followed this guide to get my fog up and running
https://wiki.fogproject.org/wiki/index.php?title=Using_FOG_with_an_unmodifiable_DHCP_server/_Using_FOG_with_no_DHCP_server -
@kwetiaw so can you run dnsmasq per location to make the needed dhcp adjustments?
Also I’ve never seen a multiscope dnsmasq implementation in proxy mode.
There’s a dnsmasq mailing list that Simon Kelly ( creator & maintainer of dnsmasq) runs, he accepts questions via this mailing list and answers them there also. All the emails are also archived on his site for others to browse. I might suggest asking Simon about it. He’s a super cool guy.
And, share what you find here. I’m on the mailing list so I’ll see your question and his response when it goes through. But I’d rather you post it and the outcome too.
-
@kwetiaw Well, dnsmasq in proxy mode might be a different story. I have to admit that I read your initial post about using dnsmasq because you are not allowed to touch the real DHCP servers but somehow wasn’t aware of that fact when posting my answer.
From the dnsmasq man page:
For directly connected networks (ie, networks on which the machine running dnsmasq has an interface) the netmask is optional: dnsmasq will determine it from the interface configuration. For networks which receive DHCP service via a relay agent, dnsmasq cannot determine the netmask itself, so it should be specified, otherwise dnsmasq will have to guess, based on the class (A, B or C) of the network address.
So we are back to my question on how is you server (running dnsmasq) connected to those two networks?
Maybe this could work (if you have two different NICs for those two networks - please post the full output of
ip a s
on that server):dhcp-range=eth0,10.3.0.1,proxy dhcp-range=eth1,10.40.0.1,proxy