ipv6 - 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
解决方案
- 将这些地址转换为 128 位无符号整数
- 异或前两个地址,所有相等的位导致零
- 从头开始计算零(=相同)位
- 任何先前的前缀长度和您当前的计数中的较小者是您的新前缀长度
- 获取起始地址(从步骤 2 开始)并将除前缀以外的所有位屏蔽为零
- 重复下一个地址
请注意,结果是包含所有列出的子网的最小超网 - 它可以很好地包含不属于列出的子网的范围。
推荐阅读
- haskell - 如何从 GHCI 中列出启用的语言扩展?
- asp.net-core - 为什么在 VS 2017 到 VS 2019 升级后,查询不能按数据库表中的计算列排序
- excel - 动态拉取 Excel 工作簿
- sql - 我需要查询以我的名字开头但不以该集合中的任何开头的孩子
- html - 如果来自美国,则隐藏 WooCommerce 商店通知
- r - 如何在 R 中测量图像中两个特征的距离?
- javascript - 为什么我的 fetch 请求返回整个网页(而不是 json)?
- java - 获取一天的总小时数
- node.js - 当我尝试在流星上运行 vulcan 时,如何解决此错误?它在体内给出
- c++ - 为什么 minhook 库目录不存在