This should be working, but don’t have a configuration handy.
I did snip this from Google’s cache, hoping it helps trigger your brain in the right direction!
On Mon, Nov 20, 2006 at 02:23:40PM +0100, Rune Kock wrote:
> A DHCP-server will only send those options that the client asks for.
> So maybe your client doesn’t ask for option 120?
Ah, that’ll be it 
OK, so I changed the client’s /etc/dhclient.conf as follows:
send host-name “wibble”;
option sip-server-address code 120 = { unsigned integer 8, ip-address };
request subnet-mask, broadcast-address, time-offset, routers, domain-name,
domain-name-servers, host-name, nis-domain, nis-servers, ntp-servers,
sip-server-address;
and dnsmasq still has:
dhcp-option=120,1,192.168.1.1
Now, here’s the end of the response I get back as seen by tcpdump:
0x0140: 036c 616e 0c06 7769 6262 6c65 7808 ffff .lan..wibblex...
0x0150: ffff c0a8 0101 ff .......
So there’s option 120 (0x78), but for some reason the value ‘1’ has been
encoded as ff ff ff ff, when I need it to be 01.
I tried changing to
dhcp-option=120,1b,192.168.1.1
but then the response I got back was no good as the whole lot was intepreted
as an ASCII string:
0x0140: 036c 616e 0c06 7769 6262 6c65 780e 3162 .lan..wibblex.1b
0x0150: 2c31 3932 2e31 3638 2e31 2e31 ff ,192.168.1.1.
Ah, but it seems I was misunderstanding the man page. OK, this seems to do
the trick:
dhcp-option=120,01:C0:A8:01:01
Thanks for pointing me in the right direction.
It would be nice if I could mix’n’match integers and IP addresses though,
because then I could have
dhcp-option=120,1,0.0.0.0
which would substitute the “correct” IP address automatically.
Regards,
Brian.