Hostname question

Hello:

Happy New Year!

I use a program called netscan to scan my device in LAN, I got the result as below(partially):

The question is I don’t get all hostname appeared.

192.168.10.3 is a dumb ap with FreshTomato firmware, I have E3200 hostname set in it.

192.168.10.5 is a dumb ap with openwrt firmware, I set hostname EA3500 in it.

However, 192.168.10.2 is dumb ap with FreshTomato firmware as well, its hostname shows up properly.

Not sure what makes the difference that some of them can show proper hostname but some are not, I did not see configuration difference.

Any suggestion to make all hostname working?

Does your router and local nameserver do know about these dump AP host names?

How do they get their address configuration?

The main router is Raspberry PI4 running openwrt with ip 192.168.10.1. I added dumb AP’s ip addresses to the /etc/hosts on pi4 just now, problem solved. Just wondering if there is a way can do automatically detection without editing hosts file.

1 Like

If nothing sends the hostname, no.

Bit an alternative os to make a DNS entry instead of altering the hosts file.

1 Like

Either use DHCP on the dump AP and send it's hostname or use a real DNS server and update the DNS record with nsupdate, or provide the host name via etc/hosts which dnsmasq reads (and can be updated without a restart of dnsmasq).... But those are mainly all options how this is done...

1 Like

Hello, Happy New Year!

How is your DNS system configured? Is there any record of the type IP Address <=> Hostname?

Here's an example of my configuration, done in DNSMasq...

I didn’t know I could add hostname there. What is difference between adding hostname in DNS records and editing /etc/hosts?

Records in dnsmasq/DHCP config are "only" available when you query the name server.

Records in etc/hosts are also available directly for ping, ssh, traceroute, and many other tools.

1 Like

Thanks for explanation. I just tried to remove entries in hosts file and add them to DNS Records in main router. NetScan program does not see all hostsname in the LAN. I think I will stick to use hosts file.