How to get hostnames on dumb AP on luci?

I am a noob and can only work with python code for data science. So please help me out. I did look up the forum for solutions and found that I have to enter the code somewhere.

Can the community please help me out on where to put the code? because the code doesn't seem to work for me.

Additionally I prefer an efficient/right way for it to show on luci dumb AP without human intervention. I want it to show everytime I look at the devices in "wireless" tab. The linked post was just an example

PS:
the simplest thing is to create the file:
/etc/ethers

and copy it to all AP dumps

cat /etc/ethers

#
#  Lookup man 5 ethers for syntax documentation
#
#  Examples :
#       02:00:11:22:33:44       OpenWrt.lan
#       02:00:11:22:33:44       192.168.1.1
02:00:11:22:33:41 myhost
02:00:11:22:33:42 myhost2

I have created an empty file in etc/ethers

And after I ssh into the dumb AP and type cat etc/ethers it says

root@E8450Hall:~# cat etc/ethers
cat: can't open 'etc/ethers': No such file or directory

exec please:

cat /etc/ethers

It opened the file with the commented line. Just to be clear, I am doing this on my dumb AP. But it still doesn't show hostnames on dumb AP.

you will need to add a line for each host you want to be show ...

mac hostname

#
#  Lookup man 5 ethers for syntax documentation
#
#  Examples :
#       02:00:11:22:33:44       OpenWrt.lan
#       02:00:11:22:33:44       192.168.1.1
02:00:11:22:33:41 myhost
02:00:11:22:33:42 myhost2

I am sorry for the misunderstanding. I don't want it to work like you explained above. I have a lot of devices and it's not feasible this way and new devices added periodically. Let me explain again.

Currently there are ipv6 address or ? Next to hostnames in the dumb AP (as shown in the image). I want it to show the actual hostnames from the main router to the dumb AP without me having to enter any names like you mentioned.

Additionally if there is no hostname, I want to show ipv4 address in the dumbAP (not ipv6 address). So once I set the hostname for the unidentified ipv4 address in the main router, I want it to show the hostname automatically in Luci in the dumbAP as well.

ps: common, no procedure will be valid in an environment where many clients will be continually added and removed (obviously I'm referring to the hostname not the IP address)

for example, I am the administrator of a public wifi, I need to know the host name of the clients that are added/removed, I would say no

or I am the network administrator of a company, my task will not be to make a map of the clients (hostname) but to prevent unauthorized access

or at least that's how I think

This is a known dumb AP thing.
But I solved it by adding net.ipv4.conf.br-lan.arp_accept = 1 to /etc/sysctl.conf.

This might work or not for your setup. In my experience if the client is an iOS with "limit tracking" they have to connect twice before the AP is able to resolve the hostname, or you can ping the client from the dump AP to resolve it.

It's not perfect but it works -ish.

Edit: after you add the line to your sysctl.conf, save, exit and run sysctl -p.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.