Day 59/100 || Create Subnets in AWS VPC Part -2 || 100 Days Cloud Challenge || AWS in English ||

CloudFolks HUB English
3 Nov 202325:04

Summary

TLDRIn this video, the presenter walks viewers through the process of creating and configuring subnets within a Virtual Private Cloud (VPC). The script covers key steps, such as selecting availability zones, troubleshooting subnet creation issues, and understanding IP address range allocation. Through relatable examples, such as comparing IP addresses to chocolates, the presenter explains subnetting and demonstrates how to create multiple subnets. The video concludes by introducing the concept of internet gateways and invites viewers to join live classes for deeper learning. A practical guide to VPC setup aimed at simplifying complex networking concepts for beginners.

Takeaways

  • 😀 VPC creation involves setting up IP address ranges and subnets within Availability Zones to ensure high availability.
  • 😀 When creating a subnet, it must be placed inside an Availability Zone. A failure to properly create a subnet in another Availability Zone (like AP South 1B) can occur if the IP address range has been exhausted.
  • 😀 IP address ranges are allocated to subnets, and once a subnet is created, the range is used up, leaving no additional range for further subnets unless additional IP ranges are added to the VPC.
  • 😀 AWS allows you to add up to five IP address ranges to a VPC, which can limit subnet creation if more than five subnets are required.
  • 😀 If you need more subnets than the available IP ranges, you can partition a single IP range into multiple subnets using subnetting, with the help of subnet calculators.
  • 😀 Subnetting can divide a larger IP address range into smaller blocks, allowing for more subnets. Tools like subnet calculators are essential for this process.
  • 😀 When subnetting, the first few IP addresses in a range are reserved for specific AWS purposes, such as the router, DNS, and future use, reducing the number of usable IPs.
  • 😀 AWS requires that public IP addresses be assigned manually to EC2 instances when they are created in private subnets unless the Auto-assign Public IP option is enabled.
  • 😀 If public IP assignment is disabled in a subnet, it must be enabled manually to provide internet access to EC2 instances within that subnet.
  • 😀 Creating a VPC manually means you need to configure all networking components, including Internet Gateways, to allow instances within the VPC to access the internet. This configuration is necessary for external access to EC2 instances.

Q & A

  • Why was the creation of a second subnet in AP-South-1B unsuccessful?

    -The creation of the second subnet in AP-South-1B was unsuccessful because the VPC’s available IP address range (192.168.0.0/24) was already fully allocated to the first subnet in AP-South-1A. The instructor explains that without additional IP ranges, a new subnet cannot be created.

  • What is the analogy used to explain the issue with subnet creation?

    -The instructor uses an analogy involving two children, Misri and Kabir, and a chocolate bar. If one child (Misri) receives the only available chocolate, the second child (Kabir) is left without. This represents how only one subnet can be created if there is only one available IP address range.

  • How can you resolve the issue of running out of IP addresses for creating additional subnets?

    -The issue can be resolved by adding another CIDR block to the VPC, which increases the available IP address range. However, AWS limits you to adding a maximum of five CIDR blocks to a VPC, so this approach works for smaller setups but can be limiting for larger infrastructures.

  • What is the limitation on the number of CIDR blocks that can be added to a VPC in AWS?

    -AWS allows a maximum of five CIDR blocks to be added to a VPC. This limitation can pose problems for larger environments requiring more subnets, especially if the existing range is already exhausted.

  • What is the subnet mask for the subnets created in this example?

    -The subnet mask used in this example is /25. This subnet mask divides the original 192.168.0.0/24 range into two smaller subnets, each with 128 IP addresses.

  • Why does AWS only show 123 usable IP addresses per subnet instead of 126?

    -AWS reserves 3 IP addresses in each subnet for networking purposes: the first IP is reserved for the router (default gateway), the second for DNS, and the third for future use. As a result, 123 IP addresses are available for use out of the 126 that are technically available with a /25 subnet mask.

  • What is the significance of the 'Auto-assign Public IP' setting for EC2 instances in this scenario?

    -The 'Auto-assign Public IP' setting ensures that EC2 instances launched in a subnet are assigned public IP addresses, allowing them to be accessed from the internet. By default, this setting is disabled for custom subnets but can be manually enabled as shown in the video.

  • What was the problem when trying to SSH into the EC2 instances after creation?

    -The problem was that the VPC did not have internet access, which is essential for SSH connections. Without an internet gateway or proper routing, the EC2 instances could not be accessed from external networks, even though they were configured with public IPs.

  • What is the next step required to enable internet access to the VPC?

    -The next step to enable internet access is to configure an Internet Gateway for the VPC. The Internet Gateway will provide the necessary routing to allow EC2 instances to access the internet.

  • How can subnetting help manage IP address allocation in AWS?

    -Subnetting allows you to divide a large IP address range into smaller, more manageable subnets. This helps in efficiently allocating IP addresses across different availability zones and ensuring that there are enough IPs for different resources like EC2 instances, while avoiding conflicts.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This

5.0 / 5 (0 votes)

Related Tags
VPC SetupSubnet CreationAWS TutorialIP AddressingCloud NetworkingHigh AvailabilityCloud InfrastructureSubnettingAWS EC2AWS NetworkingCloud Education