<div dir="auto">Hey Geoff,<div dir="auto"><br></div><div dir="auto">I absolutely agree with your explanation.</div><div dir="auto"><br></div><div dir="auto">So if dnsmasq is behaving the way it should and is not doing anything special w.r.t. the RPis, then there is some other component in the Ubuntu Mate 20.04 image that may be playing truant. </div><div dir="auto"><br></div><div dir="auto">Quoting from the ltsp issue (<a href="https://github.com/ltsp/ltsp/issues/582#issuecomment-951005481">https://github.com/ltsp/ltsp/issues/582#issuecomment-951005481</a>) where this originated - </div><div dir="auto">"<span style="color:rgb(251,251,252);font-family:inter;font-size:medium">It might be related to dnsmasq, or it might be related to initramfs-tools, or even to Ubuntu-specific netplan code inside the initramfs..."</span></div><div dir="auto"><font color="#fbfbfc" face="inter" size="3"><br></font>As explained in the ltsp issue, if the hostname would have remained blank, then ltsp takes care of assigning one as ltsp+\<last octet of the IP address\>. But since it is being set as 192 by something at some stage, the ltsp respects the same and that is not acceptable especially when there are multiple clients ending up with the same hostname 192.</div><div dir="auto"><br></div><div dir="auto">And I now feel that there is something very specific in the 20.04 image only, because I have a 18.04 image for x86 systems being served by the same dnsmasq and there is no such issue. One way would be to create a 20.04 image for x86 and see if this problem can be replicated. I may give that a shot sometime next month. </div><div dir="auto"><br></div><div dir="auto">As of now shall just wait for <span class="gmail_chip gmail_plusreply" dir="auto"><a href="mailto:pemensik@redhat.com" style="color:#15c;text-decoration:underline">@Petr Menšík</a></span>'s finding as it may reinforce the above explanations.</div><div dir="auto"><br><div data-smartmail="gmail_signature" dir="auto">Regards,<br>Shrenik</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 27 Oct, 2021, 21:45 Geoff Back, <<a href="mailto:geoff@demonlair.co.uk">geoff@demonlair.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
Hi Shrenik,<br>
<br>
On 27/10/2021 16:38, Shrenik Bhura wrote:<br>
<blockquote type="cite">
<div dir="auto">
<div><span style="font-family:sans-serif">Hi Geoff, </span>
<div dir="auto" style="font-family:sans-serif"><br>
</div>
<div dir="auto" style="font-family:sans-serif">I don't expect
it to at all set a hostname. <br>
</div>
</div>
</div>
</blockquote>
<br>
I think this sentence points to the very heart of your problem.<br>
<br>
I have been following this thread in detail. Everything indicates
that the RPI device is getting an IP address set as hostname and
sending that to dnsmasq in the DHCP packet, which of course results
in dnsmasq correctly interpreting the "192" before the dot as the
node part of the hostname, as already pointed out by Matthias.<br>
<br>
You said, earlier on:<br>
<br>
<i>"Nothing on the server is configured to set the same. The
Raspberry Pi client is netbooting, so nothing on the client side
could be setting it."</i><br>
<br>
That's an invalid configuration. All Linux-based systems - in fact
all POSIX systems - have a hostname, even if it is only "(none)" and
pretty much everything will break if there is not something set.
The same applies to Windows, if you are netbooting that, and in fact
every other OS I have ever encountered that uses IP (which is a
lot).<br>
<br>
Something must always set the hostname, and it definitely looks like
yours is being set by the OS image you are netbooting. If it's not
explicitly defined by the OS image, and also is not defined in the
dnsmasq DHCP parameters, then the OS image will likely be falling
back to using the IP address as a (unfortunate) last chance due to
lack of anything else.<br>
<br>
If you are truly expecting that your RPI device can operate without
having a hostname of any kind, I'm afraid you are expecting
something that simply won't work and even if DHCP worked in that
situation, pretty much everything else you tried to run on the RPI
would not work properly either.<br>
<br>
Regards,<br>
<br>
Geoff.<br>
<br>
<blockquote type="cite">
<div dir="auto">
<div>
<div dir="auto" style="font-family:sans-serif">But yet
something involved in the entire transaction is doing so
i.e. setting the IP address as the hostname and in doing so
it is getting it all wrong. <br>
<br>
</div>
<div dir="auto" style="font-family:sans-serif">Kindly read the
thread to understand what's exactly going on.<br>
<br>
<div data-smartmail="gmail_signature" dir="auto">Regards,<br>
Shrenik</div>
</div>
<br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, 27 Oct, 2021,
20:52 Geoff Back, <<a href="mailto:geoff@demonlair.co.uk" target="_blank" rel="noreferrer">geoff@demonlair.co.uk</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> Hi Shrenik,<br>
<br>
Looking at that configuration file I see nothing that
specifies the host name that the RPI device should
initialise itself with. Where do you expect it to
obtain a hostname from, and what specific hostname are
you expecting to set?<br>
<br>
Regards,<br>
<br>
Geoff.<br>
<br>
<br>
<div>On 27/10/2021 14:06, Shrenik Bhura wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div> > but my rpi machines received hostname
set from dnsmasq. I used static allocations only
for my testing. <br>
</div>
<div><br>
</div>
<div>Try without setting any.</div>
<div><br>
</div>
<div>> Can you share at least relevant part of
dnsmasq configuration? <br>
</div>
<div><br>
</div>
<div>Config file attached below.</div>
<div><br>
</div>
<div>> Does it have dhcp-host record for that
machine? <br>
</div>
<div><br>
</div>
<div>No, it doesn't.</div>
<div><br>
</div>
<div>The results are the same for any RPi 4B or
RPi 400. I have tested with 3.<br>
</div>
--</div>
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, 27 Oct
2021 at 17:46, Petr Menšík <<a href="mailto:pemensik@redhat.com" rel="noreferrer noreferrer" target="_blank">pemensik@redhat.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi,</p>
<p>I would try tomorrow, but my rpi machines
received hostname set from dnsmasq. I used
static allocations only for my testing. Can
you share at least relevant part of dnsmasq
configuration?</p>
<p>Does it have dhcp-host record for that
machine?<br>
</p>
<div>On 10/25/21 16:00, Shrenik Bhura wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">
<div class="gmail_quote" dir="auto">
<div dir="ltr" class="gmail_attr">On
Mon, 25 Oct, 2021, 01:24 Matthias
May via Dnsmasq-discuss, <<a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" rel="noreferrer noreferrer
noreferrer noreferrer noreferrer" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote">On
21/10/2021 13:05, Shrenik Bhura
wrote:<br>
> May be the code that logs this
line needs to be checked if it is
just printing part of the complete
hostname i.e. IP<br>
> address.<br>
> <br>
<br>
Hi Shrenik<br>
<br>
The code is doing what it is
supposed to do.<br>
<br>
Please take a look at the definition
of a hostname and what makes up an
FQDN.<br>
* <a href="https://en.wikipedia.org/wiki/Hostname" rel="noreferrer noreferrer
noreferrer noreferrer noreferrer
noreferrer noreferrer" target="_blank">https://en.wikipedia.org/wiki/Hostname</a><br>
* <a href="https://en.wikipedia.org/wiki/Fully_qualified_domain_name" rel="noreferrer noreferrer
noreferrer noreferrer noreferrer
noreferrer noreferrer" target="_blank">https://en.wikipedia.org/wiki/Fully_qualified_domain_name</a><br>
<br>
Valid characters for hostnames are:<br>
* ASCII(7) letters from a to z<br>
* The digits from 0 to 9<br>
* The hyphen (-)<br>
* A hostname may not start with a
hyphen<br>
* When following the old RFC 952, a
hostname may not start with a digit.<br>
<br>
The dot '.' is used to concatenate
the different domain labels.<br>
<br>
In your case you are using an IP
address as hostname which is not a
valid hostname.<br>
The first dot in the name you
provide is interpreted as domain
label separator, thus the hostname
is 192.</blockquote>
</div>
</div>
<div dir="auto">
<div class="gmail_quote" dir="auto">
<blockquote class="gmail_quote"> <br>
BR<br>
Matthias</blockquote>
</div>
</div>
<div dir="auto">
<blockquote><br>
</blockquote>
</div>
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">Hi All,</div>
<div dir="auto"><br>
</div>
<div dir="auto">Clarifying on the last
two posts -</div>
<div dir="auto"><br>
</div>
<div dir="auto">> In your case you
are using an IP address as hostname
which is not a valid hostname.</div>
<div dir="auto"><br>
</div>
<div dir="auto">> the problem here is
the client looks to be misconfigured
if it is telling the</div>
<div dir="auto">server its name is an IP
address... they are very different...</div>
<div dir="auto"><br>
</div>
<div dir="auto">No, I am not using such
an IP address anywhere as a hostname. </div>
<div dir="auto">Nothing on the server is
configured to set the same. </div>
<div dir="auto">The Raspberry Pi client
is netbooting, so nothing on the
client side could be setting it. </div>
<div dir="auto">Or may be it is
something in the Raspberry Pi 4B and
400 netbooting firmware which could be
responsible for this, if it is not
something wrong with dnsmasq? </div>
<div dir="auto"><br>
</div>
<div dir="auto">See - <a href="https://drive.google.com/file/d/1WmbdcjFf6OYU-lcwwHw2LM40eSEIvllL/view?usp=drivesdk" rel="noreferrer noreferrer" target="_blank">https://drive.google.com/file/d/1WmbdcjFf6OYU-lcwwHw2LM40eSEIvllL/view?usp=drivesdk</a></div>
<div dir="auto"><br>
</div>
<div dir="auto">May be something in the
dns handling implementation within
dnsmasq which doesn't differentiate
the absence of a hostname uses the
same IP address that has been served
to the client to play along,
eventually truncating what it
calculates as the domain part
(168.67.53) from the fqdn (i.e. after
the first . "dot"), and serving just
the hostname (192). This sequence is
visible in the snap above.</div>
<div dir="auto"><br>
</div>
<div dir="auto">If this is still not
clear then I suggest that the only way
to understand this situation best is
by netbooting a RPi 4B yourself from a
dnsmasq powered authoritative dhcp
server.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Do note that this is not
reproducible with a x86 client.</div>
<div dir="auto"><br>
</div>
<div dir="auto"><span class="gmail_chip gmail_plusreply" dir="auto"><a href="mailto:pemensik@redhat.com" rel="noreferrer noreferrer" target="_blank">@Petr
Menšík</a></span><span> </span>
may be you will be able to replicate
this easily as you have gone through
this sequence while nailing the
UEFI+non-proxy bug.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards,</div>
<div dir="auto">Shrenik</div>
</div>
<div dir="auto"><br>
</div>
<div>Regards,<br>
Shrenik</div>
</div>
</blockquote>
<pre cols="72">--
Petr Menšík
Software Engineer
Red Hat, <a href="http://www.redhat.com/" rel="noreferrer noreferrer" target="_blank">http://www.redhat.com/</a>
email: <a href="mailto:pemensik@redhat.com" rel="noreferrer noreferrer" target="_blank">pemensik@redhat.com</a>
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB</pre>
</div>
</blockquote>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Dnsmasq-discuss mailing list
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" rel="noreferrer noreferrer" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a>
<a href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss" rel="noreferrer noreferrer" target="_blank">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Geoff Back
What if we're all just characters in someone's nightmares?</pre>
</div>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" rel="noreferrer noreferrer" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
<pre cols="72">--
Geoff Back
What if we're all just characters in someone's nightmares?</pre>
</div>
</blockquote></div>