{"id":684,"date":"2025-06-02T06:41:50","date_gmt":"2025-06-02T06:41:50","guid":{"rendered":"https:\/\/datadandies.nl\/?p=684"},"modified":"2025-06-05T06:29:16","modified_gmt":"2025-06-05T06:29:16","slug":"classless-inter-domain-routing-cidr-to-allocate-ip-addresses-in-a-network-like-aws-vpc-and-structure-of-an-ip-address","status":"publish","type":"post","link":"https:\/\/datadandies.nl\/index.php\/2025\/06\/02\/classless-inter-domain-routing-cidr-to-allocate-ip-addresses-in-a-network-like-aws-vpc-and-structure-of-an-ip-address\/","title":{"rendered":"Classless Inter-Domain Routing (CIDR) to allocate IP addresses in a network like AWS VPC and structure of an IP address"},"content":{"rendered":"\n<p>Classless Inter-Domain Routing is a way to allocate IP addresses within a network. Every machine that is connected to the internet has a unique number, called an IP address.<\/p>\n\n\n\n<p>With CIDR you can create a range of private IP addresses for a VPC. These IP addresses are allocated to resources that you deploy within your VPC.<\/p>\n\n\n\n<p>The IP addresses are private, unless you explicitly set up internet gateways or something similar in your VPC.<\/p>\n\n\n\n<p>Are you deploying an EC2 instance within a subnet within your VPC? Then an IP address will be allocated to it.<\/p>\n\n\n\n<p>Imagine you deployed a VPC with a CIDR block containing a range 10.0.0.0\/29. The 29 tells you how many bits are reserved for the network part of the IP address (29 bits of 32). This means that you have 32-29 = 3 \u2192 2^3 = 8 IP addresses available for the subnet. Edit: after having this post fact-checked by AI it got smart with me and told me only 6 IP addresses were usable because 1 is reserved for the network address and 1 for the broadcast address<\/p>\n\n\n\n<p>It can be useful to limit the number of hosts for a subnet in order to keep more IP addresses available. Some resources that live in your VPC like a load balancer, only need a few IP addresses after all.<\/p>\n\n\n\n<p>By the way, a load balancer is a tool that directs traffic to resources like servers within your VPC in order to prevent overloading a resource; it \u201cspreads\u201d the load, so to speak.<\/p>\n\n\n\n<p>Now, if you want to get even more \u201czero and one-sy\u201d, take a look at the image below. It shows how an IP address is structured. An IP address can contain a maximum of 32 bits divided into 4 binary octets of 8 bits. Again, the image below should help clarify the structure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"687\" src=\"https:\/\/datadandies.nl\/wp-content\/uploads\/2025\/06\/IP-address-binary-octet-explanation-1024x687.png\" alt=\"\" class=\"wp-image-685\" srcset=\"https:\/\/datadandies.nl\/wp-content\/uploads\/2025\/06\/IP-address-binary-octet-explanation-1024x687.png 1024w, https:\/\/datadandies.nl\/wp-content\/uploads\/2025\/06\/IP-address-binary-octet-explanation-300x201.png 300w, https:\/\/datadandies.nl\/wp-content\/uploads\/2025\/06\/IP-address-binary-octet-explanation-768x515.png 768w, https:\/\/datadandies.nl\/wp-content\/uploads\/2025\/06\/IP-address-binary-octet-explanation-380x254.png 380w, https:\/\/datadandies.nl\/wp-content\/uploads\/2025\/06\/IP-address-binary-octet-explanation-285x190.png 285w, https:\/\/datadandies.nl\/wp-content\/uploads\/2025\/06\/IP-address-binary-octet-explanation.png 1224w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Classless Inter-Domain Routing is a way to allocate IP addresses within a network. Every machine that is connected to the internet has a unique number, called an IP address. With CIDR you can create a range of private IP addresses for a VPC. These IP addresses are allocated to resources that you deploy within your&hellip;<\/p>\n<p class=\"more-link\"><a href=\"https:\/\/datadandies.nl\/index.php\/2025\/06\/02\/classless-inter-domain-routing-cidr-to-allocate-ip-addresses-in-a-network-like-aws-vpc-and-structure-of-an-ip-address\/\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[72,73],"class_list":["post-684","post","type-post","status-publish","format-standard","hentry","category-blog","tag-networking","tag-vpc"],"_links":{"self":[{"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/posts\/684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/comments?post=684"}],"version-history":[{"count":1,"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/posts\/684\/revisions"}],"predecessor-version":[{"id":686,"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/posts\/684\/revisions\/686"}],"wp:attachment":[{"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/media?parent=684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/categories?post=684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datadandies.nl\/index.php\/wp-json\/wp\/v2\/tags?post=684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}