# cloud subnet cidr planner

> Size and pack VPC/VNet subnets for AWS, Azure or Google Cloud, catch overlapping ranges, and export the plan for Terraform.

cloud subnet cidr planner is a paid AI agent skill on Agensi by Big t, in DevOps & Cloud. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [Big t](https://www.agensi.io/creators/t-b)
- Category: [DevOps & Cloud](https://www.agensi.io/skills/devops-cloud)
- Version: 1.0
- Last updated: 2026-10-11
- Security: scan passed (2026-10-11); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/cloud-subnet-cidr-planner
- Tags: devops, productivity, documentation, networking, aws, azure, gcp, vpc

## About this skill

**Get the subnet math right the first time. Subnets are hard to resize later.**

cloud subnet cidr planner gives your AI agent a tested IP address planner instead of mental CIDR math. Tell it your cloud, your parent block, your availability zones and how many hosts each tier needs. It sizes every subnet with growth headroom, subtracts the addresses each cloud reserves, enforces each cloud's allowed subnet sizes, and packs everything into the block with no overlaps. You also get the free space left for later. A second command checks all your ranges (VPCs, on-prem, VPN, partners, Kubernetes pods) for overlaps that would break peering or VPN routing.

### What it does
- **plan:** tiers like `public=60 private=1500 data=120`, per zone or limited to fewer zones (`mgmt=20/1`), a growth factor (default x2), and an optional minimum subnet size. Output shows CIDR, first and last usable IP, usable count, hosts, the size each subnet was built for, headroom, and the remaining free blocks.
- **Cloud rules built in:** AWS reserves 5 addresses per subnet (subnets /16 to /28, VPC blocks /16 to /28). Azure reserves 5 (subnets /29 to /2). Google Cloud reserves 4 in primary ranges (subnets /29 to /4). There's also a plain on-prem mode.
- **When it doesn't fit:** it tells you how many addresses you need and the smallest parent block that would work.
- **overlap:** identical, nested and partial overlaps across any list of named ranges, host-bit typos (`10.30.5.7/24` is really `10.30.5.0/24`), CGNAT (100.64.0.0/10) and public-space warnings, and a collapsed summary of all space in use.
- **info and split:** explain any block (netmask, range, usable IPs on each cloud, whether it's allowed as a subnet) or cut a block into equal subnets.
- **Exports:** `plan.md` for review, `plan.csv`, and `subnets.tfvars.json` that drops into a Terraform/OpenTofu `for_each`. Example HCL for AWS, Azure and Google Cloud is included.

### Problems it solves
- Off-by-one CIDR mistakes and forgetting each cloud's reserved addresses
- Subnets that run out of IPs when EKS/AKS/GKE pods, load balancers and endpoints start taking addresses
- New VPCs that overlap on-prem, a partner network or another VPC, and only show up when peering fails
- Fragmented address space with no room left for another zone or tier
- Hand-typing subnet CIDRs into Terraform

### Who it's for
Cloud and DevOps engineers, platform teams, developers setting up their first production VPC, MSPs and consultants who design networks for clients, and anyone writing Terraform for AWS, Azure or Google Cloud networking.

### What's included
- `SKILL.md`: what to ask (counting pod IPs, endpoints and load balancers), run commands, how to present the plan, and what breaks when ranges overlap
- `scripts/cidr_plan.py`: `plan`, `overlap`, `info` and `split` commands
- `references/cloud-rules.md`: each cloud's reserved addresses and allowed sizes with links to the official docs, plus the RFC address classes
- `references/terraform-usage.md`: using the JSON variables file with AWS, Azure and Google Cloud resources
- `examples/`: a sample network list for overlap checks, an example plan and an example variables file

Standard-library Python only (`ipaddress`). No API keys, no cloud access, no network calls, no installs.

## Known limitations

- IPv4 planning only. Cloud IPv6 subnets are fixed /64s, so there's nothing to size. `info` still explains IPv6 blocks.
- Doesn't read your cloud accounts. You supply existing ranges for overlap checks.
- Doesn't know service-specific subnet minimums or names (for example dedicated gateway or firewall subnets). Check that service's docs and add them as tiers.
- Google Cloud secondary ranges (GKE alias IPs) have no reserved addresses. Size them with `--cloud plain` as an approximation, or follow GKE's sizing guide.
- Packing is largest-first at the lowest free address: deterministic and tidy, but not guaranteed optimal for every mix.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the cloud subnet cidr planner skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Why are there fewer usable IPs than the CIDR size?

Clouds reserve some addresses in every subnet: AWS and Azure reserve the first four and the last one, and Google Cloud reserves the first two and last two in primary ranges. A /24 gives 251 usable IPs on AWS or Azure and 252 on Google Cloud. The plan accounts for this automatically.

### How do I count hosts?

Count everything that takes an IP in the subnet: instances, load balancer nodes, NAT gateways, VPC endpoints, serverless network interfaces, and pods if your Kubernetes CNI gives pods VPC IPs. Then let the growth factor (default x2) add headroom.

### What does the overlap check catch?

Identical, nested (one inside another) and partial overlaps between any named ranges. It also flags typos with host bits set, CGNAT and public address space, and shows a merged summary of all space in use.

### Does it create anything in my cloud?

No. It writes a plan and an optional JSON variables file. You review and apply it with your own Terraform/OpenTofu workflow.

### Which clouds' rules does it know?

AWS, Azure and Google Cloud, using each one's documented reserved addresses and allowed subnet sizes (linked in `references/cloud-rules.md`), plus a plain on-prem mode that reserves network and broadcast only.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
