[Dnsmasq-discuss] Same IP for a range of MAC addresses?
splee at patchcomputers.com
Sat Apr 4 04:06:16 BST 2009
> Stephen Lee wrote:
>> I have an Ubuntu notebook that is running dnsmasq. It is used to program
>> some IP devices. Each device is expecting the same IP to access it and
>> they all need to get the same IP via dhcp. Does that make sense?
> So it is effectively a closed network with just the laptop and your IP
> device on it, and the network only exists for the duration of the
> programming session?
Yes, just the 2 devices with a network cable in between them.
> I take it you can't create a dhcp-host line that keys off some other
> attribute that is common to the IP devices, like a client ID?
If I forced all of the target devices to give out the same client ID (eg.
targetdev), would the following work?
> Given your limited requirements of a DHCP server (seeing as it will only
> be used for these IP devices during a programming session), there are
> probably some easy hacks you could perform on the Dnsmasq source to get
> it to hand out a static IP address to all requests. (Or maybe using an
> even simpler DHCP server, like udhcpd.)
> Another option might be using DBus. I don't know the extent of
> information available and settings possible, but you might be able to
> listen for new leases being granted, and immediately purge them.
> If you aren't relying on Dnsmasq to provide name lookups of the DHCP
> assigned IP address, another thing that may work is substituting
> /dev/null for the lease file. That way Dnsmasq will have no memory of
> any existing leases (unless it caches that info in memory also).
Heh...I did try using /dev/null for the lease file and dnsmasq complained
that it was an illegal file type (or something like that).
More information about the Dnsmasq-discuss