Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries link local IP to wrong computer #5650

Open
hrafnkel opened this issue May 7, 2024 · 5 comments
Open

Queries link local IP to wrong computer #5650

hrafnkel opened this issue May 7, 2024 · 5 comments

Comments

@hrafnkel
Copy link

hrafnkel commented May 7, 2024

Versions

  • Pi-hole: 5.18.2
  • AdminLTE:
  • FTL: 5.25.1
  • Web version: 5.21

Platform

  • OS and version: Debian Bullseye, kernel 6.1.21-V8+
  • Platform: Raspberry Pi 3 Model B Plus Rev 1.3

Expected behaviour

When I select Recent Queries by clicking on the Bar Graph for a particular 10 mins period of the 24 hour history
I expect the report to show the activity of the client(s)

Actual behaviour / bug

When I select Recent Queries by clicking on the Bar Graph for a particular 10 mins period of the 24 hour history
The report to shows the activity of the wrong client, e.g. PC1 is associated with PC2's activity

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to home/dashboard screen
  2. Click on any 10 min bar in the 24 hr history
  3. Scroll down or page forward (if there are many results)
  4. Inspect the results for mistakes

Debug Token

N/A

Screenshots

Two screen shots are added.
PiHole-1
PiHole-2

Additional context

The device "FX6300" was not switched-on on 06-May-2024. The lookups for Evernote and The Times were performed by another device.

All devices in the range 192.168.0.10 to 192.168.0.150 inclusive are given their IP4 address by PiHole DCHP.

IP6 is OFF.

PiHole host up time is 89 days.

@rdwebdesign
Copy link
Member

All devices in the range 192.168.0.10 to 192.168.0.150 inclusive are given their IP4 address by PiHole DCHP.

Did you set static leases for these 2 machines?

If you didn't, IPs are not guaranteed to remain the same.

@hrafnkel
Copy link
Author

hrafnkel commented May 8, 2024 via email

@rdwebdesign
Copy link
Member

They do not have static addresses.

Then it's not possible to assume a device will always keep the same IP.

The database stores the query using the IP.
The database has the association between hostnames and IP, but this will vary from time to time.
The result is: the same hostname will possibly be linked to more than one IP (and each IP can be used by more than one device).

What do you see in Tools > Network page?

@hrafnkel
Copy link
Author

hrafnkel commented May 9, 2024

Added screen capture of Tools > Network.

I understand your comment about IP re-assignment, but I don't really see why the association record in the database doesn't contain a timestamp. I realise that you aren't using SQLServer System-Versioned Temporal Tables (and they really are quite useful if you haven't seen them) but I'd have thought that a timestamp would do the trick. Meanwhile I'll make some of my devices static.

PiHole-3

@hrafnkel
Copy link
Author

I have since made some devices static at addresses above 192.168.0.150, updated PiHole, updated and rebooted the hosting Pi, flushed the logs and as this screen grab shows it is still remembering the old addresses.
PiHole-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants