Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [threadx-dev] Technical support question?

Hi Snorri.

I had a closer look at this. Handling device-provided hostnames is platform-dependent. In other words, not all DHCP and DNS servers will handle it. I think your hypothesis is correct and that the behaviours you witnessed are specific to Microsoft environments.

If such behaviours are not properly documented in recognized standards (RFCs or others), I would rather not implement them. Naturally, I am not a project lead or committer and the actual project team could have a different opinion.

Best Regards,

Frédéric DESBIENS

Senior Manager — Embedded and IoT | Eclipse Foundation

Mastodon: @fdesbiens@xxxxxxxxxxxxxxxxxxxxx




On Thu, 2 May 2024 at 10:13, Snorri Kristjánsson <snorri@xxxxxxxxxx> wrote:
Hi Frédéric,

Many thanks for your help.
Your suggestion works. The host-name I supply in the call to nx_dhcp_create works.
I can see in our DHCP server logs that the device gets its IP address and in the log file I can see the host name that I gave it.
BTW - we use Microsoft Windows servers for all our networking - and I'm using Windows 10 as my workstation
But the problem remains that I can't still ping the device using the host-name, nslookup also returns no results - even if the FQDN is used (I run ipconfig /flushdns of course before these tests).
FYI - It seems that our DHCP server extends the host name supplied by a client to the internal LAN FQDN. E.g. If the client supplied hostname is "Tester0" and the local LAN domain name is "Acme.local" the FQDN becomes "Tester0.Acme.local". This is what I see in the DHCP server logs.
I've also tried ping and nslookup on a Ubuntu linux VM that I have - with the same negative results, and I tried on a different PC - same results.
Then - after some googling I found this thread dhcp-reservation-not-registering-in-dns-for-some-devices that seems to be regarding the problem I'm dealing with.
Unfortunately I'm not a network expert - but it looks like the DHCP client needs to request a DNS update explicitly when communicating with the DHCP server (or we change the setting on the DHCP server service: configure-dns-dynamic-updates-windows-server - is-there-a-downside-to-always-updating-dns-from-dhcp).
It seems that the default setting for Windows DHCP/DNS services is to have the DHCP client explicitly request a DNS update.
It would of course be interesting to try to change the DHCP server setting - but the reason I'm doing these experiments is to evaluate the Eclipse ThreadX (Azure RTOS) "fit for purpose" - for future products of the company I'm working for - and changing the DHCP service settings would defeat that.
The example project that I built and tested is Nx_TCP_Echo_Server running on a STM32 Nucleo-H723ZG board.

Sorry about the long rambling post - but it helps my thinking process to write this all down...
So the question is:
Is there a way to have the DHCP client (nx_dhcp_create) request the DNS update?

I've had a look at RFC2131 (the DHCP protocol) but could not find anything specific regarding this "DNS update request" problem. It may be something Microsoft specific but I don't know.

Best regards,
Snorri

On Tue, 30 Apr 2024 at 20:01, Frédéric Desbiens <frederic.desbiens@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Snorri.

Yes, this is the right place for such questions. 

You will find the documentation for the DHCP client here: https://github.com/eclipse-threadx/rtos-docs/blob/80bd9fe9a33fa79257c75629be1b4438b84db7bc/rtos-docs/netx-duo/netx-duo-dns

I am no expert, but from what I understand, the name you give to the DHCP client instance seems to be used as the hostname. 

UINT nx_dhcp_create(
    NX_DHCP *dhcp_ptr,
    NX_IP *ip_ptr,
    CHAR *name_ptr);


Line 6784 in nxd_dhcp_client.c sets the proper option and the value for dhcp_ptr -> nx_dhcp_name comes from *name_ptr in the method above.

 _nx_dhcp_add_option_string(buffer, NX_DHCP_OPTION_HOST_NAME, name_length, (UCHAR *) dhcp_ptr -> nx_dhcp_name, &index);

Best,

Frédéric DESBIENS

Program Manager and Evangelist — Embedded, IoT, and Edge Computing | Eclipse Foundation

Mastodon: @fdesbiens@xxxxxxxxxxxxxxxxxxxxx




On Tue, 30 Apr 2024 at 12:04, Snorri Kristjánsson via threadx-dev <threadx-dev@xxxxxxxxxxx> wrote:
Hello devs,

Where can I ask a technical question?
Is this the correct place?

In short - I need to know how to set the hostname for a (DHCP enabled) device that is running the ThreadX - NetX DUO network stack.

--

Best regards,

Snorri


Snorri Kristjánsson

Software Developer Kvikna Medical +354 578 8400 kvikna.com

 

This electronic message and any attachment(s) may contain legally privileged or confidential information that is intended solely for the individual or organization to whom the email is addressed. If you have received this email in error, please immediately notify the sender and delete this message and any attachment(s) from your system. If you are not the intended recipient, any copying, review, dissemination, printing or any other action in relation to the content of this email is strictly prohibited and unlawful.
_______________________________________________
threadx-dev mailing list
threadx-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org

Back to the top