CSNetworkingDiagramBeginner
Subnetting & CIDR
KO: 서브네팅 & CIDR·EN: Subnetting & CIDR·JA: サブネッティング&CIDR·CIDR
Dividing an IP address space into smaller logical networks using CIDR prefixes (/N) to isolate broadcast domains, enforce security boundaries, and allocate IPs efficiently
Table of Contents
Structure Diagram
IPv4 CIDR Subnetting (10.0.0.0/24 → Two /25 Subnets)
VPC /24 (256 IPs)1 steps
Split /25 Subnets2 steps
STEP 110.0.0.0 - 10.0.0.255(100 IP)
Quick Answer
What is Subnetting & CIDR?
Dividing an IP address space into smaller logical networks using CIDR prefixes (/N) to isolate broadcast domains, enforce security boundaries, and allocate IPs efficiently. It is a core concept in Networking within CS.
Core Principles
Subnetting partitions a larger IP block into smaller logical networks using CIDR notation (/N).
- Bit Math: In 32-bit IPv4,
/Nfixes the leadingNnetwork bits, leaving2^(32-N)total addresses (/24= 256,/25= 128,/16= 65,536). - Reserved Addresses: Traditional subnets reserve 2 IPs (network + broadcast); cloud VPCs (e.g., AWS) reserve 5 IPs per subnet for routing and DNS.
Practical Takeaways
- Never overlap VPC CIDRs: Assign distinct non-overlapping ranges across prod, staging, and dev so future VPC peering or VPNs work seamlessly.
- Tiered Public/Private isolation: Keep only load balancers in public subnets; place compute and databases in private subnets.
- Size subnets for Kubernetes: CNI plugins that assign VPC IPs per Pod can exhaust small
/24subnets quickly—size accordingly.
Notable Examples
- Cloud VPC Design: Multi-AZ public and private subnets in AWS/GCP/Azure.
- Firewall & ACL Rules: Allow-listing office CIDR blocks (
203.0.113.0/24).