Subnets:
Public Subnet: If a subnets traffic is routed to the internet Gateway
this subnet is known as 'Public Subnet'. If your instance in public subnet and 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'.
- When you create a VPC, you must specify on IPV4 CIDR block for the allowed block size is between /16 to /28 network.
- The first four and last IP address of subnet cannot be assigned.
for eg. 10.0.0.0 - Network Address
10.0.0.1 - Reserved by AWS for the VPC router.
10.0.0.2 - Reserved by AWS the IP address of DNS server.
10.0.0.3 - Reserved for the future use.
10.0.0.255- Broadcast Address.
Note: AWS do not support broadcast in a VPC but reserve the address.
Implied router and Route table:
- It is the central routing function.
- It connects the different AZ together and connects the VPC to the Internet Gateway.
- You can have upto 200 route table per VPC.
- You can have upto 50 route entries per route table.
- Each subnet must be associated with only one route table at any given table.
- If you do not specify a subnet to route table associated, the subnet will be associated with the default VPC route table.
- You can also edit the main route table if you need, you cannot delete main route table.
- However you can make a custom route table manually become the main route table then you can delete the former main as it is no longer a main route table.
- You can associate multiple subnets with the same route table.
NAT Gateway:
- You can use a network address translation gateway to enable instance in a private subnet to connect to the internet or other AWS services but prevent the internet from initiating a connection with these instance.
- You are charged for creating and using a NAT gateway in your account. NAT gateway hourly usage and data processing routes apply Amazon EC2 charges for data transfer also apply.
- To create a NAT gateway you must specify the public subnet in which the NAT gateway should reside.
- You must also Specify on Elastic Ip address to associate with NAT gateway when you create it.
- No need to using public Ip address to your private instance.
- After you have created NAT gateway you must update the route table. And its associated with one or more of your private subnets.To the point Internet bound traffic to the NAT gateways. This enables instance in your private subnet to communicate with the internet.
- Deleting a NAT gateway, disassociate its elastic IP address, but does not release the address from your account.
This comment has been removed by a blog administrator.
ReplyDelete