I have a requirement to make an app in Java which will manage IPv4 (or in future IPv6 too). The users will be managing their range of IP addresses, supernets and subnets (creating/deleting etc) in that app. I have a few questions about the architecture.
What is the best format to store/search IPv4 and it's prefix in DB2 (considering I will be accessing them through Java)?
They will also be using private IP address range too, e.g. 10.0.0.0/8, which creates 16777214 IP addresses. Out of these they will be using only 0.1% IPs when they try to create this network. How should I define this in DB? Should I create 16 million rows representing each IP or should I only create used IPs in DB?
I will be using DB2 10.5 with Java 1.6.