A lightweight Go web application for IP network planning with VLSM allocation, IPv4/IPv6 requests, and deterministic config generation for network platforms. Built with โค๏ธ for the community.
- โจ Features
- ๐ Quick Start (Docker)
- ๐ณ Docker Hub Images
- ๐ป Local Installation
- ๐ฅ๏ธ Usage (Web UI)
- ๐ฅ Import and Export
- ๐ Audit Trail
- ๐จ Templates and Customization
- ๐งช Testing
- ๐ค Contributing
- ๐ Roadmap
- ๐ธ Screenshots
- ๐ Acknowledgments
- ๐ License
| Feature | Description |
|---|---|
| ๐๏ธ Project Management | Organize network planning into projects with sites, VRF/VLAN, pools, and segments for IPv4/IPv6. |
| ๐ VLSM Auto-Allocation | Automatically allocate subnets with locked subnets and reserved ranges support. |
| โ Validation & Hints | Detect overlaps, out-of-pool, VLAN duplications, oversized requests, and fragmentation. |
| ๐ฎ What-If Simulation | Preview changes with diff views without database commits. |
| ๐ Capacity Planning | Dashboard with growth forecasts and IPv6 unit sizing. |
| ๐ Template Generation | Generate configs for VyOS, Cisco, JunOS, Mikrotik with grouping, ordering, filters, and diff options. |
| ๐ฆ Deployed Baselines | Snapshot deployed states and compare against generated outputs. |
| โฌ๏ธ Download Bundles | Export configs as ZIP with metadata and checksums. |
| ๐ DHCP Options | Configure router, DNS, NTP, domain, search, lease times, PXE/boot, vendor options. |
| ๐ Plan Import/Export | Support CSV/YAML/JSON with stable IDs for clean diffs. |
| ๐ Audit Trail Export | Export change logs in CSV/JSON with before/after snapshots. |
| ๐ XLSX Export | Export data for Sites, Segments, DHCP, and Conflicts. |
-
Create a data directory:
mkdir -p data
-
Start the application using Docker Compose:
docker compose up --build
-
Open your browser and navigate to:
Data is persisted to ./data/subnetio.sqlite via a Docker volume.
Prebuilt images are published to Docker Hub:
docker.io/<your-dockerhub-username>/subnetio- Tags:
latest,vX.Y.Z
Example:
docker pull docker.io/<your-dockerhub-username>/subnetio:latest
docker run --rm -p 8080:8080 \
-e DB_PATH=/data/subnetio.sqlite \
-e LISTEN_ADDR=0.0.0.0:8080 \
-v "$(pwd)/data:/data" \
docker.io/<your-dockerhub-username>/subnetio:latest-
Ensure you have Go 1.21+ installed.
-
Clone the repository and navigate to the project directory.
-
Install dependencies:
go mod tidy
-
Run the application:
go run ./cmd/subnetio
DB_PATH: Path to the SQLite database file (default:./subnetio.sqlite)LISTEN_ADDR: Address and port to listen on (default:0.0.0.0:8080)
-
Create or Select a Project: Start on the Projects page to create a new project or select an existing one.
-
Add Sites and Pools: On the Sites page, add sites and define IPv4 or IPv6 pools with optional tier/priority settings.
-
Define Segments: On the Segments page, create segments by specifying the number of hosts or prefix lengths for IPv4 and IPv6.
- Use the "Locked" option for subnets that are already deployed and should not be moved.
-
Auto-Allocate Subnets: Click the "Auto-allocate (VLSM)" button to assign CIDR blocks to segments.
-
Review Conflicts: Check for any conflicts and adjust project rules as necessary.
-
Generate Configurations: Use the Generate page to preview configurations, apply filters by Site/VRF/Segment, and download outputs.
- Save a deployed baseline to enable diff comparisons against the current deployed state.
- Download bundles (ZIP) containing configurations and metadata.json files.
-
Capacity Planning: Visit the Planning page for capacity forecasts and growth projections.
-
Export Audit History: On the Export page, export audit logs for a complete change history.
- Export Plan: Use the Export page to export plans in CSV, YAML, or JSON formats.
- Export Audit: Export audit trails in CSV or JSON formats from the Export page.
- Import Plan: Import plans via the Projects page using CSV, YAML, or JSON files.
- Sample Dataset: Refer to
data/sample.csvfor an example import file.
Plan bundles are designed to be deterministic, ensuring clean diffs through stable IDs and ordered rows.
Audit entries are automatically created for key actions such as create, update, delete operations, allocations, and imports. To tag the actor performing actions, include the X-Actor header or an actor query parameter in requests.
- Built-in Templates: Located in
cmd/subnetio/templates/*.tmpl. - Custom Overrides: Place custom templates in
data/templates/<name>.tmplto override built-in ones. - Upload Templates: Use the Templates page to upload or paste custom template content.
- Documentation: See
docs/templates.mdfor detailed information on template helpers, context, and examples.
Run the test suite to ensure everything is working correctly:
go test ./...We love contributions! Here's how you can help:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/amazing-feature) - ๐ป Make your changes and add tests
- โ
Commit your changes (
git commit -m 'Add amazing feature') - ๐ค Push to the branch (
git push origin feature/amazing-feature) - ๐ Open a Pull Request
git clone https://github.com/ashimov/Subnetio.git
cd Subnetio
go mod tidy
go run ./cmd/subnetioFor more details, see our Contributing Guide.
- ๐ Multi-language support (i18n)
- ๐ฑ Mobile-responsive UI improvements
- ๐ User authentication and role-based access
- ๐ Advanced analytics and reporting
- ๐ API endpoints for integrations
- โ๏ธ Cloud deployment options
- ๐ค AI-assisted subnet optimization
Coming soon! Screenshots will showcase the intuitive web interface for project management, subnet allocation, and configuration generation.
- Built with Go - The awesome programming language
- UI powered by HTMX and Bootstrap
- Inspired by network engineers worldwide
This project is licensed under the GNU GPL v3.0. See the LICENSE file for more details.
Made with โค๏ธ for Community