Hostnames not resolving

New here, I have yet to figure out how to get my router to fetch hostnames of various connected devices. Only 5 has names have actually appeared with the rest left unnamed. I do notice that the DHCPv6 names are getting "spectrum.com" naming, which I have no clue about meaning. It leaves me guessing which device is associated with which ip address. I have already done my best combing through these forums to no avail. Help is much appreciated!

OpenWrt cannot "fetch" hostnames from devices.
Either the device will advertise its name when it requests for DHCP lease.
Or you'll add the device name in the static DHCP lease.
Which method are you using?

1 Like

I don't plan on manually adding the hostnames of other devices as there are other people on the network I'm not willing to knock on the door to ask about, so likely taking an advertised name from a DHCP request. All I really need are names similar to what I would get when on stock firmware (SAC2V1K - mobile app gimmick is the whole reason I went to openwrt; did get all names to ip addresses).

Then Openwrt should have picked them up too.

You can always tcpdump the DHCP requests, see what info's being sent by the client.

Could also try to install arp-scan, and arp-scan-database, and get some info based on the MAC.

Btw, is the screen shot coming from the main router, or an AP ?

The screenshot is coming from the router. I do not know how to tcpdump, but I do know how to install software into my router. Does tcpdump force a client to renew DHCP lease? How would I do an arp scan with the software installed?

https://explainshell.com/explain?cmd=tcpdump+-i+br-lan+-nn+-l+udp+port+53

no

root@OpenWrt:/# arp-scan -l -I br-lan -m /usr/share/arp-scan/mac-vendor.txt
Interface: br-lan, type: EN10MB, MAC: c4:00:ad:77:11:cc, IPv4: 192.168.11.1
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.11.157  4c:56:df:aa:ff:bb       Targus US LLC

3 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 2.444 seconds (104.75 hosts/sec). 1 responded

This is done automatically on an OpenWrt default installation, so if you don't see anything it can also mean that the clients are not sending this information. :neutral_face:

I would say real computers normally advertise their name and IoT stuff may or more often may not advertise a meaningful name.

You can in dnsmasq connect a static lease with only a name to a mac and you don’t need to define a static IP. It doesn’t solve the issue but it makes it look good.

This happens when device uses random mac address, which is default setting in almost all devices.

Here are the results of the arp scan:


It doesn't give much more information other than what I already know from looking up the mac addresses other than the fact that something is being locally administered. I do understand that devices use random mac addresses, but that leaves the question of how my router on stock firmware was able to get all the hostnames. I do know that all these devices reconnected after I got openwrt automatically, but after trying to disconnect and reconnect some devices it still wouldn't give a hostname.

It will only work if the client device has a valid entry in the dhcp leases file.
It is Dnsmasq that does it for you, enabled by default, but is is possible to disable it..

Check the output of:
uci show dhcp

and

cat /tmp/dhcp.leases


image
results of uci show dhcp


dhcp leases

I was waiting for a couple of days to see if hostnames would appear after a couple cycles of dhcp leases thinking that entries should sort themselves out. Is there perhaps an alternative to Dnsmasq that is able to get hostnames?