Posts with the tag CIDR

Using the ipaddress module that comes with Python3.3+

from ipaddress import IPv4Network, IPv6Network

a = IPv4Network('192.168.0.0/24')
b = IPv4Network('192.168.1.0/24')
c = IPv4Network('127.0.0.1')

x = IPv6Network('2000::/64')
y = IPv6Network<span...

Read on