LAN hostnames

Is there any way of populating hostnames in the ‘clients’ section of the GL-iNet firmware other than going in to Luci and setting them? Some way that the router can detect hostnames from the hosts themselves? I’m working primarily with Linux and Android hosts.
I tried installing avahi-daemon on one of my LAN hosts on a whim as that’s worked for me with consumer routers in the past, but it didn’t seem to do the trick.

The hostname of clients, is that the clients report to the router. If the client does not report, you cannot get the hostname.

What does it display in luci and in the clients of default UI?

How does it report? Some of my hosts report and some don’t, I don’t understand the difference.

I do think the name is mostly populated via DHCP. Later it also can be announced via NetBIOS. Than there ist Avahi/Bonjour.

Do be more specific, it would help to know the devices. In my network all PC/Notebooks are telling the names. The Amazon Echo are often listed as Linux-[some number]. Kindle and FireTV will be amazon-[part of the Mac]…

If the client won’t give a unique name, the DNS has to take care. It will be a problem, if the Laptop is connected via LAN and WLAN.


1 Like

More technical:
the service is dnsmasq:

14400 dnsmasq   2756 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg01411c -k -x /var/run/dnsmasq/dnsmasq.cfg01411
cat /var/etc/dnsmasq.conf.cfg01411c
root@GL-MT1300:~# cat /tmp/dhcp.leases
1653778467 cc:2f:71:xx:xx:xx FA000NBM 01:cc:2f:71:xx:xx:xx
1653770808 6c:ad:f8:xx:xx:xx Chromecast *
1653771049 0a:87:23:xx:xx:xx * 01:0a:87:23:xx:xx:xx
1653758646 08:cc:27:xx:xx:xx * 01:08:cc:27:xx:xx:xx
1653776378 50:dc:e7:xx:xx:xx amazon-66fxxxxxx *
1653754505 68:9a:87:xx:xx:xx * 01:68:9a:87:xx:xx:xx
1653777073 ac:22:0b:xx:xx:xx Nexus-7 01:ac:22:0b:xx:xx:xx

All my hostnames are assigned by DHCP. No local configuration right now.
I do think /etc/hosts will overwrite this file, but you also need a fixed IP to use this file.