1
0
mirror of https://github.com/smcquay/cidr/ synced 2024-12-04 13:49:35 -08:00

Add readme

This commit is contained in:
Stephen McQuay 2018-03-30 09:57:37 -07:00
parent f0f51f7f77
commit e6781ea5cd
Signed by: sm
GPG Key ID: 4E4B72F479BA3CE5

29
README.md Normal file
View File

@ -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
```