I am having problem with viewing hostnames of devices located in my LAN. On my first laptop (Ubuntu 18.04 LTS Desktop edition) result of following command:
arp -a
Is exactly what I want:
X (192.168.56.243) at 40:a3:cc:99:2d:66 [ether] on wlan0
test-test-test (192.168.56.146) at 48:bf:6b:e3:bf:5a [ether] on wlan0
TP-Link_Archer_ (192.168.56.1) at 10:7b:44:40:61:70 [ether] on wlan0
Using nmap, I am able to scan my LAN using this command:
nmap -sn 192.168.56.0/24
And I get the perfect results with hostnames:
Starting Nmap 7.60 ( https://nmap.org ) at 2018-08-07 09:07 EDT
Nmap scan report for TP-Link_Archer_ (192.168.56.1)
Host is up (0.0054s latency).
Nmap scan report for ZZ (192.168.56.156)
Host is up (0.00045s latency).
However, on another laptop with Debian 9 x64 Minimal installed, the whole hostnames part is missing. Whenever I issue arp -a, I get the following:
? (192.168.56.243) at 40:a3:cc:99:2d:66 [ether] on wlan0
? (192.168.56.146) at 48:bf:6b:e3:bf:5a [ether] on wlan0
? (192.168.56.1) at 10:7b:44:40:61:70 [ether] on wlan0
Moreover, scanning with nmap -sn 192.168.56.0/24 produces this output:
Starting Nmap 7.60 ( https://nmap.org ) at 2018-08-07 09:17 EDT
Nmap scan report for 192.168.56.1
Host is up (0.0054s latency).
Nmap scan report for 192.168.56.156
Host is up (0.00045s latency).
I have honestly no idea what is going on, most likely I am missing something in Debian Minimal installation, which is installed in Ubuntu. But I have no clue where to find the missing part so Debian machine can start showing me hostnames.
Any ideas?
EDIT: My /etc/nsswitch.conf is exactly this:
root@zxcv:/home/test# cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
However I've setup a VM with bridged network adapter, installed same version of Debian Minimal, and I am able to get the hostnames for all IPs. The question now is, which packets/modules/services is the failing Debian missing, which prevents from getting hostnames?