cidr-tools
cidr-tools copied to clipboard
Feature Request : Split CIDR into evenvly sized chuncks
It would be a nice feature to be able to have a split function that would return an array of the CIDR chunks. It would be similar to expandCidr , but instead of expanding to individual IPs will expand to ranges
for example
splitCidr ("2001:db8::/32", "/37") would return an array of the /37 networks
Sounds useful, but no personal interest from me in implementing it. The API should have two return values: {splits: [...networks], remainders: [...networks]}. Also what may be useful is to also allow split to n networks e.g. accept a number argument.