[Dnsmasq-discuss] problem setting default router using tags and MAC
address wildcards
(was Re: Using dnsmasq to issue IP addresses based on MAC address ranges)
Jeff Croft
jeffc at truste.com
Wed Apr 22 20:34:41 BST 2009
> Message: 3
> Date: Sat, 18 Apr 2009 01:26:50 +0000
> From: "richardvoigt at gmail.com" <richardvoigt at gmail.com>
> Subject: Re: [Dnsmasq-discuss] Using dnsmasq to issue IP addresses
> based on MAC address ranges
> To: Jeff Croft <jeffc at truste.com>
> Cc: "dnsmasq-discuss at lists.thekelleys.org.uk"
> <dnsmasq-discuss at lists.thekelleys.org.uk>
> Message-ID:
> <2e59e6970904171826p58ed9d86r3128358c34263e31 at mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
> Does the dnsmasq host OS have an address in the 172.17.0.0 range statically
> configured on the interface where the requests arrive?
Ah, bringing up an interface alias for the 172.17 network fixed it right up.
(duh!). Thx much.
I'm still having a problem with this config, though:
dnsmasq is sending its own IP address as the default router, but only for
172.16.0.0/16 addresses. For 172.17.0.0/16 addresses, it works correctly.
(dnsmasq is running on 172.16.0.10 and alias 172.17.0.10)
(default router is another physical machine on 172.16.0.11 and alias
172.17.0.11)
Here's the config:
dhcp-range=net:vmiphys,172.16.1.50,172.16.200.250,255.255.0.0,12h
dhcp-range=net:vmivirt,172.17.1.50,172.17.200.250,255.255.0.0,12h
dhcp-host=*:*:*:*:*:*,net:vmiphys
dhcp-host=00:50:56:00:*:*,net:vmivirt
dhcp-option=net:vmiphys,option:dns-server,172.16.0.10
dhcp-option=net:vmivirt,option:dns-server,172.17.0.10
dhcp-option=net:vmiphys,option:router,172.16.0.11
dhcp-option=net:vmivirt,option:router,172.17.0.11
So, when I renew a lease for a machine in 172.17.0.0/16, it gets 172.17.0.11
as the default route. That's what I want. However, when I renew a lease for
a machine in 172.16.0.0/16, it gets 172.16.0.10, which is incorrect. Same
thing happens for both Windows and Linux clients.
Any ideas?
Thanks again,
Jeff Croft
> On Fri, Apr 17, 2009 at 11:31 PM, Jeff Croft <jeffc at truste.com> wrote:
>
>> Hello --
>>
>> I?m using dnsmasq v2.41 to issue addresses in two different networks.
>>
>> What I want is for physical machines to be issued addresses in
>> 172.16.0.0/16 and for VMware virtual machines to get 172.17.0.0/16addresses.
>> I?ve forced all the VMware instances to have MAC addresses which
>> start with 00:50:56:00.
>>
>> I?m using the following config lines:
>>
>> dhcp-range=net:vmiphys,172.16.1.50,172.16.200.250,255.255.0.0,12h
>> dhcp-range=net:vmivirt,172.17.0.50,172.17.200.250,255.255.0.0,12h
>> dhcp-host=*:*:*:*:*:*,net:vmiphys
>> dhcp-host=00:50:56:00:*:*,net:vmivirt
>>
>> which I had hoped would do what I described above.
>>
>> What happens, however, is that any machine with a MAC address which does
>> not match 00:50:56:00:*:* receives an address in the 172.16.0.0/16network,
>> but any machine matching 00:50:56:00:*:* causes dnsmasq to issue an
>> error like this:
>>
>> DHCPDISCOVER(eth0) 169.254.34.228 00:50:56:00:00:d7 no address available
>>
>> and the virtual machine doesn?t get an IP address.
>>
>> Any suggestions?
>>
>> Thanks much for some great software.
>>
>> Jeff Croft
More information about the Dnsmasq-discuss
mailing list