No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Stephen McQuay 7bb97c0b39
updated usage
6 months ago
LICENSE Initial commit 6 months ago
README.md Add readme 6 months ago
cidr.go check ranges bi-directionally 6 months ago
cidr_test.go Just copy code 6 months ago
main.go updated usage 6 months ago
wrangling.go Just copy code 6 months ago

README.md

cidr

This tool reports ip address ranges for a collection of CIDRs, and then reports if there is any overlap.

The official package name is mcquay.me/cidr.

usage

# prints range
$ cidr 10.0.0.0/24
10.0.0.0         10.0.0.255              256

# range plus no error for overlap:
$ cidr 10.0.0.0/24 10.0.2.0/24
10.0.0.0         10.0.0.255              256
10.0.2.0         10.0.2.255              256

# error on overlap
$ cidr 10.0.0.0/24 10.0.0.5/32
10.0.0.0         10.0.0.255              256
10.0.0.5         10.0.0.5                  1
overlaping networks: 10.0.0.5/32 overlaps with 10.0.0.0/24
$ cidr 10.0.1.0/24 10.0.0.0/16
10.0.1.0         10.0.1.255              256
10.0.0.0         10.0.255.255          65536
overlaping networks: 10.0.1.0/24 overlaps with 10.0.0.0/16