Display of hostnames on AP LUCI status page?

Hi,

I'm experimenting with using an Archer C7 as a dumb-ish Access Point.

The canonical way of doing this is to ignore the WAN port and simply connect the common LAN to a LAN port on the device.

So, of course, I'm doing something different.

I want to use the LAN ports as LAN ports, and the WAN as an extra LAN port, which will be the 'upstream connection'. I would like to use all the available LAN ports, and not leave one unused. I could, of course, buy and install a low-cost switch, but that gets messy - needs more space, and power supply.

Having set it up, it all works fine, but on the LUCI Status page of the AP under 'Wireless', the Associated Stations displays an IPv6 link-local address under 'Host' (fe80::...). I'd like it to display the hostnames if possible.

Now the AP is set up as a client, and the upstream router handles DNS and DHCP. The upstream router shows the hostnames of Associated Stations on its LUCI Status page. Is there anything I can tweak to get the hostnames appearing on the AP Status page?

It looks like I need to query the ARP cache of the DHCP/DHCP6 server to get the mapping from MAC address to IP address, and once one has the IP addresses, one can do a standard DNS lookup. Are there any tools that allow the AP to do this, so I get a better clue about what the associated stations are on the wireless network of the AP?
Alternatively, something on the upstream server that tells me whether a host is attached locally, or via a downstream AP, and if downstream, which AP?

As I say, I'm experimenting, so the setup might look a bit odd.
I am deliberately not giving the AP a static addresses : instead it gets a static DHCP lease on the upstream router. The bridge device gets used twice: once for IPv4 protocol interface running DHCP (client) and once for IPv6 protocol interface running DHCPv6 (client) (much like the standard WAN/WAN6 setup)

/etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix '<redacted>::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'

config interface 'lan'
	option device 'br-lan'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.<redacted>'
	option gateway '192.168.<redacted>'
	option proto 'dhcp'

config device
	option name 'eth0.2'
	option macaddr '<redacted>'

config interface 'wan'
	option device 'eth0.2'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth0.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option ports '0t 1 2 3 4 5'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '2'

config interface 'lan6'
	option device 'br-lan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

1 Like

When i was using OpenWrt devices as AP‘s i used this method:

worked pretty good.

1 Like

Cool topic.
I would go the logging route. Then you have the history in addition to the 'right now'. You can search system log in Luci.
On your AP you can get MAC with logread | grep AP-STA-CONNECTED
On your Router/DHCP server you can get MAC,IP,hostname with logread | grep DHCPACK

Collect all the logs in one place, syslog or scp. Have a script search, correlate and format the output.

I'm not sure how to add content to Luci, but you can have uhttpd listen on another port and host a file with your script output.

Or, send it all to a cloud logging service and make a dashboard

1 Like

Thank you. You have given me great food for thought. And I wonder why that article didn't come up in my search.

1 Like

Thank you. I appreciate the suggestions. Gives me a whole new perspective to think about.