首页 > 解决方案 > Formula for Supernetting the multiple blocks of IPv6 pools

问题描述

Can you pl guide me how i can calculate the Supernet from multiple blocks of IPv6 pools ?

For e.g. -

How to calculate the supernet pool of the following IPv6 blocks -

2407:9580::/32 2407:a2c0::/32 2407:a6c0::/32 2407:a800::/32 2407:b0c0::/32 2407:bc40::/32 2407:c800::/32 2407:d440::/32 2407:d600::/32 2407:d800::/32 2407:e600::/32 2407:f600::/32 2408::/22 2409:10::/28 2409:250::/28 240a::/25 240b::/26 240b:240::/26 240d::/27 240f::/24 240f:100::/24

标签: ipv6subnet

解决方案


  1. 将这些地址转换为 128 位无符号整数
  2. 异或前两个地址,所有相等的位导致零
  3. 从头开始计算零(=相同)位
  4. 任何先前的前缀长度和您当前的计数中的较小者是您的新前缀长度
  5. 获取起始地址(从步骤 2 开始)并将除前缀以外的所有位屏蔽为零
  6. 重复下一个地址

请注意,结果是包含所有列出的子网的最小超网 - 它可以很好地包含属于列出的子网的范围。


推荐阅读