Quick Start
Get your first CIDR allocation in under 5 minutes.
Installation
npm install -g subnetteryarn global add subnetter# Run directly without installingnpx subnetter --versionVerify the installation:
subnetter --versionPrerequisites
- Node.js: ^18.18.0 || ^20.9.0 || >=21.1.0
- npm or yarn
Your First Allocation
-
Create a configuration file
Create a file named
config.json:{"baseCidr": "10.0.0.0/16","accounts": [{"name": "production","clouds": {"aws": {"regions": ["us-east-1", "us-west-2"]}}}],"subnetTypes": {"Public": 24,"Private": 24,"Data": 26}} -
Generate allocations
Terminal window subnetter generate --config config.json --output allocations.csv -
View your allocations
Open
allocations.csvto see your subnet allocations:Account Cloud Region AZ Subnet CIDR Usable IPs production aws us-east-1 us-east-1a Public 10.0.0.0/24 254 production aws us-east-1 us-east-1a Private 10.0.1.0/24 254 production aws us-east-1 us-east-1a Data 10.0.2.0/26 62 … … … … … … …
Validate Before Generating
Check your configuration for errors without generating allocations:
subnetter validate --config config.jsonAnalyze Your Configuration
Get statistics about your configuration:
subnetter analyze --config config.jsonCommon Options
| Option | Short | Description |
|---|---|---|
--config | -c | Path to configuration file (required) |
--output | -o | Output CSV file path (default: allocations.csv) |
--provider | -p | Filter by cloud provider (aws, azure, gcp) |
--verbose | -v | Enable detailed logging |
--base-cidr | -b | Override the base CIDR from config |
Next Steps
- Configuration Reference - Learn all configuration options
- CLI Reference - Complete command documentation
- Best Practices - CIDR allocation strategies
- CIDR Primer - Learn CIDR notation basics