This tool reads an Excel sheet of IPv4 addresses and subnet masks, calculates subnet statistics, groups them, exports a CSV (or JSON) report, and (optionally) draws a bar chart of usable hosts per subnet.
- Python 3.10+
- pip
pip install pandas matplotlib openpyxlpython subnet_analyzer.py --input ip_data.xlsx --report subnet_report.csv --plot network_plot.pngTo only generate the CSV:
python subnet_analyzer.py --input ip_data.xlsx --report subnet_report.csv --plot ""Build the image:
docker build -t subnettool .Run the container (results appear in the container's /app folder):
docker run --rm -v $(pwd):/app subnettoolbarq-devops-subnet-task/
├── Dockerfile
├── ip_data.xlsx
├── subnet_analyzer.py
├── visualize.py
├── subnet_report.csv
├── network_plot.png
├── report.md
└── README.md