#75daysofaws
A virtual private cloud is a virtual network that closely remember our traditional networking that you operate in your own data center with the benefits of using the scalable infrastructure of AWS.
- It is logically isolated from other virtual network in the AWS Cloud.
- Max 5 VPC can be created and 200 subnet in one VPC.
- We can allocate Max 5 elastic IP.
- Once we created VPC →DHCP, NACL and security group will be automatically created.
Components of VPC →
- Implied router and routing table.
- Internet Gateway.
- Network ACL.
- Security groups
- Virtual Private Gateway.
- Peering connections
- elastic IP.
Two types of VPC
Default VPC
- Creating an each AWS Region when an AWS account is created.
- Has default CIDR, security group and ACL and route table setting.
- Has an Internet gateway by default.
Custom VPC
It is VPC Created by AWS Account Owner
- AWS user creating the custom VPC can decide the CIDR
- has its own default security group, network ACL and route tables.
- Does not have its own Internet gateway.
Note → Default VPC have Internet gateway but it is not present in Custom VPC . You have to create it and add it to routing table and define route of Internet.
Steps to create VPC →
- Create VPC
- create subnet.
- Create Internet gateway.
- Create routing table.
Public Subnet
If a subnet’s traffic is routed to an Internet gateway. The subnet is known as public subnet. If you want your instance in a public subnet to communicate with the Internet over IPV4, it must have a public IPV4 address or an Elastic IP address.
Private Subnet
If a subnet does not have a route to the Internet gateway, the subnet is known as private subnet.
Note → when You create a VPC, you must specify IPV4 , CIDR block for VPC the allowed block size in between /16 to /28 network.
The First 4 and a last IP address can’t be assigned
- 10.0.0.0 →Represent the Network ID
- 10.0.0.1 → Reserved by AWS IP address for VPC router
- 10.0.0.2 →Reserved for DNS Server
- 10.0.0.3 → Reserved for future purpose
- 10.0.0.255 → Represent the Broadcast Address
AWS does not support Broadcast in VPC but Reserve this address