When we start building our infrastructure on AWS, the first step is almost always to create VPC (VIRTUAL PRIVATE CLOUD). It is at this moment that we come across terms such as 10.0.0.0/16 or class C IP (192.168.1.0/24).
For many cloud users, these numbers seem like the pattern or something like that, but behind the scenes there's a logical math that govern how your instances like EC2 communicate with other services.
In the early days of the Internet, IP addresses were rigidly divided into classes (A,B,C). If a company needed a network larger than 256 IPs (Class C) it was required to request a Class B with 65,536 IPs ( Binary Octet) If the user must be 1000 IP's, the others 64,536 were lost.
The CIDR (Classless Inter-Domain Routing ) abolish this class system, allowing the division between network identification (prefix) and host identification (sufix).
When you see CIDR notation , the slash and the number behind it represent the subnet mask**.** 10.0.0.0/16; The number /16**** indicates that the first 16 bits**** of the address are fixed and identify your network.
So, out of the 32 bit, rest 16, host identifiers. If it were /24, would remain 8 host identfiers.
Then, how the AWS know if one packge must be send locally or if must be pass by VPC router?
With the AND Logic Operation, that multiply the mask bit with ip bit. The result show the networks are different or not.
The Gemini say me that AWS isntead separate 2 IP'S, when creating subnets, its separete 5 IP'S for administrative infrastructure address.
we instances 10.0.0.0/24
1 IP - 10.0.0.0 - traditional network (Standard)
2 IP - 10.0.0.1 - VPC Router (Default gateway)
3 IP - 10.0.0.2 - DNS (Amazon Providade DNS)
4 IP - 10.0.0.3 - Future uses
5 IP - 10.0.0.255 -Network Broadcast (Standard)
So guys, that's all for today, Thanks for your attention.
I m going to improve my English.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article