Given two CIDR addresses say 192.168.2.0/14 and 192.168.2.0/32
How do I check if two ip addresses overlap in "python2.6"??
I have gone through netaddr and it allows to check if
192.168.2.0 is in CIDR address 192.168.2.0/14 by
from netaddr import IPNetwork, IPAddress
bool = IPAddress("192.168.2.0") in IPNetwork("192.168.2.0/14"):
But how to check for two CIDR address??
I found a reference :: How can I check if an ip is in a network in python
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…