Unknown hostname for the hosts on the same LAN

Posted on

Problem :

Edit: I tried raspberrypi.local and raspberrypi. same result for both.

I am not very experienced in networking. However, i know some fundamentals.

Now, I do have one Raspberry Pi and one laptop connected to same WiFi in my home.

The hostnames are raspberrypi and laptop1.

When I check (modem interface) I can see that both devices are connected to wifi, and their hostnames are correctly identified there.

The ip numbers are:



Then I think that if I make a ping from my laptop, addressing raspberrypi, as follows

ping raspberrypi 

The DNS should resolve name raspberrypi to the ip ( and it should work fine. However, that is not the case. I get unknown host raspberrypi warning.

On the other hand, I am able to ping raspberrypi by ping

This is also valid for ssh or nslookup, etc.

I don’t understand why my router cannot resolve those hostnames and let my pc know about it.

I think I might have some conceptual misunderstanding. So, I will be waiting for any help.


Solution :

Most routers contain a built-in DHCP server and a built-in DNS server, but very few routers make those two processes talk to each other. So when you see that your router “knows” that host “raspberrypi” has address, you’re really just seeing what the DHCP server knows. Because the two built-in server processes don’t talk to each other, the DNS server has no idea who “raspberrypi” is or what its IPv4 address is, so it can’t answer that question when queried via the DNS protocol.

So you probably need to manually enter those name-to-address mappings in the DNS server administration UI in your router, or use some other name resolution system (such as IETF ZeroConf a.k.a. mDNS) so that devices on your network can look up each others’ IP addresses by name.

Leave a Reply

Your email address will not be published. Required fields are marked *