पूर्ण IPv4 और IPv6 सबनेटिंग और सीआईडीआर आर्किटेक्चर गाइड
सबनेटिंग कंप्यूटर नेटवर्किंग में उपयोग की जाने वाली मौलिक गणितीय तकनीक है जिसके द्वारा एक बड़े भौतिक या आभासी नेटवर्क को छोटे, तार्किक रूप से व्यवस्थित उप-नेटवर्क (सबनेट) में विभाजित किया जाता है। आईपी एड्रेस स्पेस को विभाजित करके, नेटवर्क आर्किटेक्ट एक्सेस-कंट्रोल अलगाव के माध्यम से सुरक्षा बढ़ाते हैं, ब्रॉडकास्ट तूफानों को रोकते हैं, लेटेंसी कम करते हैं और IPv4 पतों का अधिकतम संरक्षण सुनिश्चित करते हैं। क्लासलेस इंटर-डोमेन रूटिंग (CIDR) और बिटवाइज़ सबनेट मास्क को समझना नेटवर्क इंजीनियरों, क्लाउड आर्किटेक्ट्स और साइबर सुरक्षा पेशेवरों के लिए अनिवार्य है।
1. IPv4 सबनेटिंग की गणितीय नींव
An IPv4 address consists of 32 binary bits arranged into four 8-bit bytes called octets, separated by periods (e.g., 192.168.1.1). Every IP address is fundamentally divided into two segments: the Network Prefix (which identifies the subnet) and the Host Identifier (which identifies the individual interface or host on that subnet).
(which identifies the individual interface or host on that subnet).
- Bitwise AND Operation: A router determines the network address by performing a logical bitwise AND between the 32-bit IP address and the 32-bit subnet mask. Wherever the mask bit is
1, the IP bit is preserved; wherever the mask bit is0, the result is forced to0. - Total Host Formula: If a subnet mask reserves
hhost bits (whereh = 32 - CIDR), the total number of IP addresses in the subnet is2^h. - Usable Host Formula: In standard IPv4 networking, two addresses are reserved and cannot be assigned to endpoints: the Network Address (where all host bits are binary
0) and the Broadcast Address (where all host bits are binary1). Therefore, the number of usable hosts is2^h - 2. - Point-to-Point /31 Subnets (RFC 3021): For direct router-to-router point-to-point serial links, RFC 3021 eliminates dedicated network and broadcast addresses, allowing both addresses in a
/31block to be assigned to the two peer router interfaces, conserving vast blocks of IPv4 space.
2. निजी आईपी स्पेस (RFC 1918) बनाम सार्वजनिक रूटिंग
वैश्विक 4.29 अरब IPv4 एड्रेस पूल के समयपूर्व समाप्त होने से रोकने के लिए, इंटरनेट इंजीनियरिंग टास्क फोर्स (IETF) ने RFC 1918 के तहत तीन निजी IPv4 ब्लॉक निर्दिष्ट किए हैं जिन्हें सार्वजनिक इंटरनेट पर कभी रूट नहीं किया जाता है:
- 10.0.0.0/8 (Class A Private): Range:
10.0.0.0to10.255.255.255(16,777,216 total addresses). Ideal for large enterprise campus networks, global WANs, and cloud multi-tier VPC topologies. - 172.16.0.0/12 (Class B Private): Range:
172.16.0.0to172.31.255.255(1,048,576 addresses across 16 contiguous /16 blocks). Frequently used in mid-sized enterprise networks, virtualization clusters, and Docker/Kubernetes container overlays. - 192.168.0.0/16 (Class C Private): Range:
192.168.0.0to192.168.255.255(65,536 addresses across 256 contiguous /24 blocks). Standard default for home routers, small-office/home-office (SOHO) Wi-Fi networks, and lab benches. - 100.64.0.0/10 (Carrier-Grade NAT / CGNAT - RFC 6598): Range:
100.64.0.0to100.127.255.255(4,194,304 addresses). Used by ISPs to aggregate multiple residential subscribers behind shared public IPv4 gateways.
3. IPv6 आर्किटेक्चर और अनिवार्य /64 उपसर्ग
IPv6 replaces IPv4's 32-bit limitation with a massive 128-bit address space, representing 2^128 (approximately 340 undecillion) unique addresses. IPv6 addresses are written as eight groups of four hexadecimal digits (hextets) separated by colons.
(approximately 340 undecillion) unique addresses. IPv6 addresses are written as eight groups of four hexadecimal digits (hextets) separated by colons.
- Global Routing Prefix (Typically /48 to /56): Assigned by Regional Internet Registries (RIRs) and ISPs to enterprises and organizations.
- Subnet Identifier (Bits 48 through 64): Gives an enterprise up to 65,536 distinct
/64subnets from a single/48assignment. - Interface Identifier (Bits 64 through 128): RFC 4291 mandates that standard subnets use a
/64prefix to allow Stateless Address Autoconfiguration (SLAAC). Each individual/64subnet contains18,446,744,073,709,551,616unique host addresses.
4. क्लाउड वीपीसी सबनेटिंग (AWS, Azure और GCP)
अमेज़ॅन वेब सर्विसेज (AWS VPC), माइक्रोसॉफ्ट एज़्योर और गूगल क्लाउड प्लेटफॉर्म (GCP VPC) जैसे प्रमुख क्लाउड वातावरणों में सबनेट डिजाइन करते समय, क्लाउड प्रदाता हाइपरवाइजर इंफ्रास्ट्रक्चर सेवाओं के लिए प्रत्येक सबनेट में अतिरिक्त आईपी पते आरक्षित करते हैं:
.0: Network address..1: VPC router / default gateway address..2: DNS resolver service (Amazon Provided DNS or Azure DNS)..3: Cloud internal management or broadcast emulation..255: Network broadcast address.
Consequently, in an AWS VPC, a /24 subnet provides 251 usable host IP addresses rather than the traditional on-premise count of 254. Keep this cloud reserve in mind when sizing subnets for Kubernetes node pools or elastic load balancer clusters.