From e6781ea5cdc546eb9c6be45629ab305fc0187ba5 Mon Sep 17 00:00:00 2001 From: "Stephen McQuay (smcquay)" Date: Fri, 30 Mar 2018 09:57:37 -0700 Subject: [PATCH] Add readme --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ef3c61 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# 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](https://mcquay.me/cidr?go-get=1). + +## usage + +```bash +# 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 +```