What protocol do routers use to determine the host name?

I am programming an embedded device (at91sam7x using FreeRTOS and lwIP) that has a LAN. When it appears in the device list of the router, it does not have a name. How can I provide it? What protocol does the router use for this?

+4
source share
2 answers

DHCP can provide the name of the requesting computer to the server, which can then write this to the IP address that it issues. Many (most?) Standalone routers / WiFi boxes will do this, and if not, DD-WRT or OpenWRT will.

Note that the requesting computer must send its hostname to the DHCP request, which is not necessary for this to work. I don’t know if FreeRTOS does this, but even this is not an option that you could certainly upgrade for this.

Some DHCP systems (for example, a Linux Linux DHCP server) also have the ability to contact a DNS server that supports dynamic updates (for example, Linux "bind") to push the host-> ip mapping table and thus make the mapping available Any device that uses this DNS server to search.

+4
source

DNS :)

The host name of this device must be registered on your DNS server. What might be your router, otherwise I assume that you do not have one yet.

In this case, you could, for example, set up a Bind server on your network. Then every other device should use this server as the primary DNS server. A more convenient solution would be to (also) set up a DHCP server, and then tell its clients the IP address of the DNS server. In fact, your router may have built-in DHCP and allow you to specify a custom DNS server.

+1
source

Source: https://habr.com/ru/post/1438705/


All Articles