[Dnsmasq-discuss] problem with dhcp options

Carlos Carvalho carlos at fisica.ufpr.br
Sat Jan 6 04:37:10 GMT 2007


Simon Kelley (simon at thekelleys.org.uk) wrote on 5 January 2007 15:26:
 >Carlos Carvalho wrote:
 >
 >> Agreed. Also I can probably hack around and not use udhcpc, will try
 >> it now. However, there are more problems. First, machines don't get a
 >> default route, which should be provided by the dhcp-option=3,zagros
 >> line. I tested with two linux distributions (gentoo included), windows
 >> 98 and xp.
 >
 >Apologies for missing this: you cannot use a hostname there: you need
 >the dotted-quad IP address.

That solved the default route problem, thanks.

 >> Second, I'm getting this in the logs for some machines:
 >> 
 >>  dnsmasq[15527]: cannot send DHCP option 17: no space left in packet
 >>  dnsmasq[15527]: cannot send DHCP option 19: no space left in packet
 >> 
 >
 >Pretty much what it says: you are trying to send more stuff than will
 >fit. The client can indicate an ability to accept packets larger than
 >the small default, so this might be client-related. (ISTR that windows
 >offers larger packets, I doubt that udhcpc does.)

Hmm... This never happens with ISC dhcpd... Of course it can be a bug
in dhcpd for not respecting the packet size but everything has always
worked with it.

 >Are you still sending option 19 too? Is that expected?

Yes but not useful so I removed it but didn't help with the space
problem.

I got rid of udhcpc but several machines still didn't boot because
they didn't get the proper root path or kernel filename. I managed to
find a small enough config to fit in the packet, and it works for all
machines. This means that the truncation of packets is really the
problem. Also udhcpc works when there's no truncation. We still have
to find out whose fault it is.

Simon Kelley (simon at thekelleys.org.uk) wrote on 5 January 2007 14:25:
 >Please could you capture the packets in question and send them to me?
 >
 >tcpdump -i <interface> -s 0 -w /tmp/dump
 >
 >on the machine running dnsmasq should do it.

I knew you'd ask for this :-( :-( Of course I must try to do it. Right
now tcpdump doesn't run because I didn't compile the packet socket in
the kernel...

I think the manual should make clear some details that are important
in problem cases. First, dhcp-option=3,... It should be stated that
an ip must be used, not a name. Talking about it, it should be made
clear in *all cases* if a name is acceptable. Further, it should be
said if the name must be in one of the hosts files or if the upstream
servers will be queried, and what happens when a name isn't found.

Why are names accepted in some cases, like dhcp-host, and not in
others? At first sight this is not very consistent.

It should also be said that if you give a hostname in the dhcp-host
declaration it'll define the hostname and be sent to the client.
Further, it should be said that dhcp-option = 12,... is ignored!!
I find this behavior undesirable. It's ok to define it via dhcp-host
but not ignore in the specific setting.

The manual should also tell that the automatic sending of a parameter
can be cancelled by setting that parameter to null with an empty
declaration, such as dhcp-option=3 cancels sending the default router.



More information about the Dnsmasq-discuss mailing list