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

Benjamin Picardat bpicardat at netinary.com
Fri Dec 5 09:00:54 GMT 2014


Hi Simon,
Indeed it seems to do the trick as you said. I had to remove interface=eth0
in the conf for it to work though.
It will need more testing to see if that behaves correctly in our failover
architecture.

Thanks a lot!

Ben

-----Message d'origine-----
De : Dnsmasq-discuss
[mailto:dnsmasq-discuss-bounces at lists.thekelleys.org.uk] De la part de Simon
Kelley
Envoyé : jeudi 4 décembre 2014 18:32
À : dnsmasq-discuss at lists.thekelleys.org.uk
Objet : Re: [Dnsmasq-discuss] Cannot override DHCP server-identifier (option
54) ?

-----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-----

_______________________________________________
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