embeddedipnameservers

What protocol do routers use to determine the host name?


I am programming an embedded device (at91sam7x, using FreeRTOS and lwIP), which has LAN. When it appears on the router's device list, it has no name. How can I provide one? What protocol do routers use for it?


Solution

  • DHCP can provide the name of the requesting computer to the server which can then record that against the IP address it gives out. Many (most?) self-contained router/WiFi boxes will do this and, if not, DD-WRT or OpenWRT will.

    Note that the requesting computer must send its hostname in the DHCP request, an optional thing, for this to work. I don't know if FreeRTOS does this but even it's not an option you could certainly update it to do so.

    Some DHCP systems (like the Linux DHCP server) also have the ability to communicate with a DNS server that supports dynamic updates (like Linux "bind") to push the host->ip mapping table to it and thus make the mapping available any device using that DNS server for lookups.