Simple python script that calculates the largest allocatable RFC 1918 subnet range.
- (Optional) Create a virtual environment
$ python -m venv venv
- (Optional) Activate your virtual environment
source ./venv/bin/activate
- Install the
subnetfinder
module
pip install subnetfinder
- Create and update text file containing list of in-use ranges
# update as necessary
tee list.txt <<EOF
10.0.0.0/16
10.1.0.0/16
EOF
- Perform the search
make search range=<range e.g. 10.0.0.0/8> mask=<e.g. 10> file=<e.g. ./list.txt>