Skip to content

Commit 8f6cb8b

Browse files
committed
added CIDR Guide
1 parent 23d5609 commit 8f6cb8b

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

infra/samples/network-subnet-design.bicep

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,35 @@ param jumpboxConfiguration jumpBoxConfigurationType = {
7676
@description('Networking address prefix for the VNET.')
7777
param addressPrefixes array = ['10.0.0.0/20'] // 4096 addresses (enough for 8 /23 subnets or 16 /24 subnets)
7878

79+
// Subnet Classless Inter-Doman Routing (CIDR) Sizing Reference Table (Best Practices)
80+
// | CIDR | # of Addresses | # of /24s | Notes |
81+
// |-----------|---------------|-----------|----------------------------------------|
82+
// | /24 | 256 | 1 | Smallest recommended for Azure subnets |
83+
// | /23 | 512 | 2 | Good for 1-2 workloads per subnet |
84+
// | /22 | 1024 | 4 | Good for 2-4 workloads per subnet |
85+
// | /21 | 2048 | 8 | |
86+
// | /20 | 4096 | 16 | Used for default VNet in this solution |
87+
// | /19 | 8192 | 32 | |
88+
// | /18 | 16384 | 64 | |
89+
// | /17 | 32768 | 128 | |
90+
// | /16 | 65536 | 256 | |
91+
// | /15 | 131072 | 512 | |
92+
// | /14 | 262144 | 1024 | |
93+
// | /13 | 524288 | 2048 | |
94+
// | /12 | 1048576 | 4096 | |
95+
// | /11 | 2097152 | 8192 | |
96+
// | /10 | 4194304 | 16384 | |
97+
// | /9 | 8388608 | 32768 | |
98+
// | /8 | 16777216 | 65536 | |
99+
//
100+
// Best Practice Notes:
101+
// - Use /24 as the minimum subnet size for Azure (smaller subnets are not supported for most services).
102+
// - Plan for future growth: allocate larger address spaces (e.g., /20 or /21 for VNets) to allow for new subnets.
103+
// - Avoid overlapping address spaces with on-premises or other VNets.
104+
// - Use contiguous, non-overlapping ranges for subnets.
105+
// - Document subnet usage and purpose in code comments.
106+
// - For AVM modules, ensure only one delegation per subnet and leave delegations empty if not required.
107+
79108
import { subnetType } from '../modules/network/virtualNetwork.bicep'
80109
@description('Array of subnets to be created within the VNET.')
81110
param subnets subnetType[] = [

0 commit comments

Comments
 (0)