[{"data":1,"prerenderedAt":562},["ShallowReactive",2],{"blog-subnet-calculator-how-to-read-cidr":3},{"id":4,"title":5,"body":6,"category":549,"date":550,"description":551,"extension":552,"meta":553,"navigation":554,"path":555,"readingTime":556,"seo":557,"stem":558,"tool":559,"updated":560,"__hash__":561},"blog\u002Fblog\u002Fsubnet-calculator-how-to-read-cidr.md","Subnet Calculator: How to Read CIDR Notation",{"type":7,"value":8,"toc":537},"minimark",[9,13,16,21,24,35,42,48,52,63,186,189,193,196,213,220,246,249,253,256,284,287,317,321,324,330,333,337,340,390,393,413,417,420,475,478,482,485,522,525,529],[10,11,12],"p",{},"CIDR (Classless Inter-Domain Routing) notation is how networks are defined in the modern internet. If you configure firewalls, security groups, VPCs, VPNs, or any network infrastructure, you need to read CIDR fluently. Yet many developers treat subnet math as a black art, reaching for a calculator without understanding what the numbers mean.",[10,14,15],{},"This guide teaches you to read CIDR notation by sight and understand what the numbers represent.",[17,18,20],"h2",{"id":19},"what-is-cidr-notation","What is CIDR Notation?",[10,22,23],{},"CIDR notation appends a prefix length to an IP address:",[25,26,31],"pre",{"className":27,"code":29,"language":30},[28],"language-text","192.168.1.0\u002F24\n","text",[32,33,29],"code",{"__ignoreMap":34},"",[10,36,37,38,41],{},"The ",[32,39,40],{},"\u002F24"," means the first 24 bits (out of 32) identify the network. The remaining 8 bits identify hosts within that network.",[25,43,46],{"className":44,"code":45,"language":30},[28],"192.168.1.0\u002F24\n\nIP:        11000000.10101000.00000001.00000000\nMask:      11111111.11111111.11111111.00000000\n           ├── network (24 bits) ──┤├ host (8)┤\n",[32,47,45],{"__ignoreMap":34},[17,49,51],{"id":50},"the-subnet-mask","The Subnet Mask",[10,53,54,55,58,59,62],{},"The prefix length ",[32,56,57],{},"\u002Fn"," creates a subnet mask — a 32-bit value where the first ",[32,60,61],{},"n"," bits are 1 and the rest are 0:",[64,65,66,85],"table",{},[67,68,69],"thead",{},[70,71,72,76,79,82],"tr",{},[73,74,75],"th",{},"Prefix",[73,77,78],{},"Subnet mask",[73,80,81],{},"Total addresses",[73,83,84],{},"Usable hosts",[86,87,88,103,117,131,144,158,172],"tbody",{},[70,89,90,94,97,100],{},[91,92,93],"td",{},"\u002F32",[91,95,96],{},"255.255.255.255",[91,98,99],{},"1",[91,101,102],{},"0 (single host)",[70,104,105,108,111,114],{},[91,106,107],{},"\u002F30",[91,109,110],{},"255.255.255.252",[91,112,113],{},"4",[91,115,116],{},"2 (point-to-point)",[70,118,119,122,125,128],{},[91,120,121],{},"\u002F28",[91,123,124],{},"255.255.255.240",[91,126,127],{},"16",[91,129,130],{},"14",[70,132,133,135,138,141],{},[91,134,40],{},[91,136,137],{},"255.255.255.0",[91,139,140],{},"256",[91,142,143],{},"254",[70,145,146,149,152,155],{},[91,147,148],{},"\u002F20",[91,150,151],{},"255.255.240.0",[91,153,154],{},"4,096",[91,156,157],{},"4,094",[70,159,160,163,166,169],{},[91,161,162],{},"\u002F16",[91,164,165],{},"255.255.0.0",[91,167,168],{},"65,536",[91,170,171],{},"65,534",[70,173,174,177,180,183],{},[91,175,176],{},"\u002F8",[91,178,179],{},"255.0.0.0",[91,181,182],{},"16,777,216",[91,184,185],{},"16,777,214",[10,187,188],{},"The pattern: each bit you add to the prefix halves the network. Each bit you remove doubles it.",[17,190,192],{"id":191},"network-and-broadcast-addresses","Network and Broadcast Addresses",[10,194,195],{},"Every subnet has two reserved addresses:",[197,198,199,207],"ul",{},[200,201,202,206],"li",{},[203,204,205],"strong",{},"Network address"," — all host bits set to 0 (first address)",[200,208,209,212],{},[203,210,211],{},"Broadcast address"," — all host bits set to 1 (last address)",[10,214,215,216,219],{},"For ",[32,217,218],{},"192.168.1.0\u002F24",":",[197,221,222,228,234,240],{},[200,223,224,225],{},"Network: ",[32,226,227],{},"192.168.1.0",[200,229,230,231],{},"First usable host: ",[32,232,233],{},"192.168.1.1",[200,235,236,237],{},"Last usable host: ",[32,238,239],{},"192.168.1.254",[200,241,242,243],{},"Broadcast: ",[32,244,245],{},"192.168.1.255",[10,247,248],{},"This is why a \u002F24 has 256 addresses but only 254 usable hosts.",[17,250,252],{"id":251},"reading-cidr-by-sight","Reading CIDR by Sight",[10,254,255],{},"With practice, you can read common prefixes instantly:",[197,257,258,263,268,273,278],{},[200,259,260,262],{},[32,261,40],{}," = 256 addresses, last octet varies (192.168.1.0 - 192.168.1.255)",[200,264,265,267],{},[32,266,162],{}," = 65,536 addresses, last two octets vary (10.0.0.0 - 10.0.255.255)",[200,269,270,272],{},[32,271,176],{}," = 16M addresses, last three octets vary (10.0.0.0 - 10.255.255.255)",[200,274,275,277],{},[32,276,93],{}," = single IP address (host route)",[200,279,280,283],{},[32,281,282],{},"\u002F0"," = all IP addresses (default route)",[10,285,286],{},"For anything between, remember: each step from \u002F24 toward \u002F16 doubles the network.",[197,288,289,294,300,306,312],{},[200,290,291,293],{},[32,292,40],{}," = 256",[200,295,296,299],{},[32,297,298],{},"\u002F23"," = 512",[200,301,302,305],{},[32,303,304],{},"\u002F22"," = 1,024",[200,307,308,311],{},[32,309,310],{},"\u002F21"," = 2,048",[200,313,314,316],{},[32,315,148],{}," = 4,096",[17,318,320],{"id":319},"splitting-subnets","Splitting Subnets",[10,322,323],{},"Splitting (subnetting) divides a network into smaller pieces. Split a \u002F24 into four \u002F26 networks:",[25,325,328],{"className":326,"code":327,"language":30},[28],"192.168.1.0\u002F24 splits into:\n  192.168.1.0\u002F26    (hosts .1 - .62)\n  192.168.1.64\u002F26   (hosts .65 - .126)\n  192.168.1.128\u002F26  (hosts .129 - .190)\n  192.168.1.192\u002F26  (hosts .193 - .254)\n",[32,329,327],{"__ignoreMap":34},[10,331,332],{},"Each \u002F26 has 64 addresses (62 usable). This is the standard approach for creating VLANs, cloud subnets, or isolated network segments.",[17,334,336],{"id":335},"private-ip-ranges-rfc-1918","Private IP Ranges (RFC 1918)",[10,338,339],{},"These ranges are reserved for private networks and are not routable on the public internet:",[64,341,342,355],{},[67,343,344],{},[70,345,346,349,352],{},[73,347,348],{},"Range",[73,350,351],{},"CIDR",[73,353,354],{},"Typical use",[86,356,357,368,379],{},[70,358,359,362,365],{},[91,360,361],{},"10.0.0.0 - 10.255.255.255",[91,363,364],{},"10.0.0.0\u002F8",[91,366,367],{},"Large enterprise, cloud VPCs",[70,369,370,373,376],{},[91,371,372],{},"172.16.0.0 - 172.31.255.255",[91,374,375],{},"172.16.0.0\u002F12",[91,377,378],{},"Mid-size networks",[70,380,381,384,387],{},[91,382,383],{},"192.168.0.0 - 192.168.255.255",[91,385,386],{},"192.168.0.0\u002F16",[91,388,389],{},"Home and small office",[10,391,392],{},"Other reserved ranges:",[197,394,395,401,407],{},[200,396,397,400],{},[32,398,399],{},"127.0.0.0\u002F8"," — loopback (localhost)",[200,402,403,406],{},[32,404,405],{},"169.254.0.0\u002F16"," — link-local (auto-assigned when DHCP fails)",[200,408,409,412],{},[32,410,411],{},"100.64.0.0\u002F10"," — carrier-grade NAT (RFC 6598)",[17,414,416],{"id":415},"cloud-vpc-sizing","Cloud VPC Sizing",[10,418,419],{},"When creating a VPC in AWS, Azure, or GCP, choose the CIDR block carefully — it cannot be changed later:",[64,421,422,437],{},[67,423,424],{},[70,425,426,429,431,434],{},[73,427,428],{},"VPC size",[73,430,351],{},[73,432,433],{},"Addresses",[73,435,436],{},"Subnets you can create",[86,438,439,451,463],{},[70,440,441,444,446,448],{},[91,442,443],{},"Small",[91,445,40],{},[91,447,140],{},[91,449,450],{},"4 x \u002F26 or 8 x \u002F28",[70,452,453,456,458,460],{},[91,454,455],{},"Medium",[91,457,148],{},[91,459,154],{},[91,461,462],{},"16 x \u002F24",[70,464,465,468,470,472],{},[91,466,467],{},"Large",[91,469,162],{},[91,471,168],{},[91,473,474],{},"256 x \u002F24",[10,476,477],{},"AWS reserves 5 addresses per subnet (network, broadcast, and three for internal services). So an AWS \u002F24 subnet has 251 usable IPs, not 254.",[17,479,481],{"id":480},"the-wildcard-mask","The Wildcard Mask",[10,483,484],{},"The wildcard mask is the bitwise inverse of the subnet mask. It is used in Cisco ACLs and OSPF configuration:",[64,486,487,496],{},[67,488,489],{},[70,490,491,493],{},[73,492,78],{},[73,494,495],{},"Wildcard mask",[86,497,498,506,514],{},[70,499,500,503],{},[91,501,502],{},"255.255.255.0 (\u002F24)",[91,504,505],{},"0.0.0.255",[70,507,508,511],{},[91,509,510],{},"255.255.240.0 (\u002F20)",[91,512,513],{},"0.0.15.255",[70,515,516,519],{},[91,517,518],{},"255.255.255.252 (\u002F30)",[91,520,521],{},"0.0.0.3",[10,523,524],{},"The wildcard mask marks which bits can vary. In a \u002F24, the last 8 bits (0.0.0.255) can be any value.",[17,526,528],{"id":527},"calculate-subnets","Calculate Subnets",[10,530,531,536],{},[532,533,535],"a",{"href":534},"\u002Ftools\u002Fip-calculator","StackCache IP Calculator"," derives network address, broadcast address, subnet mask, wildcard mask, host range, and CIDR splits — all locally in your browser with no account needed.",{"title":34,"searchDepth":538,"depth":538,"links":539},2,[540,541,542,543,544,545,546,547,548],{"id":19,"depth":538,"text":20},{"id":50,"depth":538,"text":51},{"id":191,"depth":538,"text":192},{"id":251,"depth":538,"text":252},{"id":319,"depth":538,"text":320},{"id":335,"depth":538,"text":336},{"id":415,"depth":538,"text":416},{"id":480,"depth":538,"text":481},{"id":527,"depth":538,"text":528},"Networking","2026-09-08","Learn CIDR notation, subnet masks, network and broadcast addresses, and how to split networks. Includes a visual breakdown and practical examples.","md",{},true,"\u002Fblog\u002Fsubnet-calculator-how-to-read-cidr",7,{"title":5,"description":551},"blog\u002Fsubnet-calculator-how-to-read-cidr","ip-calculator",null,"Vozn1sZgM8Ti1xnPmNeUR7KMINbC_h-mPWp5OoN87wI",1788868139541]