Can’t resolve hostname by ip address over nslookup [closed]

I’ve got an Ubuntu Server on my LAN.
I can fully use it (samba, ssh, apache2, xmpp…) by using it’s ip address.
But I want to use the hostname to connect (e.g. ssh). When I do a nslookup with the ip address of the server, the answer is: name = noname (which is NOT the server’s hostname 😉
Other hosts on the LAN are responding with the correct hostname.

Output of nslookup (this is my ubuntu server): shows no hostname

Address:  name = noname.

Output of nslookup (this is my raspberryPi): shows the right hostname.

Address:  name = retropie.

All hosts get their ip address over DHCP. So the hosts, who show their hostname correctly were never configured separately.


For such a small network and without the assumption that there is dns server on this network you can simply add the ip addresses to the local hosts file on each machine. I know this is a bit “old school” but it will be 100% solid and never fail.

The reason dns may failing is that your dhcp server may be providing dns settings for a dns server that either you do not control or one that does not get automatic updates from the dhcp system. If you add a static entry into your (dns server you control whose ip address is given out via dhcp) then you will get the correct nslookup from a cli from any machine on your network.

Source : Link , Question Author : bastele , Answer Author : lms

Leave a Comment