[Dnsmasq-discuss] Cannot override DHCP server-identifier (option 54) ?

Simon Kelley simon at thekelleys.org.uk
Thu Dec 4 17:32:19 GMT 2014


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

On 03/12/14 10:04, Benjamin Picardat wrote:
> Hello,
> 
> So I dug around a bit in the code, and I think my line in the
> configuration "dhcp-option=tag:eth2,54,192.168.0.10" is ignored
> because "server-identifier" is tagged OT_INTERNAL in opttab[]
> (options.c) and that makes it ignored in parse_dhcp_opt(char*,
> int). What is the semantic behind OT_INTERNAL ?

It marks options which are part of the core protocol, and shouldn't
have their values messed with by random configuration option. In other
words, it exists precisely to stop you doing what you're trying to do :)

> Would there be another way to do what I want to ? That is make that
> the option 54 is set to the secondary IP of the interface instead
> of the primary one.

The generic answer to all these sort of questions is "Use ISC dhcpd,
which implements the DHCP failover extension, dnsmasq doesn't, because
it's trying to be small and simple".

However, as you've got this far, I _think_, based on looking at the
code, rather then any testing, that adding

listen-address=192.168.0.10

to the config will make dnsmasq use that address (the secondary in
your example), rather than the interface's primary address, for the
address for the server-id, default router, and a bunch of other stuff
you've not tripped over yet.

It would be interesting to know if that's enough to make a usable
failover system.

Cheers,

Simon.



> 
> Sorry for the HTML in the previous message and sorry if I break the
> thread, not having received my own mail I cannot answer it and I do
> not know if setting the same title is enough to keep the message in
> the same thread.
> 
> Thanks, Ben
> 
> 
> _______________________________________________ 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

iQIcBAEBCAAGBQJUgJqjAAoJEBXN2mrhkTWidbIP/jOVp8DORWZABtM/ngQMrBkP
1SrAJHxGRwLFTFNQrEQkTGGJ/HYXnvuDvgg3LFV5lDWEfFBG20gXa99KGUfBDlOr
JCqtM4bQhzcKZgWOcVf8HqNXtbVhGidt6kcTDTRKPdBrt+bejmtAkiS1WfmCjJ6r
yxQjUXt5lIJiFbnbBLJ/5OtW7xRMGj4I+btDHzeRxLmW0D4KP2s/hSJwBIGHjBc1
+X6NwhSjccibtd00P9Wgb17V2TguLSn1mzJARjnKFFDVijR1sQK9lIPTL4i3FYnw
rpHreivzXxUCanWTqvagdOFRo9a9WKjHrdgvL3mreddEiA0xV2gbCPEOurozJEVl
G+TECkgAudaGsro/rseBpdDbGgelDHI0GI9ihsLoKzNRaKj4stzqXCO+V8yKRzeU
JDDulbKAtwPDBW4M+5DndfT38jc51q+ZwebbYbJ59kYTwi5xbACqpPhqIVpdNFVQ
iWsWSagvZ8R40hvGjgPOMyC49NVwheBiUuY8z85dbocv+1l07FBVflX9cgLZ1b9i
bEm+KTdjwNPc+0g0Mbq/JwxcZLOS2vQ3RRh65GB2u4B0RTO3YHqTdUHu+M7CPfBb
8UhtXUWbpGxTOwoaQ4zObs1GkD6AvhUUucTPoyXyEmyvj1ZWmZWAfaD6R+5hZhqS
nvXoHFZZfpuPUmdfq5at
=sq8i
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list