I have mysql table called ip_address
with column called ip
and it contains following data
192.168.1.52 192.168.1.7 192.168.1.21 192.168.1.107 . . .
my problem is how to get the available IP address from the subnet, I mean this subnet must contain the range from 192.168.1.1 to 192.168.1.255 but not all IPs were stored, so i managed to sort them by:
SELECT ip FROM ip_address ORDER BY INET_ATON(ip)
I want to retrieve all IPs which are not found in ip_address table from that range.