[Kea-users] Domain name appears twice for a printer

Marcin Siodelski marcin at isc.org
Tue Jan 12 11:12:36 UTC 2016


On 12.01.2016 11:44, Shane Kerr wrote:
> All,
>
> tl;dr Maybe put at '.' on the host name? How can I do this in Kea?
>
> At 2016-01-04 15:25:27 +0100
> Shane Kerr <shane at time-travellers.org> wrote:
>
> > I have an HP LaserJet Pro 200 color M251n, and I noticed in the Kea SQL
> > table that the hostname was:
> >
> > laserjet.my.domain.my.domain
> >
> > All other devices have either blank names or proper names, like:
> >
> > android-341db4fa80e8ebba.my.domain
> >
> > For the moment I have fixed this by going to the printer control web
> > thingy and done Networking -> Network Identification -> Domain Name
> > (IPv4/IPv6) and set that to "my.domain". (It defaults to DHCP.)
> >
> > This solves my problem, but I'm happy to try to help debug this in the
> > general case since it points to a problem either in the printer or Kea.
> > Any Kea developer have advice about this?
>
> I poked around a little bit more.
>
> Kea is sending back something like this:
>
>             Hostname Option 12, length 25: "NPI037B01.zonnestelsel.tk"
>             Domain-Name Option 15, length 16: "zonnestelsel.tk."
>
> This works for other clients, but I think that this printer interprets
> the hostname as relative to the domain-name option.
>
> Unfortunately RFC 2132 is ambiguous on this point:
>
> 3.14. Host Name Option
>
>    This option specifies the name of the client.  The name may or may
>    not be qualified with the local domain name (see section 3.17 for the
>    preferred way to retrieve the domain name).  See RFC 1035 for
>    character set restrictions.
>
> Perhaps that "may or may not" has been clarified by later RFC? (I
> didn't see anything that looked like it did at a casual glance.)
>
> My guess is that if the hostname had a trailing '.' that it would be
> interpreted as absolute instead of relative, but I couldn't figure out
> how to get Kea to do this.
>
> Of course this may break other things, but I'm willing to
> experiment. :)
>
> Any advice?
>

Shane,

We've had hard time with this in the past and the RFC didn't seem to be
helpful as you pointed out. At some point we did put trailing dot at the
end of the qualified hostname but some clients clearly had problems with
the trailing dot. Thus, currently Kea never puts trailing dot in the
hostname, even for the fully qualified names it returns to the clients.

The current server logic is that if the client has specified a hostname
comprising a single label, e.g. "laser-jet-stuff" then the server would
assume that it is an unqualified name and will qualify it. The resulting
hostname will not include a trailing dot, even though it is now
qualified. If the client specified a name with multiple labels (e.g.
"laser-jet-stuff.example.org") the server would treat it as qualified
name and will not qualify it, unless it is configured to replace
client's name with something auto-generated or statically reserved name.

To clarify your case, what is the hostname that your printer sends to
Kea? Perhaps you could even provide a capture?

Marcin



More information about the Kea-users mailing list