Why 'queries' table doesn't have mac address column?

IMHO queries table must have the mac adress columns as the main identification of the device instead of client (IP)

While using DHCP we lose the capability of investigate the device (mac address) that did a given request as it stores the client in the queries table. Client could be IP x.x.x.x today and tomorrow can be another.

Shouldn't mac address be used instead as its the main device identification?

Can someone explain why its designed that why?

Are you using Pi-hole as the DHCP server, or another device on your network? If you are using Pi-hole, the DHCP is deterministic and will almost always keep the same IP assigned to the same client, even without reserved IP assignments.

See comment by DL6ER on this thread.

https://discourse.pi-hole.net/t/groups-and-dhcp/31901/5

1 Like

Thanks, I will read that
I'm using router DHCP. No IP reservation.

Notice from this admin/network.php screenshot that two different devices had the same IP. I can't trace back which device did a given query

image

So, after reading that, if mac address is not possible, one possible solution is using the timestamp while tracing back queries from a given.

Am I'm wrong?

Found this. I'll wait

Trying to trace requests back to MAC IDs is always going to be a workaround. The more reliable and controllable solution might be to ensure that your clients have consistent IP addresses. One way is to use Pi-hole as DHCP server. Not only will this likely keep the same address assigned to the same client, but it will also provide Pi-hole with the name of the client as well, which is easier than using an IP address to identify a client.

Another option is to reserve IP's for regular network clients. I find that this helps me manage my network more efficiently, as clients are stuck to the same address always. I reserve IPs for all regular network clients on the router. This lets me have consistent IP's for ssh connections, bookmarks, grouping of IP's by client type, etc. Even if you have quite a few network clients, you only have to set the reserved IP's one time and then you're done. Instead of seeing a MAC ID (which I can not easily correlate to a client), I see this consistently in all my Pi-holes:

image

For humans, names are much easier to remember than long strings of numbers, thus the entire concept of domain names instead of IP addresses in browsers.

1 Like