OS: Linux MyDesiredName 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux on Raspbian Buster Lite.

Whenever I set my Raspberry to get a DHCP IP and I go to my AP's DHCP List, Raspberry's client name is "Unknown".

I have set sudo nano /etc/hostname and sudo nano /etc/hosts from raspberrypi to MyDesiredName and then I've done sudo /etc/init.d/hostname.sh.

Yet, the client name is still unknown. How can I change that ?

hostname returns MyDesiredName. That is the real name. It has no special characters.

dhcpcd.conf is empty, like blank.

wpa_supplicant.conf only has:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
#Wireless Network Credentials

Thank you !

  • Sounds like it is really about your AP. What does it list as the name for other nodes (ie., not the Raspberry Pi)?
    – goldilocks
    Commented Sep 18, 2019 at 13:23
  • It lists their names. Raspberry is the only unknown there
    – bleah1
    Commented Sep 18, 2019 at 14:12
  • :/ ...What are their names? Are they hostnames you set or something else? Also, check systemctl status avahi-daemon. If the AP is gathering hostnames, you need that to reciprocate, and you need port 5353 open locally. See en.wikipedia.org/wiki/…
    – goldilocks
    Commented Sep 18, 2019 at 14:39
  • You wrote "dhcpcd.conf is empty". Default network environment of Raspbian is dhcpcd and needs configuration from that file. What operating system do you use? What network environment does it have? Please address me with @Ingo otherwise I won't see your reply.
    – Ingo
    Commented Sep 18, 2019 at 17:42
  • @Ingo I have already posted what OS I'm using. What do you mean by network environment ? It's connected to an AP. I am changing from DHCP IP to Static IP and I need to be able to change from DHCP to Static, that's why I am playing with dhcpcd.conf and wpa_supplicant.conf. I'm basically sending network credentials from a PHP web-page into a .txt file and reading them with a C++ program and then applying them by overwriting into dhcpcd.conf or wpa_supplicant.conf.
    – bleah1
    Commented Sep 19, 2019 at 8:00

1 Answer 1


Your router lists names for other devices on the WLAN, but not for the Raspberry Pi. A clue to why this is is in the names used for the other devices.

What are their names? Are they hostnames you set or something else?

They are just names, like: Galaxy-Note9. I didn't gave anything any name

These are based on MAC address lookups. If you haven't heard of them before MAC addresses are network interface firmware entities; they are generally represented as a set of 6 bytes in hexidecimal separated by colons, eg.:


Because they are usually stored in firmware, they can be changed, so they are not a guarantee of anything, including uniqueness -- but since the chances of two devices with the same MAC are very slim,1 they are used by link layer protocols such as ARP by your router, which corresponds them to the IP addresses it assigns.

Point being, MAC addresses generally don't change from what they are assigned by a manufacturer, and they play an important role in structuring a WLAN. To help prevent collisions (duplicate addresses), the first half of a MAC address is associated with a particular manufacturer (then it is up to the manufacturer to avoid using the same address multiple times).2 Sort of like internet domain names, manufacturers buy/register blocks of such addresses, and you can do lookups and reverse look-ups based on that.

Which is exactly what your router does. If you pop my example address above into the "Vendor Lookup" just linked, you'll get Raspberry Pi Foundation. If you put "raspberry pi foundation" in the OUI reverse lookup (the OUI is the first 3 bytes of the MAC), you'll get B8:27:EB.

Some versions of nmap and other network tools also do lookups, which is why you will sometimes get "Raspberry Pi Foundation" from them.

Anyway, "Galaxy-Note9" doesn't have an OUI via reverse lookup, but "Samsung" has quite a long list. I would guess the router has a stored list that it uses (this is how nmap does it, I believe) which may be periodically updated, rather than doing live internet exchanges. This could explain why the name is more specific (eg., if Samsung provides a breakdown), and why the lookup is not exhaustively accurate (it doesn't really matter anyway except for convenience in listing active devices). Evidently the Pi Foundation did not make the local list.3

In any case, it is not a host name, point being, the router did not get them from mDNS, which is what avahi-daemon implements. This runs by default on Raspbian and is also implemented on Windows and Apple devices, hence these will identify the Pi this way. However, this higher level identification isn't very important to your router since it depends on the WLAN working properly first to function.

  1. More accurately I'd guess the reason they are changeable is so that a router can refuse duplicates, in which case the device can proffer an alternative.

  2. The last half of the address is 3 bytes, 16777216 possible combinations.

  3. I notice that nmap generally doesn't identify Pis by name either anymore, because I still get manufacturer IDs for many/most things on my WLAN but not for the Pis. I thought they had started using an unofficial/arbitrary OUI (they have probably sold more than half the number of addresses available with just one), but my newest pi, a 3A+, with the newer wifi chips, still uses b8:27:eb.

  • Great answer ! I have learned a lot from it, but how does it answer my question ? I have managed to change Client Name by adding interface wlan0, hostname MyDesiredName and clientid to dhcpcd.conf
    – bleah1
    Commented Sep 19, 2019 at 10:54
  • Ah the missing link -- I indented this to explain why you couldn't set it, but looking at clientid in man dhcpcd.conf, this is obviously involved and related to the MAC address, and plays some role in communicating with the router. Did you use a string (clientid myname) or just by itself (clientid)?
    – goldilocks
    Commented Sep 19, 2019 at 11:37
  • The first 3 lines of dhcpcd.conf literately are interface wlan0, hostname MyDesiredName and clientid.
    – bleah1
    Commented Sep 19, 2019 at 11:43
  • Can we start a chat ? I would like to ask you a couple of questions if you are also ok with this. I am asking because I can't put any more questions on this site.
    – bleah1
    Commented Sep 19, 2019 at 11:44
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – goldilocks
    Commented Sep 19, 2019 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.