[Dnsmasq-discuss] DHCP for multiple IP ranges with dnsmasq

Simon Kelley simon at thekelleys.org.uk
Mon Jan 12 20:32:39 GMT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

A couple of things to start with:

First, tell us the version of dnsmasq you're using.
Second, add

log-dhcp

to the configuration file, let you clients attempt to get an address,
and see what was logged. Amongst other things, all the tags that
dnsmasq calculated for the client will be shown, so we can see if the
problem is wrong tags, or something else.


Cheers,

Simon.


On 12/01/15 15:06, Helmut Friederici wrote:
> Hello, this is my first post in this mailing list and I am a newbie
> to dnsmasq. So please be a bit patient with me.
> 
> I think I am not the first having the following problem and there
> is a solution, but I haven't seen it yet. I want to setup multiple
> IP ranges for different ethernet-enabled devices. Many of them
> should get fixed addresses by dnsmasq, others should get real
> dynamic addresses. What I want is the following:
> 
> - defining several DHCP-Ranges with and without tagnames, e.g.: 
> DHCP-RANGE=tag:external,<IP-Start>,<IP- End>,255.255.255.0,8h 
> DHCP-RANGE=tag:local1,<IP-Start>,<IP- End>,255.255.255.0,1h 
> DHCP-RANGE=tag:local2,<IP-Start>,<IP- End>,255.255.255.0,1h 
> DHCP-RANGE=tag:local3,<IP-Start>,<IP- End>,255.255.255.0,1h 
> DHCP-RANGE=<IP-Start>,<IP-End>,255.255.255.0,2h - defining several
> DHCP-Hosts with and without fixed IPs, names, but all existing
> range tags DHCP-HOST=<MAC1>,set:external,<Name1> 
> DHCP-HOST=<MAC2>,set:external,<IP2>,<Name2> 
> DHCP-HOST=<MAC3>,set:local1,<IP3> 
> DHCP-HOST=<MAC4>,set:local1,<IP4> 
> DHCP-HOST=<MAC5>,set:local2,<IP5>,<Name5> 
> DHCP-HOST=<MAC6>,set:local3,<IP6> - using partly specified MAC
> addresses (vendor specific) so that devices with matching MAC
> addresses get IP addresses of DHCP range "local2" 
> DHCP-HOST=11:22:33:*:*:*,set:local2 - using different gateways - or
> more specific suppress internet access 
> DHCP-OPTION=tag:local1,3,127.0.0.1 
> DHCP-OPTION=tag:local2,3,127.0.0.1 
> DHCP-OPTION=tag:local3,3,127.0.0.1 DHCP-OPTION=3,<Gateway-IP>
> 
> What I expected I expected the host with <MAC1> will get an IP from
> the range tagged as "external", but it gets one of the untagged
> range. Other PCs previously having an IP in the local1 range but
> reconfigured to get an external one remain on the earlier address
> and do not have access to the internet any more. Dnsmasq runs on
> Red Hat Enterprise Linux 6.6, After modifying the config file I
> stopped the network and dnsmasq services, cleared the arp cache and
> restarted the services as follows, but the problem remains. service
> network stop service dnsmasq stop ip neigh flush dev eth1 service
> dnsmasq start service network start
> 
> Who can give me some advice? Or tell me where I'an wrong.
> 
> Thanks in advance
> 
> I tried to stop the network service and the dnsmasq service, mod
> 
> 
> 
> _______________________________________________ Dnsmasq-discuss
> mailing list Dnsmasq-discuss at lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJUtC9nAAoJEBXN2mrhkTWiEDAQAI7Pfc5w4EmOxvZJx7UsZnzL
8YbNEBPbCe4RyE7p5q9bucns7hNErRYnuoBlxXAXQYuelsQ92qja+z93D9UaljHn
LjeC+tSxzRvlRQwAGflKBJDf5ofqolPr6mqAK3QzGKsZGGUzHLlzKxYuhycpSFtG
JpRU0+dX3rlSuxpR/nxMxB3rrmZiCepQdBRbfheG+/vkdPIU1GCgyPDyp3U7P8m8
Sw/Sqd4peCXqkN75mK/UnIQbdlnwI6dvOdmUU0bu9FXLydAlPhUCx/drQAD5EAeD
Z7h0RRn16KLxtmbtU5Qn+VXIr94IJtAaCbvVk1Dup70RGv61XFYMuNAW2tsuCe1p
mePcv9TY4e9qSBWYQBoDPgdc7kLcGRhS9x9w6dUUye8Bmo+K9fMUyF99/84lTLrz
JjMajLkzbdu/UeXODS8+fSI2MtzG8FSEWMH9d+mv7lMHKKlep8pAY8eSPeD6Dn7D
GC7V9s4oNNXIVbT0N+1zB0Qvn0yEsWDTbx2aF3UBLaDW/e1pLoUBzmJmpsYJlatM
fmWYri8eJqK4lQiRJJ6qRnzR0bf4PmT1iZGaFaJqznNIOMyJPGkE2UhNB6mGTCYQ
rtI7enLvwsp5+aPXeRHliQ6/qSNBdcvsLbE1FeNADPw5INewLqXCDmRMQE6wMc/b
6yR4CJuZMvZbqwPZ1KWV
=ENj1
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list