[Dnsmasq-discuss] multiple range with tag
Simon Kelley
simon at thekelleys.org.uk
Thu May 19 11:35:54 BST 2011
Mathieu Demblans wrote:
> Hi,
>
> I know this problem has been discussed many time but I can’t find
> solution in previous posts.
>
> I explain my problem:
>
> I actually have a dnsmasq which attribute public IP on all machines of a
> network (one interface).
>
> I would like to attribute private addresses on some equipements based on
> mac.
>
>
>
> On the conf file, I put:
>
>
>
> interface=eth0
>
> port=0
>
> dhcp-mac=test,AA:BB:e7:*:*:*
>
> dhcp-leasefile=/tmp/dhcp.lease
>
> dhcp-range=net:test,172.16.0.0,172.16.1.254,255.255.254.0,24h
>
> dhcp-range=XXX.YYY.22.10,XXX.YYY.23.249,255.255.254.0,24h
>
>
>
> and others options.
>
>
>
> In result, all requests are still responded with XXX.YYY… addresses
>
>
>
> I tried with “tag:test” instead of “net:test” on dhcp-range but the
> result is the same.
>
>
>
>
>
> On log file, I obtain :
>
>
>
> May 19 07:58:36 dnsmasq[17611]: DHCP packet: transaction-id is 2675549209
> May 19 07:58:36 dnsmasq[17611]: Available DHCP range: XXX.YYY.22.10 --
> XXX.YYY.23.249
> May 19 07:58:36 dnsmasq[17611]: Vendor class: dslforum.org
> May 19 07:58:39 dnsmasq[17611]: DHCPDISCOVER(eth0) AA:BB:e7:ca:fe:81
> May 19 07:58:39 dnsmasq[17611]: DHCPOFFER(eth0) XXX.YYY.22.234
> AA:BB:e7:ca:fe:81
> May 19 07:58:39 dnsmasq[17611]: requested options: 1:netmask,
> 28:broadcast, 43:vendor-encap,
> May 19 07:58:39 dnsmasq[17611]: requested options: 3:router,
> 6:dns-server, 60:vendor-class
> May 19 07:58:39 dnsmasq[17611]: tags: test
> May 19 07:58:39 dnsmasq[17611]: sent size: 1 option: 53:message-type 02
> May 19 07:58:39 dnsmasq[17611]: sent size: 4 option:
> 54:server-identifier bc:49:01:32
> May 19 07:58:39 dnsmasq[17611]: sent size: 4 option: 51:lease-time
> ff:ff:ff:ff
> May 19 07:58:39 dnsmasq[17611]: sent size: 4 option: 1:netmask ff:ff:fe:00
> May 19 07:58:39 dnsmasq[17611]: sent size: 4 option: 28:broadcast
> 5e:8c:17:ff
> May 19 07:58:39 dnsmasq[17611]: sent size: 82 option: 43:vendor-encap
> 49:6e:74:65:72:6e:65:74:47:61:74:65:77...
> May 19 07:58:39 dnsmasq[17611]: sent size: 8 option: 6:dns-server
> 08:08:08:08:08:08:04:04
> May 19 07:58:39 dnsmasq[17611]: sent size: 4 option: 3:router 5e:8c:16:01
> May 19 07:58:39 dnsmasq[17611]: sent size: 79 option: 82:agent-id
> 01:04:00:03:a3:0e:02:06:00:10:e7:ca:fe...
>
>
>
> It seems that’s the request is responded before the tag occured.
>
>
>
>
>
> Is anyone have an idea of what is wrong on my conf file?
>
> My dnsmasq version is 2.45 and I can’t update it.
>
>
First, change the dhcp-range line to
dhcp-range=net:#test,XXX.YYY.22.10,XXX.YYY.23.249,255.255.254.0,24h
That stops dnsmasq from being able to allocate addresses in the XXX.YYY
network when "test" is set. That might be enough, but it might fail to
allocate any address. If that happens it's probably because the server
running dnsmasq doesn't have an address on the 172.16 network.
HTH
Simon.
>
> Thanks.
>
>
>
> Mathieu
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
More information about the Dnsmasq-discuss
mailing list