VPC
Introduction to VPC
VPC commissions the virtual network dedicated to your AWS account. Once you create your AWS account, you will get one default VPC for every separate region within your account.
In VPC you can define the block of the network. One of the IPs from this network will be used by EC2 so that you can connect with it. We will not discuss much networking concepts on this page, lets keep it for another page.
While creating VPC make sure that whatever the range of private IPs you select, it should have lots and lots of IPs, it will allow you to expand the number of resources in your infrastructure.
Create VPC
Let's do some practice... 😇
Search for VPC Service
Once you open the VPC service you will be able to see a similar page as shown below:
As you see one VPC is available by default, that's what we have discussed before 😉
Now, navigate to the "Your VPC" in the sidebar and click on "Create VPC" on the top right side as shown in the below screenshot:
Once you click on the "Create VPC" you will be asked to fill the name of VPC, IPv4 CIDR block, IPv6 CIDR block (optional), tenancy, and tags.
Name
Here you can keep any name, note: it will create one default tag "Name" with the same value.
IPv4 CIDR Block
You need to pass some value in the IPv4 CIDR block, its better if you keep some big range block which is "10.0.0.0/16", in this red colored value 16 says that the starting 16 bit which is nothing but 10.0 will be treated as a netmask (network address) and remaining 0.0 can be used to assign to resources, this means you get 65,536 different IPs.
CIDR Range | 10.0.0.0/16 |
---|---|
Netmask | 255.255.0.0 |
Wildcard Bits | 0.0.255.255 |
First IP | 10.0.0.0 |
First IP (Decimal) | 167772160 |
Last IP | 10.0.255.255 |
Last IP (Decimal) | 167837695 |
Total Host | 65,536 |
IPv6 CIDR Block
For now, let's leave the IPv6 topic. If you are aware of IPv6 usages then you can click on the "Info" button and get the details.
Tenancy
You can run instances in your VPC on single-tenant, dedicated hardware. Select Dedicated to ensuring that instances launched in this VPC are dedicated tenancy instances, regardless of the tenancy attribute specified at launch. Select Default to ensure that instances launched in this VPC use the tenancy attribute specified at launch.
Tags
You can read more about tags here. You should use them so that you can group all your resources properly.
Once you are happy with all the configured details you can click on the "Create VPC" button.
  Â
So far we have created a new VPC, now we need to create few subnets within the newly created VPC.
Let's check out another page to learn about Subnet.