Skip to content

Unable to create IPv6 larger pool with subnet after creating smaller one #20

Description

@saket141288

Hi,

I am getting issue in creating IPv6Address Pool creation when ever i am going to create bigger pool after creating the smaller pools. For example:

i have one parent with value "2010:8892::/20" and if i am go on creating child as "2010:8892::/48","2010:8892:1::/48" and "2010:8892:2::/56" thats fine,that value is getting out of my code only.

This is my code snippet:
final IPv6AddressPool pool = IPv6AddressPool.fromRangeAndSubnet(IPv6AddressRange.fromFirstAndLast(IPv6Address.fromString(hexToIPv6Conversion(valueFrom)),
IPv6Address.fromString(hexToIPv6Conversion(valueTo))),
IPv6NetworkMask.fromPrefixLength(ipSubnetMask));
Iterator iterNtwrk = pool.freeNetworks().iterator();

But after that again if i want to create any child pool with subnet value "/48" for eg:"2010:8892:3::/48", this code is not allowing that is giving exception as "Given range is not aligned with prefix length [48], first address should end with 80 zero bits"

Is there any issue with my implementation or any other code i should use? Please suggest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions