Adding and removing set elements:
s1 = IPSet()
s1.add('192.0.2.0')
IPSet(['192.0.2.0/32'])
Here is a simple arbitrary IP address range:
iprange = IPRange('192.0.1.255', '192.0.2.16')
We can see the CIDR networks that can existing with this defined range:
iprange.cidrs()
[IPNetwork('192.0.1.255/32')
IPNetwork('192.0.2.0/28')
IPNetwork('192.0.2.16/32')]
相关问题 更多 >
编程相关推荐