I developed a Automated Subnet Planner & Emulation Lab to better understand network design, subnet allocation, and infrastructure testing. The project combines subnet planning logic with a lightweight emulation environment, allowing users to calculate subnet allocations and simulate network environments using Docker containers.
This project helped me explore practical networking concepts while improving my experience with Python-based tooling, automation, and containerized environments.
- Duration: Developed as a hands-on networking and automation project
- Process: Designing subnet calculation logic and building a simulated lab environment
- Focus: Network planning automation, containerized emulation, and CLI/API interfaces
- Implementing subnet allocation logic based on site and host requirements
- Calculating network ranges and address distributions
- Automating subnet planning workflows using Python
- Structuring subnet plans for scalable network deployments
- Organizing modular Python project structures
- Implementing reusable logic across different components
- Building command-line interfaces for developer tools
- Writing clean and maintainable application code
- Designing REST-style endpoints for subnet planning operations
- Handling requests and responses for network planning data
- Providing programmatic access to the subnet planner
- Structuring backend services for extensibility
- Using Docker containers to simulate network environments
- Managing container lifecycle for testing network scenarios
- Automating container startup using scripts
- Building repeatable development and testing environments
- Designing an automated subnet planning engine
- Creating a container-based network emulation lab
- Implementing both CLI and API interfaces for interaction
- Structuring a modular Python project architecture
- Automating network testing workflows using Docker
- Python scripting and project architecture
- Network subnetting and address planning
- REST API design principles
- Docker container orchestration for development environments
- Writing developer-focused command-line tools
automated-subnet-planner
├── src
│ ├── planner
│ ├── emulation
│ ├── api
│ ├── cli
│ └── config
├── tests
├── docker
├── scripts
├── requirements.txt
├── pyproject.toml
├── .env.example
├── Makefile
└── README.md
Clone the repository
git clone <repository-url>
cd automated-subnet-planner
Install dependencies
pip install -r requirements.txt
Set up environment variables
cp .env.example .env
Run the subnet calculation tool from the command line:
python -m src.cli.main --calculate-subnets
Launch the Docker-based network emulation environment:
bash scripts/run_lab.sh
The API server runs locally and allows programmatic interaction with the subnet planner.
Example endpoints:
GET /subnet-plan– Retrieve the calculated subnet planPOST /run-emulation– Start network emulation based on the subnet configuration
Run automated tests using:
pytest tests/
Build the Docker image:
bash scripts/build_image.sh
Start the container environment:
docker-compose up
This project strengthened my understanding of network design, subnet allocation strategies, and infrastructure automation. By combining Python scripting with containerized environments, I learned how to design tools that automate complex networking workflows and create reproducible testing environments.
The experience improved both my networking fundamentals and my ability to build developer-oriented tools for system planning and simulation.
Author: Aryan Rajguru