Last active
February 13, 2019 20:39
-
-
Save jayers99/b87941d8b9e31fa5fcd57300f34a0b82 to your computer and use it in GitHub Desktop.
python network calculator fun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Is this network contained in this other network | |
import ipaddress | |
rule = ipaddress.IPv4Network('10.19.252.0/24') | |
net = ipaddress.IPv4Network('10.19.252.16/29') | |
rule.overlaps(net) | |
net = ipaddress.IPv4Network('10.19.253.16/29') | |
rule.overlaps(net) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment