Show hostname in Associated stations

In Luci->Network->Wireless in the section Associated Stations I can see a table of the clients connected to the AP. The column "host" should contain the device name but or it contains "?" xor the IPV6 address of the client. There is a way to resolve this IP and report the device name on that column?

Piviul

4 Likes

I am actually working on a native C application to do that with as little overhead as possible, real-time updating and not linked to either "alive" hosts or DHCP entries (only based on frames captured from WLAN interfaces), see: Real-Time Updating Dumb AP Associated Stations! - #28 by Cthulhu88

If you can wait a week or so, I should've have it finished.

2 Likes

Many thanks for the exhaustive answer. Can I ask you if there is a way to use the ipv4 address instead of ipv6 in hosts column?

Piviul

like this ?

As far as I am aware, it will show both IPv4 and IPv6 addresses, as long as they are found by the methods used by LuCI. You can take a look here to see currently used methods: https://github.com/openwrt/luci/blob/openwrt-23.05/libs/rpcd-mod-luci/src/luci.c#L1803-L1807

If you just want to show IPv4 addresses and omit the IPv6 ones, you need to avoid including IPv6 entries (assuming you're syncing from the lease files).
The one I am working on, works with IPv4 ARP entries only (may or may not add IPv6 support in the future).

yes, this way should be good. Suggesting the solution pay attention the AP dhcpd is disabled, I already have a dhcpd in lan: can we ask to the dns only the ipv4?

you'll achieve it by populating /etc/ethers with IPs instead of host names.
but it's obviously not dynamic.

Many tank Roberto, I can wait some weeks. Your application should works even if there is no dhcpd configured on the AP?

Have a great day!

Piviul

Yes, the only requirement is that ethernet frames be visible to the kernel's network stack for the WLAN interfaces in question (so we can capture them with a raw packet socket).
In the majority of cases, this requirement will be met automatically, but some devices might bridge the AP station to the LAN port via hardware only.

Optimum, thank Roberto I don't think I have an hardware bridge between LAN port/AP station, I'll wait some weeks.

Have a great day

Piviul

I know I've said around a week to get it released, but I'd other stuff that required my attention and I also spent some time refining my original concept to make the application as lightweight as possible.

I apologize for the delay. I've the C code (sitting at ~800 lines of code) ready, I just need to do some final testing and write an init script in order to allow it to run as a service (reading UCI configuration from /etc/config/warpmon).

1 Like

Many thanks Roberto, no problem, now I'm using the /etc/ethers file but would be great if I could see the host name without compiling the ethers file.

Have a great day

Piviul

@Cthulhu88 Great to see that you are working on extended functionality in this area!

I just need to add an -v option to default the application not to spam the system's log when valid ARP traffic is captured and added, before I move to the init script.

Thu Sep  5 00:03:32 2024 daemon.notice warpmon[2588]: Monitoring interface 'phy0-ap0'
Thu Sep  5 00:03:34 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.118
Thu Sep  5 00:03:59 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.226
Thu Sep  5 00:04:04 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.143
Thu Sep  5 00:04:50 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.226
Thu Sep  5 00:04:59 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.118
Thu Sep  5 00:04:59 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.143
Thu Sep  5 00:05:20 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.226
Thu Sep  5 00:05:29 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.118
Thu Sep  5 00:05:41 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.118
Thu Sep  5 00:05:50 2024 daemon.info warpmon[2588]: XX:XX:XX:XX:XX:XX mapped to 192.168.0.226
Thu Sep  5 00:06:00 2024 daemon.notice warpmon[2588]: Shutting down