Divide CIDR into smaller chunks of spefied length

I would like to divide up a CIDR block into smaller subnets.

For example if the CIDR block is, then I would like to spilt is up into multiple /8s. Here prefix length of /8 is a user input.

This needs to be similar to subnet method of netaddr module in Python

Do you mean this method?



For the record: the implementation of this method.

Thanks. Is there a Go equivalent of this available?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.