【发布时间】:2020-06-07 03:00:06
【问题描述】:
我正在研究 RIPE 委派统计数据
文件中每一行的格式如下:
registry|cc|type|start|value|date|status[|extensions...]
start 和 value 的含义如下:
start: This is the IPv4 'first address' of the range.
value: In the case of IPv4 address the count of hosts for this range. This count does not have to represent a CIDR range.
开始和值的例子:
196.4.163.0|768
41.74.0.0|4096
195.35.104.64|192
198.54.38.0|1536
216.252.155.0|256
141.226.144.0|10240
93.242.1.0|20224
193.53.200.0|11520
我如何知道最终使用哪个 IP?
非常感谢!
--- 更新----
我想出了如何解决这个问题。
将第一个 IP 转换为十进制数,然后将值添加到它,然后转换回 ip
【问题讨论】:
-
许多地址范围无法转换为 CIDR 表示法。只有网络大小为 2^n 并且从它的倍数开始。
标签: python ipv4 delegation