Thursday, April 23, 2026
Cohort 3 | Project CloudIgnite Topics: IP Addressing & CIDR Blocks, Elastic IP, VPC Fundamentals Duration: ~3 hours
CLF-C02 Relevance: Sections marked with 🎯 are directly relevant to the AWS Certified Cloud Practitioner exam.
Key Takeaways
- Private IP ranges (RFC 1918):
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16— use only these in VPC - Elastic IP: static public IP that persists across stop/start; charged when allocated but not associated
- CIDR formula: total addresses = 2^(32 - mask_bit); AWS reserves 5 per subnet
- VPC components: CIDR block, subnet, route table, Internet Gateway, Security Group, NACL
- Security Group vs NACL: instance-level/stateful vs subnet-level/stateless
- Lab 261: Troubleshoot missing public IP; Lab 262: Elastic IP demonstration
Table of Contents
- IP Addressing & CIDR Blocks
- Lab 261 — Public vs. Private IP Addresses (Troubleshooting)
- Lab 262 — Elastic IP Address
- VPC (Virtual Private Cloud) Fundamentals
- CIDR Block Calculation Practice
- Key Takeaways & Exam Tips
1. IP Addressing & CIDR Blocks
🎯 Private IP Ranges (RFC 1918)
These are the only valid IP ranges for use inside a VPC:
| Range | CIDR Notation |
|---|---|
10.0.0.0 | /8 |
172.16.0.0 | /12 |
192.168.0.0 | /16 |
Other Reserved IP Ranges (Do NOT use in VPC)
| Range | Purpose |
|---|---|
127.0.0.0/8 | Loopback |
169.254.0.0/16 | Link-local |
100.64.0.0/10 | CGNAT |
224.0.0.0/4 | Multicast |
Rule: Everything outside the private/reserved ranges is publicly routable — already assigned to organizations. Using public IP ranges inside a VPC causes conflicting routing (traffic may be misdirected to the real public owner of that IP).
What is a CIDR Block?
- An IP address combined with a mask bit (e.g.,
10.0.0.0/16) - The mask bit (slash number) defines how many bits are fixed (network portion)
- The remaining bits are flexible (host portion — used for your devices)
- Formula: Available addresses =
2^(32 - mask_bit) - AWS allows VPC CIDR mask bits from /16 (largest) to /28 (smallest)
2. Lab 261 — Public vs. Private IP Addresses (Troubleshooting)
Scenario
A customer has two EC2 instances (Instance A & Instance B) in the same VPC and same public subnet, same configuration. Instance B can reach the internet; Instance A cannot.
Troubleshooting Methodology (OSI-based)
Work top-down or bottom-up through the network layers:
| Layer (AWS context) | Component | Scope |
|---|---|---|
| L1 — Physical | Region & Availability Zone | Affects all instances |
| L2/L3 — Network | Route Tables, Internet Gateway, Subnet | Affects all instances in subnet |
| L4 — Transport | Security Groups (per-instance firewall), NACLs | Per-instance (SG) or per-subnet (NACL) |
| L7 — Application | Web server / App config | Per-instance |
Key diagnostic logic:
- If the problem were at Layer 1–3 (region, subnet, route table, IGW), both instances would fail — not just one.
- Since only Instance A fails, the issue is at the instance level → Security Group or IP configuration.
Root Cause Found
Instance A has no Public IP address assigned. Without a public IP, it cannot be reached from the internet.
- Private IP → accessible only within the VPC
- Public IP → required for internet access (inbound/outbound)
- Attempting to SSH/connect using a private IP from outside the VPC will time out
Customer Query: Using 12.0.0.0/16 for a VPC
Answer: Do NOT use this range.
12.x.x.xis a publicly routable IP range — not in the private ranges list.- Using it causes conflicting routing: requests may be directed to the real public owner of that IP instead of your EC2 instance.
- Always use
10.x,172.16–31.x, or192.168.x.xfor VPC CIDR blocks.
3. Lab 262 — Elastic IP Address
Scenario
A customer's EC2 instance has a public IP that changes every time the instance is stopped and restarted, breaking their application (e.g., DNS no longer resolves correctly).
Why Does the Public IP Change?
- By default, AWS assigns a dynamic public IP (similar to DHCP on a home network).
- When an instance is stopped, its public IP is released.
- When restarted, a new, different public IP is assigned.
- The private IP is retained across stop/start cycles.
Solution: Elastic IP Address 🎯
An Elastic IP (EIP) is a static, persistent public IPv4 address that you own until you release it.
| Behaviour | Dynamic Public IP | Elastic IP |
|---|---|---|
| Changes on stop/start | ✅ Yes | ❌ No |
| Persists when instance stopped | ❌ No | ✅ Yes |
| Free when in use | ✅ | ✅ |
| Charged when not associated | N/A | ✅ (~$3–5/month) |
How to Create & Associate an Elastic IP
- In the AWS Console, go to EC2 → Network & Security → Elastic IPs
- Click Allocate Elastic IP address → choose Amazon's IPv4 pool → Allocate
- Select the new EIP → Actions → Associate Elastic IP address
- Choose your instance and its private IP → Associate
Cost tip: You are charged for an EIP only when it is allocated but NOT associated with a running instance. If associated, there is no charge for the EIP itself (you still pay for the instance).
Lab Steps Summary
- Launch a new EC2 instance (Amazon Linux, t3.micro, Lab VPC, public subnet, auto-assign public IP enabled, Linux SG security group, existing key pair).
- Note the current public IP.
- Stop the instance → observe that the public IP disappears.
- Start the instance → observe a new (different) public IP is assigned.
- Create and associate an Elastic IP.
- Stop and start the instance again → confirm the IP does not change.
4. VPC (Virtual Private Cloud) Fundamentals
🎯 Traditional Network → AWS Equivalents
| Traditional Component | AWS Equivalent |
|---|---|
| Data Center | VPC |
| Router | Route Tables |
| Switch / Subnet | Subnet |
| Firewall | Security Groups & Network ACLs (NACLs) |
| Modem | Internet Gateway (IGW) |
🎯 What is a VPC?
- A logically isolated (not physically isolated) virtual network within AWS.
- Multiple VPCs may share the same underlying physical hardware, but their data is virtually separated.
- Think of it like a LAN in the cloud — your private space to launch resources.
Key VPC Characteristics
- Regional service — a VPC cannot span multiple AWS regions.
- A VPC can span multiple Availability Zones (AZs) within a region.
- Subnets are AZ-specific — each subnet lives in exactly one AZ.
- When you create an AWS account, a default VPC is created automatically.
🎯 Core VPC Components
| Component | Purpose |
|---|---|
| CIDR Block | Defines the IP address range for the VPC |
| Subnet | A subdivision of the VPC's IP range, tied to one AZ |
| Route Table | Tells traffic where to go (e.g., to the internet via IGW) |
| Internet Gateway (IGW) | Entry/exit point between the VPC and the public internet |
| Security Group | Instance-level stateful firewall |
| Network ACL (NACL) | Subnet-level stateless firewall |
| VPC Endpoint | Private connection to AWS services without traversing the internet |
Important: Even if a subnet is "public," EC2 instances in it cannot reach the internet unless an Internet Gateway is attached to the VPC and the route table has a route pointing to it.
VPC Benefits
- Cost-effective — no need to buy physical routers, switches, or cables.
- Secure — logically isolated; you control inbound/outbound rules.
- Scalable — add more CIDR blocks, subnets, or AZs as needed.
5. CIDR Block Calculation Practice
The Formula
Total addresses = 2^(32 - mask_bit)
Usable addresses = Total - 5 (5 IPs reserved per subnet by AWS)
Reserved IPs in Every AWS Subnet (5 total)
| Address | Reserved For |
|---|---|
| First IP (x.x.x.0) | Network address |
| Second IP (x.x.x.1) | VPC router |
| Third IP (x.x.x.2) | AWS DNS |
| Fourth IP (x.x.x.3) | Future use |
| Last IP (x.x.x.255) | Broadcast address |
Worked Examples
| CIDR | Fixed Bits | Free Bits | Total Addresses | Usable |
|---|---|---|---|---|
/16 | 16 | 16 | 65,536 | 65,531 |
/20 | 20 | 12 | 4,096 | 4,091 |
/22 | 22 | 10 | 1,024 | 1,019 |
/26 | 26 | 6 | 64 | 59 |
/28 | 28 | 4 | 16 | 11 |
Example: 10.0.0.0/26
- Fixed bits: 26 → Free bits: 6
- Total: 2⁶ = 64 addresses
- Range:
10.0.0.0→10.0.0.63 - Usable: 64 − 5 = 59 instances
Tip: Use a CIDR Calculator
Search "CIDR calculator" on Google to quickly find:
- Network address, subnet mask
- First & last usable IP
- Total hosts
6. Key Takeaways & Exam Tips
🎯 CLF-C02 Relevant Topics Covered
| Topic | Exam Domain |
|---|---|
| Public vs. Private IP addressing | Cloud Technology & Services |
| VPC concepts (subnets, route tables, IGW) | Cloud Technology & Services |
| Elastic IP Address | Cloud Technology & Services |
| Security Groups vs. NACLs | Security & Compliance |
| VPC as a logically isolated network | Cloud Concepts |
| Benefits of cloud networking (cost, scalability) | Cloud Concepts |
Quick-Reference: Security Group vs. NACL
| Feature | Security Group | Network ACL |
|---|---|---|
| Level | Instance | Subnet |
| Stateful? | ✅ Yes | ❌ No (stateless) |
| Default | Deny all inbound | Allow all |
Common Exam Gotchas
- A stopped EC2 instance loses its public IP — use Elastic IP for persistence.
- Private IPs are retained when an instance is stopped.
- VPCs must use private IP ranges; public ranges cause routing conflicts.
- An Internet Gateway is required even for public subnets to access the internet.
- Security Groups act at the instance level; NACLs act at the subnet level.
- A VPC spans one region but can span multiple AZs.
- Subnets are AZ-specific (one subnet = one AZ).
Notes compiled from April 23, 2026 lecture — AWS/RE:START Cohort 3: Project CloudIgnite. Next session: VPC & Subnet creation lab using CIDR blocks.