# Subnetting is not working with most relevant entry

**URL:** https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482
**Category:** Beta 5.0
**Created:** [May 3, 2020, 6:28am UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482 "2020-05-03T06:28:27Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![PromoFaux](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/promofaux/32/1545_2.png) [@PromoFaux](https://discourse.pi-hole.net/u/PromoFaux)
#### Post date: [May 12, 2020, 7:59pm UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/21 "2020-05-12T19:59:02Z")

</div>

> [@yubiuser](#):
>
> The only thing that r[emains brocken is this HEAD\>\>\>\> MASTER seen on API/Web\_Interface.](https://github.com/pi-hole/AdminLTE/pull/1266#issuecomment-627257850)

I've just checked out that branch and I see it too. It must be in the code from a merge gone wrong.. investigating...

---

<div class="post-metadata">

### Author: ![PromoFaux](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/promofaux/32/1545_2.png) [@PromoFaux](https://discourse.pi-hole.net/u/PromoFaux)
#### Post date: [May 12, 2020, 8:06pm UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/22 "2020-05-12T20:06:58Z")

</div>

Found the conflict and pushed a resolved version. Try an update on that branch please and confirm that the extraneous characters are gone.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [May 12, 2020, 8:08pm UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/23 "2020-05-12T20:08:38Z")

</div>

Can confirm it is gone.

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [June 5, 2020, 1:00pm UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/24 "2020-06-05T13:00:14Z")

</div>



---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 9, 2020, 4:09pm UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/25 "2020-06-09T16:09:04Z")

</div>

While playing with subnet assignment I came across the fact that there is no output to which groups a client belongs if different (non-identical) subnets are defined.  
I created "subnet clients" /16 and /24 and assigned different groups to them. Connecting a device in **both** ranges, only the /24 should apply. But there is no indication (on cli and web interface) to which group the client was assigned in the end.

```auto
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 17:57:29.578 3137] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 17:57:29.579 3137] Querying gravity database for client 10.0.10.136 (getting groups)

```

It would be helpful if something like this would be added

```auto
Client 10.0.10.136 matched two different subnets (Client ID 3,4). Choosing the maximum match (Client ID 3) and assigned corresponding Group IDs (7,8)"

```

**EDIT**  
I switched to new/mac\_clients and saw that it is already implemented.

```auto
[2020-06-09 19:23:23.446 7022] Querying gravity database for client with IP 10.0.10.136...
[2020-06-09 19:23:23.446 7022] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-09 19:23:23.446 7022] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.136 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.136 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] SQL: Comparing 10.0.10.136 vs. 10.0.10.136 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-09 19:23:23.447 7022] --> Found record for 10.0.10.136 in the client (ID 6)
[2020-06-09 19:23:23.447 7022] Querying gravity database for client 10.0.10.136 (getting groups)
[2020-06-09 19:23:23.447 7022] Gravity database: Client 10.0.10.136 found. Using groups [7].

```

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [June 10, 2020, 9:43am UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/26 "2020-06-10T09:43:13Z")

</div>

Also this (scroll down if your browser doesn't do it for you):  
[https://github.com/pi-hole/FTL/pull/756/files#diff-a18617195ac72aca8f3967d4b6a6eff9R179-R183](https://github.com/pi-hole/FTL/pull/756/files#diff-a18617195ac72aca8f3967d4b6a6eff9R179-R183)

This should be a clear warning (I don't see it your log excerpt?).

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 10, 2020, 11:49am UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/27 "2020-06-10T11:49:43Z")

</div>

That does work as expected and trigger warinings. But it does just work for **identical** subnets. It does not warn (no reason for warning, just a indication of group assignment wanted) for subets that are within a bigger subnet.

Sub1: 10.0.1.0/16 - Test 2  
Sub2 10.0.10.0/24 - Test 1

 ![Bildschirmfoto zu 2020-06-10 13-46-07](https://discourse.pi-hole.net/uploads/default/original/3X/9/b/9b77affe61a43a748d781c6b70195d93f524b090.png)

Which Group will be assigned to Client: 10.0.10.136 (best match would be /24 - Test 1)? And where can I see which groups have been assigned at the end?

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [June 13, 2020, 6:57am UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/28 "2020-06-13T06:57:15Z")

</div>

> [@yubiuser](#):
>
> it does just work for **identical** subnets

Ah, yes, sorry, I missed that above.

> [@yubiuser](#):
>
> Which Group will be assigned to Client: 10.0.10.136 (best match would be /24 - Test 1)? And where can I see which groups have been assigned at the end?

The best match will be assigned. Warnings are only generated when the best match is ambiguous (like `10.0.1.0/16` and `10.0.2.0/16` (which is the same thing).

> [@yubiuser](#):
>
> And where can I see which groups have been assigned at the end?

When enabling the appropriate debug flag (`DEBUG_DATABASE` in v5.0, and a dedicated `DEBUG_CLIENTS` in the next version, v5.1), you can get this from the log just as you posted above:

> [@yubiuser](#):
>
> ```auto
> [2020-06-09 19:23:23.447 7022] --> Found record for 10.0.10.136 in the client (ID 6)
> [2020-06-09 19:23:23.447 7022] Querying gravity database for client 10.0.10.136 (getting groups)
> [2020-06-09 19:23:23.447 7022] Gravity database: Client 10.0.10.136 found. Using groups [7].
> 
> ```

where `[7]` is an array of all group IDs enabled for this client. There is no per-name/description output here.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 13, 2020, 7:42am UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/29 "2020-06-13T07:42:24Z")

</div>

> [@DL6ER](#):
>
> When enabling the appropriate debug flag ( `DEBUG_DATABASE` in v5.0, and a dedicated `DEBUG_CLIENTS` in the next version, v5.1)

Please check again.  
I'm on

```auto
  Pi-hole version is development v5.0-86-g4b59287 (Latest: v5.0)
  AdminLTE version is devel v5.0-387-g557bd858 (Latest: v5.0)
  FTL version is development vDev-6c32fb8 (Latest: v5.0)

```

`DEBUG_CLIENTS`

```auto
[2020-06-13 09:09:15.930 6806] Using log file /var/log/pihole-FTL.log
[2020-06-13 09:09:15.930 6806] ########## FTL started! ##########
[2020-06-13 09:09:15.930 6806] FTL branch: development
[2020-06-13 09:09:15.930 6806] FTL version: vDev-6c32fb8
[2020-06-13 09:09:15.930 6806] FTL commit: 6c32fb8
[2020-06-13 09:09:15.930 6806] FTL date: 2020-06-04 15:39:51 +0200
[2020-06-13 09:09:15.930 6806] FTL user: pihole
[2020-06-13 09:09:15.930 6806] Compiled for aarch64 (compiled on CI) using aarch64-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516
[2020-06-13 09:09:15.930 6806] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2020-06-13 09:09:15.930 6806] SOCKET_LISTENING: only local
[2020-06-13 09:09:15.930 6806] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2020-06-13 09:09:15.930 6806] MAXDBDAYS: max age for stored queries is 90 days
[2020-06-13 09:09:15.930 6806] RESOLVE_IPV6: Resolve IPv6 addresses
[2020-06-13 09:09:15.930 6806] RESOLVE_IPV4: Resolve IPv4 addresses
[2020-06-13 09:09:15.931 6806] DBINTERVAL: saving to DB file every minute
[2020-06-13 09:09:15.931 6806] DBFILE: Using /etc/pihole/pihole-FTL.db
[2020-06-13 09:09:15.931 6806] MAXLOGAGE: Importing up to 24.0 hours of log data
[2020-06-13 09:09:15.931 6806] PRIVACYLEVEL: Set to 0
[2020-06-13 09:09:15.931 6806] IGNORE_LOCALHOST: Show queries from localhost
[2020-06-13 09:09:15.931 6806] BLOCKINGMODE: Null IPs for blocked domains
[2020-06-13 09:09:15.931 6806] ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2020-06-13 09:09:15.931 6806] DBIMPORT: Importing history from database
[2020-06-13 09:09:15.931 6806] PIDFILE: Using /run/pihole-FTL.pid
[2020-06-13 09:09:15.931 6806] PORTFILE: Using /run/pihole-FTL.port
[2020-06-13 09:09:15.931 6806] SOCKETFILE: Using /run/pihole/FTL.sock
[2020-06-13 09:09:15.931 6806] SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2020-06-13 09:09:15.931 6806] MACVENDORDB: Using /etc/pihole/macvendor.db
[2020-06-13 09:09:15.931 6806] GRAVITYDB: Using /etc/pihole/gravity.db
[2020-06-13 09:09:15.931 6806] PARSE_ARP_CACHE: Active
[2020-06-13 09:09:15.932 6806] CNAME_DEEP_INSPECT: Active
[2020-06-13 09:09:15.932 6806] DELAY_STARTUP: No delay requested.
[2020-06-13 09:09:15.932 6806] NICE: Set process niceness to -10 (default)
[2020-06-13 09:09:15.932 6806] BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
[2020-06-13 09:09:15.932 6806] NAMES_FROM_NETDB: Enabled, trying to get names from network database
[2020-06-13 09:09:15.932 6806] Finished config file parsing
[2020-06-13 09:09:15.934 6806] Database version is 6
[2020-06-13 09:09:15.934 6806] Database successfully initialized
[2020-06-13 09:09:15.935 6806] New upstream server: 127.0.0.1 (0/128)
[2020-06-13 09:09:15.951 6806] Resizing "/FTL-strings" from 4096 to 8192
[2020-06-13 09:09:15.970 6806] Resizing "/FTL-strings" from 8192 to 12288
[2020-06-13 09:09:15.973 6806] Resizing "/FTL-queries" from 262144 to 524288
[2020-06-13 09:09:15.990 6806] Resizing "/FTL-strings" from 12288 to 16384
[2020-06-13 09:09:16.020 6806] Resizing "/FTL-strings" from 16384 to 20480
[2020-06-13 09:09:16.036 6806] Resizing "/FTL-queries" from 524288 to 786432
[2020-06-13 09:09:16.084 6806] Resizing "/FTL-queries" from 786432 to 1048576
[2020-06-13 09:09:16.109 6806] Imported 13686 queries from the long-term database
[2020-06-13 09:09:16.110 6806] -> Total DNS queries: 13686
[2020-06-13 09:09:16.110 6806] -> Cached DNS queries: 5218
[2020-06-13 09:09:16.110 6806] -> Forwarded DNS queries: 7267
[2020-06-13 09:09:16.110 6806] -> Blocked DNS queries: 1201
[2020-06-13 09:09:16.110 6806] -> Unknown DNS queries: 0
[2020-06-13 09:09:16.110 6806] -> Unique domains: 944
[2020-06-13 09:09:16.110 6806] -> Unique clients: 12
[2020-06-13 09:09:16.110 6806] -> Known forward destinations: 1
[2020-06-13 09:09:16.110 6806] Successfully accessed setupVars.conf
[2020-06-13 09:09:16.118 6808] PID of FTL process: 6808
[2020-06-13 09:09:16.118 6808] Listening on port 4711 for incoming IPv4 telnet connections
[2020-06-13 09:09:16.119 6808] Listening on port 4711 for incoming IPv6 telnet connections
[2020-06-13 09:09:16.119 6808] Listening on Unix socket
[2020-06-13 09:09:16.122 6808] Reloading DNS cache
[2020-06-13 09:09:16.122 6808] Blocking status is enabled
[2020-06-13 09:09:16.158 6808] Compiled 1 whitelist and 25 blacklist regex filters in 23.2 msec

```

`DEBUG_DATABASE`

```auto
[2020-06-13 09:10:13.714 6923] Using log file /var/log/pihole-FTL.log
[2020-06-13 09:10:13.715 6923] ########## FTL started! ##########
[2020-06-13 09:10:13.715 6923] FTL branch: development
[2020-06-13 09:10:13.715 6923] FTL version: vDev-6c32fb8
[2020-06-13 09:10:13.715 6923] FTL commit: 6c32fb8
[2020-06-13 09:10:13.715 6923] FTL date: 2020-06-04 15:39:51 +0200
[2020-06-13 09:10:13.715 6923] FTL user: pihole
[2020-06-13 09:10:13.715 6923] Compiled for aarch64 (compiled on CI) using aarch64-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516
[2020-06-13 09:10:13.715 6923] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2020-06-13 09:10:13.715 6923] SOCKET_LISTENING: only local
[2020-06-13 09:10:13.715 6923] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2020-06-13 09:10:13.715 6923] MAXDBDAYS: max age for stored queries is 90 days
[2020-06-13 09:10:13.715 6923] RESOLVE_IPV6: Resolve IPv6 addresses
[2020-06-13 09:10:13.715 6923] RESOLVE_IPV4: Resolve IPv4 addresses
[2020-06-13 09:10:13.715 6923] DBINTERVAL: saving to DB file every minute
[2020-06-13 09:10:13.715 6923] DBFILE: Using /etc/pihole/pihole-FTL.db
[2020-06-13 09:10:13.716 6923] MAXLOGAGE: Importing up to 24.0 hours of log data
[2020-06-13 09:10:13.716 6923] PRIVACYLEVEL: Set to 0
[2020-06-13 09:10:13.716 6923] IGNORE_LOCALHOST: Show queries from localhost
[2020-06-13 09:10:13.716 6923] BLOCKINGMODE: Null IPs for blocked domains
[2020-06-13 09:10:13.716 6923] ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2020-06-13 09:10:13.716 6923] DBIMPORT: Importing history from database
[2020-06-13 09:10:13.716 6923] PIDFILE: Using /run/pihole-FTL.pid
[2020-06-13 09:10:13.716 6923] PORTFILE: Using /run/pihole-FTL.port
[2020-06-13 09:10:13.716 6923] SOCKETFILE: Using /run/pihole/FTL.sock
[2020-06-13 09:10:13.716 6923] SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2020-06-13 09:10:13.716 6923] MACVENDORDB: Using /etc/pihole/macvendor.db
[2020-06-13 09:10:13.716 6923] GRAVITYDB: Using /etc/pihole/gravity.db
[2020-06-13 09:10:13.716 6923] PARSE_ARP_CACHE: Active
[2020-06-13 09:10:13.716 6923] CNAME_DEEP_INSPECT: Active
[2020-06-13 09:10:13.716 6923] DELAY_STARTUP: No delay requested.
[2020-06-13 09:10:13.716 6923] NICE: Set process niceness to -10 (default)
[2020-06-13 09:10:13.717 6923] BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
[2020-06-13 09:10:13.717 6923] NAMES_FROM_NETDB: Enabled, trying to get names from network database
[2020-06-13 09:10:13.717 6923] *****************************
[2020-06-13 09:10:13.717 6923] * Debugging enabled *
[2020-06-13 09:10:13.717 6923] * DEBUG_DATABASE YES *
[2020-06-13 09:10:13.717 6923] * DEBUG_NETWORKING NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_LOCKS NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_QUERIES NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_FLAGS NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_SHMEM NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_GC NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_ARP NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_REGEX NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_API NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_OVERTIME NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_EXTBLOCKED NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_CAPS NO *
[2020-06-13 09:10:13.717 6923] * DEBUG_DNSMASQ_LINES NO *
[2020-06-13 09:10:13.718 6923] * DEBUG_VECTORS NO *
[2020-06-13 09:10:13.718 6923] * DEBUG_RESOLVER NO *
[2020-06-13 09:10:13.718 6923] *****************************
[2020-06-13 09:10:13.718 6923] Finished config file parsing
[2020-06-13 09:10:13.719 6923] dbquery: "SELECT VALUE FROM ftl WHERE id = 0;"
[2020-06-13 09:10:13.721 6923] ---> Result 6 (int)
[2020-06-13 09:10:13.722 6923] Database version is 6
[2020-06-13 09:10:13.722 6923] Database successfully initialized
[2020-06-13 09:10:13.722 6923] DB_read_queries(): "SELECT * FROM queries WHERE timestamp >= 1591945813"
[2020-06-13 09:10:13.722 6923] New upstream server: 127.0.0.1 (0/128)
[2020-06-13 09:10:13.737 6923] Resizing "/FTL-strings" from 4096 to 8192
[2020-06-13 09:10:13.756 6923] Resizing "/FTL-strings" from 8192 to 12288
[2020-06-13 09:10:13.759 6923] Resizing "/FTL-queries" from 262144 to 524288
[2020-06-13 09:10:13.775 6923] Resizing "/FTL-strings" from 12288 to 16384
[2020-06-13 09:10:13.805 6923] Resizing "/FTL-strings" from 16384 to 20480
[2020-06-13 09:10:13.821 6923] Resizing "/FTL-queries" from 524288 to 786432
[2020-06-13 09:10:13.868 6923] Resizing "/FTL-queries" from 786432 to 1048576
[2020-06-13 09:10:13.893 6923] Imported 13690 queries from the long-term database
[2020-06-13 09:10:13.894 6923] -> Total DNS queries: 13690
[2020-06-13 09:10:13.894 6923] -> Cached DNS queries: 5225
[2020-06-13 09:10:13.894 6923] -> Forwarded DNS queries: 7264
[2020-06-13 09:10:13.894 6923] -> Blocked DNS queries: 1201
[2020-06-13 09:10:13.894 6923] -> Unknown DNS queries: 0
[2020-06-13 09:10:13.894 6923] -> Unique domains: 944
[2020-06-13 09:10:13.894 6923] -> Unique clients: 12
[2020-06-13 09:10:13.894 6923] -> Known forward destinations: 1
[2020-06-13 09:10:13.894 6923] Successfully accessed setupVars.conf
[2020-06-13 09:10:13.894 6923] DEBUG: argv[0] = ""
[2020-06-13 09:10:13.894 6923] DEBUG: argv[1] = "-k"
[2020-06-13 09:10:13.909 6925] PID of FTL process: 6925
[2020-06-13 09:10:13.912 6925] Listening on port 4711 for incoming IPv4 telnet connections
[2020-06-13 09:10:13.913 6925] Listening on port 4711 for incoming IPv6 telnet connections
[2020-06-13 09:10:13.913 6925] Listening on Unix socket
[2020-06-13 09:10:13.915 6925] Reloading DNS cache
[2020-06-13 09:10:13.915 6925] Blocking status is enabled
[2020-06-13 09:10:13.916 6925] *****************************
[2020-06-13 09:10:13.916 6925] * Debugging enabled *
[2020-06-13 09:10:13.916 6925] * DEBUG_DATABASE YES *
[2020-06-13 09:10:13.916 6925] * DEBUG_NETWORKING NO *
[2020-06-13 09:10:13.916 6925] * DEBUG_LOCKS NO *
[2020-06-13 09:10:13.916 6925] * DEBUG_QUERIES NO *
[2020-06-13 09:10:13.916 6925] * DEBUG_FLAGS NO *
[2020-06-13 09:10:13.916 6925] * DEBUG_SHMEM NO *
[2020-06-13 09:10:13.916 6925] * DEBUG_GC NO *
[2020-06-13 09:10:13.916 6925] * DEBUG_ARP NO *
[2020-06-13 09:10:13.916 6925] * DEBUG_REGEX NO *
[2020-06-13 09:10:13.916 6925] * DEBUG_API NO *
[2020-06-13 09:10:13.917 6925] * DEBUG_OVERTIME NO *
[2020-06-13 09:10:13.917 6925] * DEBUG_EXTBLOCKED NO *
[2020-06-13 09:10:13.917 6925] * DEBUG_CAPS NO *
[2020-06-13 09:10:13.917 6925] * DEBUG_DNSMASQ_LINES NO *
[2020-06-13 09:10:13.917 6925] * DEBUG_VECTORS NO *
[2020-06-13 09:10:13.917 6925] * DEBUG_RESOLVER NO *
[2020-06-13 09:10:13.917 6925] *****************************
[2020-06-13 09:10:13.917 6925] dbquery: "DELETE FROM message;"
[2020-06-13 09:10:13.956 6925] ---> OK
[2020-06-13 09:10:13.956 6925] gravityDB_open(): Trying to open /etc/pihole/gravity.db in read-only mode
[2020-06-13 09:10:13.957 6925] gravityDB_open(): Setting location for temporary object to MEMORY
[2020-06-13 09:10:13.957 6925] gravityDB_open(): Preparing audit query
[2020-06-13 09:10:13.960 6925] gravityDB_open(): Setting busy timeout to 1000
[2020-06-13 09:10:13.960 6925] gravityDB_open(): Setting busy timeout to zero
[2020-06-13 09:10:13.960 6925] gravityDB_open(): Successfully opened gravity.db
[2020-06-13 09:10:13.960 6925] Querying count of distinct domains in gravity database table vw_gravity
[2020-06-13 09:10:13.961 6925] Querying count of distinct domains in gravity database table vw_regex_blacklist
[2020-06-13 09:10:13.967 6925] Querying count of distinct domains in gravity database table vw_regex_whitelist
[2020-06-13 09:10:13.969 6925] Querying gravity database for client 10.0.10.136 (getting best match)
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.970 6925] SQL: Comparing 10.0.10.136 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.971 6925] Querying gravity database for client 10.0.10.136 (getting groups)
[2020-06-13 09:10:13.974 6925] Querying gravity database for client 10.0.99.192 (getting best match)
[2020-06-13 09:10:13.975 6925] SQL: Comparing 10.0.99.192 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.975 6925] SQL: Comparing 10.0.99.192 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.975 6925] SQL: Comparing 10.0.99.192 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.975 6925] SQL: Comparing 10.0.99.192 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.975 6925] Querying gravity database for client 10.0.99.192 (getting groups)
[2020-06-13 09:10:13.976 6925] Querying gravity database for client 10.0.1.1 (getting best match)
[2020-06-13 09:10:13.977 6925] SQL: Comparing 10.0.1.1 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.977 6925] SQL: Comparing 10.0.1.1 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.977 6925] SQL: Comparing 10.0.1.1 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.977 6925] SQL: Comparing 10.0.1.1 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.977 6925] Querying gravity database for client 10.0.1.1 (getting groups)
[2020-06-13 09:10:13.977 6925] Querying gravity database for client 10.0.99.33 (getting best match)
[2020-06-13 09:10:13.978 6925] SQL: Comparing 10.0.99.33 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.978 6925] SQL: Comparing 10.0.99.33 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.978 6925] SQL: Comparing 10.0.99.33 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.978 6925] SQL: Comparing 10.0.99.33 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.978 6925] Querying gravity database for client 10.0.99.33 (getting groups)
[2020-06-13 09:10:13.978 6925] Querying gravity database for client 10.0.10.64 (getting best match)
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] SQL: Comparing 10.0.10.64 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.979 6925] Querying gravity database for client 10.0.10.64 (getting groups)
[2020-06-13 09:10:13.980 6925] Querying gravity database for client 10.0.40.3 (getting best match)
[2020-06-13 09:10:13.980 6925] SQL: Comparing 10.0.40.3 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.980 6925] SQL: Comparing 10.0.40.3 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.980 6925] SQL: Comparing 10.0.40.3 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.980 6925] SQL: Comparing 10.0.40.3 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.980 6925] Querying gravity database for client 10.0.40.3 (getting groups)
[2020-06-13 09:10:13.981 6925] Querying gravity database for client 10.0.1.2 (getting best match)
[2020-06-13 09:10:13.981 6925] SQL: Comparing 10.0.1.2 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.981 6925] SQL: Comparing 10.0.1.2 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.981 6925] SQL: Comparing 10.0.1.2 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.981 6925] SQL: Comparing 10.0.1.2 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.981 6925] Querying gravity database for client 10.0.1.2 (getting groups)
[2020-06-13 09:10:13.982 6925] Querying gravity database for client 10.0.10.190 (getting best match)
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] SQL: Comparing 10.0.10.190 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.982 6925] Querying gravity database for client 10.0.10.190 (getting groups)
[2020-06-13 09:10:13.983 6925] Querying gravity database for client 127.0.0.1 (getting best match)
[2020-06-13 09:10:13.983 6925] SQL: Comparing 127.0.0.1 vs. 10.0.1.0/16 (subnet 255.255.0.0) - NO MATCH
[2020-06-13 09:10:13.983 6925] SQL: Comparing 127.0.0.1 vs. 10.0.10.1/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-13 09:10:13.984 6925] Querying gravity database for client 10.0.10.6 (getting best match)
[2020-06-13 09:10:13.984 6925] SQL: Comparing 10.0.10.6 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.984 6925] SQL: Comparing 10.0.10.6 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.984 6925] SQL: Comparing 10.0.10.6 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.984 6925] SQL: Comparing 10.0.10.6 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.985 6925] SQL: Comparing 10.0.10.6 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.985 6925] Querying gravity database for client 10.0.10.6 (getting groups)
[2020-06-13 09:10:13.985 6925] Querying gravity database for client 10.0.10.84 (getting best match)
[2020-06-13 09:10:13.985 6925] SQL: Comparing 10.0.10.84 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.985 6925] SQL: Comparing 10.0.10.84 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.986 6925] SQL: Comparing 10.0.10.84 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.986 6925] SQL: Comparing 10.0.10.84 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.986 6925] SQL: Comparing 10.0.10.84 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.986 6925] Querying gravity database for client 10.0.10.84 (getting groups)
[2020-06-13 09:10:13.986 6925] Querying gravity database for client 10.0.10.182 (getting best match)
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.1.0/16 (subnet 255.255.0.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] SQL: Comparing 10.0.10.182 vs. 10.0.10.1/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-13 09:10:13.987 6925] Querying gravity database for client 10.0.10.182 (getting groups)
[2020-06-13 09:10:13.987 6925] Compiled 1 whitelist and 25 blacklist regex filters in 26.7 msec

```

I think the verbose output and `DEBUG_CLIENTS` were introduced with this commit and are only availabe in **new/mac\_clients** and will like be not part of 5.1.

> <https://github.com/pi-hole/FTL/pull/762/commits/9dd8ed705e4b54c9921ff39d79a9efb9c38204b9>
>
> Signed-off-by: DL6ER \<dl6er@dl6er.de\>

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [June 14, 2020, 4:19pm UTC](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482/30 "2020-06-14T16:19:42Z")

</div>

You are right, I missed that. The more verbose output will come with Pi-hole v5.2 in this case.

[Previous page](https://discourse.pi-hole.net/t/subnetting-is-not-working-with-most-relevant-entry/31482.md?page=1)
