[Dnsmasq-discuss] can we set dhcp-option-force in optsfile?

Simon Kelley simon at thekelleys.org.uk
Thu Apr 16 21:30:40 BST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16/04/15 16:55, Mauro Rodrigues wrote:
> Hi!
> 
> So I'm currently running dnsmasq using --dhcp-optsfile with the 
> following contents:
> 
> tag:tag0,option:dns-server,9.114.219.1 
> tag:tag0,option:classless-static-route,169.254.169.254/32,9.114.219.19
1,0.0.0.0/0,9.114.219.254
>
> 
tag:tag0,249,169.254.169.254/32,9.114.219.191,0.0.0.0/0,9.114.219.254
> tag:tag0,option:router,9.114.219.254 
> tag:78baad92-d8cd-4acc-96c8-fa112954566d,option:tftp-server,9.114.219.
72
>
> 
tag:78baad92-d8cd-4acc-96c8-fa112954566d,option:server-ip-address,9.114.
219.72
> tag:78baad92-d8cd-4acc-96c8-fa112954566d,option:bootfile-name,pxelinux
.0
>
>  and the process is started with dnsmasq --no-hosts --no-resolv
> --strict-order --bind-interfaces --interface=tap30cc9287-f6
> --except-interface=lo 
> --pid-file=/opt/stack/data/neutron/dhcp/3970ede5-8169-40a5-8a0c-401ed6
8fb335/pid
>
> 
- --dhcp-hostsfile=/opt/stack/data/neutron/dhcp/3970ede5-8169-40a5-8a0c-40
1ed68fb335/host
> --addn-hosts=/opt/stack/data/neutron/dhcp/3970ede5-8169-40a5-8a0c-401e
d68fb335/addn_hosts
>
> 
- --dhcp-optsfile=/opt/stack/data/neutron/dhcp/3970ede5-8169-40a5-8a0c-401
ed68fb335/opts
> --leasefile-ro --dhcp-authoritative 
> --dhcp-range=set:tag0,9.114.219.0,static,86400s 
> --dhcp-lease-max=256 --conf-file= --domain=openstacklocal
> 
> Some things have change and now I need to also send option 210 
> (path-prefix) to use it on pxe AND petitboot.
> 
> What I've tried so far: Add to optsfile the following: 
> tag:78baad92-d8cd-4acc-96c8-fa112954566d,210,/opt/stack/data/ironic/tf
tpboot/
>
>  Which worked *only* for petitboot cause it explicitly asks for
> such option, pxe though doesn't ask for it, which led me to
> dhcp-option-force that I've added to the command line that starts
> dnsmasq:
> 
> --dhcp-option-force=208,f1:00:74:7e 
> --dhcp-option-force=210,/opt/stack/data/ironic/tftpboot/
> 
> That still doesn't work for pxe, dhcpdump is pasted here: 
> http://paste.openstack.org/show/204123/ the 210 parameter is not
> sent.

That packet trace shows that there are two DHCP servers active, at
9.114.219.191 and 9.114.219.192. That could cause all sorts of
interesting effects, so it's probably worth fixing first, to make the
debugging simpler.

> 
> So I ask, is there any problem by using both --dhcp-optsfile AND 
> --dhcp-option-force to start dnsmasq?


No, that should be fine.

> Is there a way to add force options in the dhcp-opts file?

No, there isn't, which is a weakness.


Cheers,

Simon.

> 


> 
> Thanks,
> 
> -- Mauro Rodrigues
> 
> 
> _______________________________________________ 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 v2.0.22 (GNU/Linux)

iEYEARECAAYFAlUwG+8ACgkQKPyGmiibgrd9BQCcDAgwHmhiPBTAkm4D2rgpuUQr
r4kAoJh1syY46mQt95JtYrwGIuxP7hdQ
=DtjH
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list