Calculate Network Ranges for a given CIDR.
For example, cidit 10.122.33.44/24 prints out the following information:
cidr first_usable last_usable subnet broadcast
10.122.33.44/24 10.122.33.1 10.122.33.254 10.122.33.0 10.122.33.255
CIDR stands for Classless Inter-Domain Routing. Learn more about CIDR here or here.
With Homebrew (recommended)
brew tap hex22a/ciditbrew install ciditCheck out Releases page to find binaries for Your platform
# cidit --help to get more usage info
cidit 10.122.33.44/24cidit -f json 10.122.33.44/24
# Prints: {"cidr":"10.122.33.44/24","first_usable":"10.122.33.1","last_usable":"10.122.33.254","subnet":"10.122.33.0","broadcast":"10.122.33.255"}or alternatively You can run it via cargo from the project root
cargo run -- 10.122.33.44/24Clone this repo:
git clone git@github.com:hex22a/cidit.git && cd ./ciditRun tests:
cargo testBuild the binary
cargo buildThis will create a binary in target > debug directory