Classless Inter-Domain Routing (CIDR) is a notation that defines a subnet (ip net range)
It is an integer that specifies the number of significant bits in the mask.
CIDR notation:
IP Address/prefix
where:
0.0.0.0/0
where:
x.x.x.x/32
where the routing prefix 32 means that there is only one host on this network.
Example:
143.176.206.82/32
In a whois request, you can see the CIDR back.
Example:
whois 172.70.250.60
NetRange: 172.64.0.0 - 172.71.255.255
CIDR: 172.64.0.0/13
In Postgress from numeric IP with inet_merge
SELECT
inet_merge(
'0.0.0.0'::inet + ip_from,
'0.0.0.0'::inet + ip_to
)
from ip where ctry = 'NL';