Intro to IP Addressing, Subnetting and CIDR Notation for AWS VPCs
Amazon Virtual Private Cloud (VPC) allows you to create isolated networks for your resources in AWS. To effectively design and manage these networks, you need to understand IP addresses , CIDR notation , and subnetting. These concepts are important to understand for allocating resources, controlling traffic, and ensuring scalability.
While you can use online IP subnet calculators, you must also understand what's happening under the hood.
What is an IP Address?
An IP address (Internet Protocol address) is a unique identifier for devices on a network. It allows devices to locate and communicate with each other over the internet or private networks.
Structure of an IP Address
An IPv4 address (commonly used in AWS) is a 32-bit number divided into four octets , separated by dots, in a format called dotted decimal notation. Each octet represents 8 bits, making the total 32 bits (4 x 8).
For example:
192.168.1.1 is an IPv4 address where:
192,168,1, and1are the four octets.- Each octet can range from
0to255(since 8 bits allow 2^8 = 256 possible values).
Example Breakdown of192.168.1.1:
- Convert each octet to binary:
192→11000000168→101010001→000000011→00000001
- Combine these to get the full 32-bit binary address:
11000000.10101000.00000001.00000001
This binary format is essential for subnetting and routing.
What is a Subnet Mask?
A subnet mask defines which portion of an IP address identifies the network and which part identifies the host (the specific device in the network). It helps divide a larger network into smaller subnets.
For example, the subnet mask 255.255.255.0:
255in binary:11111111(all bits are network bits)0in binary:00000000(all bits are host bits)- This means:
- The first 24 bits (`11111111.11111111…
No comments yet. Add the first comment to start the discussion.