How does LuCI resolve IP/MAC addresses

In LuCI there are many places where IP/MAC addesses are resolved to host names, such as in the port forwards page & apps such as nlbwmon
image

Is it possible to provide LuCI with a list of IP's and hostnames to fill this out? Of course it's more visual/quality of life than actually technical. I'm not using OpenWRT as a DHCP server, so I don't know if its a good idea to just sync /tmp/dhcp.leases with my DHCP server and hope it reads from there?

You could either place a dummy /tmp/dhcp.leases which is read by LuCI or provide name hints by populating a local /etc/ethers file.

Another alternative is configuring static leases (config host; option name whatever; option ip 1.2.3.4; option mac 02:00:11:22:33:44) in /etc/config/dhcp. LuCI will process these and consider them for the name hints, even if dnsmasq is not used.

To verify the results, you can call ubus call luci-rpc getHostHints on the cli.

2 Likes