{"id":32558422,"url":"https://github.com/bcchagas/nextsubnet","last_synced_at":"2026-07-02T18:01:54.144Z","repository":{"id":44698499,"uuid":"446220931","full_name":"bcchagas/nextsubnet","owner":"bcchagas","description":"nextsubnet is a tool for helping you find out what the next subnet available is in a given virtual network","archived":false,"fork":false,"pushed_at":"2022-02-08T01:28:26.000Z","size":2373,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T23:56:02.763Z","etag":null,"topics":["virtual-networking"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcchagas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-09T22:49:14.000Z","updated_at":"2022-01-31T19:07:59.000Z","dependencies_parsed_at":"2022-09-26T20:30:58.518Z","dependency_job_id":null,"html_url":"https://github.com/bcchagas/nextsubnet","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bcchagas/nextsubnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcchagas%2Fnextsubnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcchagas%2Fnextsubnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcchagas%2Fnextsubnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcchagas%2Fnextsubnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcchagas","download_url":"https://codeload.github.com/bcchagas/nextsubnet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcchagas%2Fnextsubnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35057450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["virtual-networking"],"created_at":"2025-10-28T23:54:42.240Z","updated_at":"2026-07-02T18:01:54.103Z","avatar_url":"https://github.com/bcchagas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![nextsubnet logo](./logo/nextsubnet-banner.jpeg)\n\n# NEXTSUBNET\n`nextsubnet` is a tool for helping you find out what the next subnet available is in a given virtual network, specially when it already has some subnets created and you want to fill in the gaps when possible.\n\n## INSTALATION\n\nGo to [releases](https://github.com/bcchagas/nextsubnet/releases) and download the version of you choosing.\n\n## USAGE\n\n```bash\nUsage:\n  nextsubnet -n network -m mask [--ignore-list list | --ignore-file file] [flags]\n\nExamples:\n  # Find the next /24 subnet in the network 10.0.0.0/22\n  # that doesn't overlap any of the two existent subnets\n  nextsubnet --network 10.0.0.0/22 --subnet-mask 25 --ignore-list 10.0.0.0/24,10.0.1.128/25\n\n  # You can also pass in a file containing the subnets in use\n  nextsubnet --network 10.0.0.0/22  --subnet-mask 24 --ignore-file subnets.txt\n```\n\n## MOTIVATION\nWhen using the Azure Portal to provision a subnet it automatically calculates the subnet address space based on the mask you provide. On the other hand, when provisioning via `az-cli`, `ARM Template` or `REST API` you have to calculate the subnet range yourself.\n\n## USE CASE SCENARIO\n\nLet's say you have the following virtual network: `10.0.0.1/22` and two subnets whithin it: `10.0.0.0/24`, `10.0.1.128/25`\n\n```yaml\nvnet: 10.0.0.1/22\n  subnet: 10.0.0.0/24\n  subnet: 10.0.1.128/25\n```\n\nIf you were to provision a `/25` subnet, the next available address space would fall between the two existing ones:\n\n```yaml\nvnet: 10.0.0.1/22\n  subnet: 10.0.0.0/24\n  subnet: 10.0.1.0/25\n  subnet: 10.0.1.128/25\n```\n\nIn the ever changing environment that is the cloud, it's often the case that a subnet is no longer needed and is eventually removed, leaving a gap. Using `nextsubnet` you can optimize the virtual network address space usage by filling those gaps whenever possible.\n\n## ROADMAP\n\n📅 Upcomming features and changes can be seen at [nextsubnet roadmap](https://github.com/users/bcchagas/projects/1/views/1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcchagas%2Fnextsubnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcchagas%2Fnextsubnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcchagas%2Fnextsubnet/lists"}