Show only alive wired clients?

When I do not know the IP address of a headless device which is connected via Ethernet, I tend to use the OpenWrt web interface to find the IP. But the problem is that Status -> Active DHCP Leases section seems to show devices that were connected a long time ago and no longer exist. I cannot guess how old it is by "Lease time remaining".

Is there a option or a different page to show only currently alive clients? If, by the nature of Ethernet, that is impossible to know, can I at least see the time when the client last sent any packet to the router (my guess is that most devices would send at least some packets to the router when they boot up and establish a network connection).

The other source of information would be the ARP table which maps MAC addresses to/from IP addresses. It won't be very satisfying on bridges unless the other device actually connects to the OpenWrt device. ip neigh and arp are two user commands for this.

Both the lease table and the ARP table are intended for "in the moment" action. Neither retain "old" information for long. You could script your own retention.

Another option, perhaps better, is to avoid the problem entirely by assigning a DHCP address reservation to the device(s).

1 Like

If things are added and removed from the network frequently, set a short lease time so unused leases drop out.

Using hostnames and local DNS can make it mostly unnecessary to look up IP addresses. If your devices don't send a unique hostname, you can add a host -- MAC reservation without assigning an IP address. When a device appears with that MAC, it will be registered under the name you set, with a dynamic IP.


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