Tuesday, September 24, 2024

AWS - VPC

 


Basic Networks:

IPv4 is connectless protocol that use multi packet routing to break data into smaller blocks to send across the internet.  IPv4 is a series of of four eight-bit-binary numbers separated by a decimal point. 

IPv4 has a different type of classes:

Class A - Address range [1 to 126] - Subnetmasking [255.0.0.0] - Used for large number of hosts
Class B - Address range [128 to 191] - Subnetmasking [255.255.0.0] - Used for medium size network
Class C - Address range [192 to 223] - Subnetmasking [255.255.255.0] - Used for local area network
Class D - Address range [224 to 239] - NA - Reserve for multi tasking
Class E - Address range [240 to 254] - NA - This is class is reserved for research and development purpose. 

The RFC1918 address is an IP address that is assigned by an enterprise organization to an Internal host, these IP address are used in private networks which is not available or reachable from internet.

10.0.0.0 - 10.255.255.255 [10/8 prefix]
172.16.0.0 - 172.31.255.255 [172.16/12 prefix]
192.168.0.0 - 192.168.255.255 [192.168/16 prefix]

We cannot use of first four ip address and last IP address in the network segments. It will be reserve to use for it.

Example:

Network segment of 172.31.0.0

172.31.0.1 - Reserved by AWS for the VPC router.
172.31.0.2 - Reserved by AWS for DNS server
172.31.0.3 - Reserved for the future use.
172.31.0.255 - Network broadcast address. We don't support the broadcast in a VPC, therefore we reserve this address.

Creating the VPC network:

Login into AWS console and navigate into VPC.

1)      Select the VPC only option.



We will get a more network option while selecting the VPC and more option. It will display the availability zone along with network CIDR.

2)      Select the IPv4 CIDR manual input in the IPv4 CIDR block section.



If there is an Amazon VPC IP address Manager (IPAM) address pool available in this region, you can get a CIDR from an IPAM pool. If you select an IPAM pool, the size of CIDR is limited by the allocation rules on the IPAM pool. The same will be applicable for IPv6 as well.

3)      Select a default zone, we can specific a different Tenant as well.



4)      Create a tag for grouping purpose and click on create VPC button.



We need to create a sub netmask according your requirement and mapped into VPC.

Click on subnet from the VPC dashboard.


Click on create subnet button and select the VPC which you want to create a sub netmask.



Define a subnet name and availability zone as per your requirement.



I can able to get 11 number of IP address as per my sub netmask and 5 IP address goes for reservation.


We need to create a internet gateway incase of access this machine from your system or outside world.

Creating an Internet Gateway:

Navigate into Internet gateway from left hand side of the VPC dashboard and clicked create Internet gateway button.





No comments:

Post a Comment