Ja, ist möglich. Einfach wie oben beschrieben als CIDR eingeben.
pi-hole:release/v5.0
← pi-hole:new/CIDR_clients
opened 05:49PM - 04 Mar 20 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have re… ad and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).
- [X] I have checked that [another pull request](https://github.com/pi-hole/FTL/pulls) for this purpose does not exist.
- [X] I have considered, and confirmed that this submission will be valuable to others.
- [X] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
- [X] I give this submission freely, and claim no ownership to its content.
**How familiar are you with the codebase?:**
## 10
---
This PR implements subnet support for clients. Previously, only exact client / group associations have been possible, like `192.168.0.1`. This PR allows for arbitrarily complex subnet configurations using the widely known [Classless Inter-Domain Routing (CIDR) notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_blocks).
This allows users to specify "broad clients" such as
- `192.168.1.0/24` which will match al clients in the range `192.168.1.1` to `192.168.1.255` (256 devices),
- `10.8.0.0/16` will match all clients in the range `10.8.0.1` to `10.8.255.255` (65,536 devices),
- `192.168.100.0/22` represents the 1024 IPv4 addresses from `192.168.100.0` to `192.168.103.255`.
This implementation is IPv6-aware and can be used for IPv6 subnets as well, such as the IPv6 block `2001:db8::/48` representing the block of IPv6 addresses from `2001:db8:0:0:0:0:0:0` to `2001:db8:0:ffff:ffff:ffff:ffff:ffff` (1,208,925,819,614,629,174,706,176 devices).
Our implementation is more generic than what is written on the linked Wikipedia article as you can use *any* CIDR block (not only multiples of 4).
Beachte bitte folgenden Topic, dass es zur Zeit noch "Probleme" gibt, wenn du Subnetze und einzelne Clients aus diesen Subnetzen definierst. In v5.1 wird dann immer der am best-passendste Eintrag genommen (also /32 statt /24).
Problem with Beta 5.0:
I have added a subnet entry for a /24 network and assigned it to group id 1.
Also I have added a native Client IP-Address with /32 and assigned it to group id 0 and group id 2.
The client will get the group id 1.
The same behavior when adding the client with the dropdown menu.
As I saw, in the selection from the database the first matching record is taken.
See line 278-279 in get_client_groupids (gravitiy-db.c). The Select is limited to 1.
Maybe there must be evalua…