Create a subnet in Virtual Private Cloud | IndianTechnoEra - IndianTechnoEra
Latest update Android YouTube

Create a subnet in Virtual Private Cloud | IndianTechnoEra

How create a subnet in Virtual Private Cloud? | IndianTechnoEra




Aim: To create a subnet in Virtual Private Cloud.

Procedure:


Creating Subnet

1. Select VPC >> SUBNETS>>Create Subnet



2. Select VPC, Give subnet a name

IPV4 CIDR Block is 10.0.0/24 i. e. 24 bits available for subnet and remaining 8 bits for host IP addresses which is 256 IP address

 




3. Click “Create subnet”.



4. Select newly created subnet by ticking the check box. 





Creating Internet Gateway

  1. Once VPC and subnet are created, we need to connect it to outside word using internet, so need to create internet gateway(IGW). Choose internet gateways from left pane. Already created internet gateways are default gateways. We need to create one for our own PVC. Click “Create Internet Gateway”.





  1. A new page appears. Create a tag or name for your gateway. IN this example, we have given “SD-INTERNET GATEWAY”.



Now you can see this newly created internet gateway on main page along with some other default gateways.




Now we need to connect this IGW with our VPC(as it is still detached and not attached to any VPC as shown in image) so that internet traffic is allowed in and out of VPC.


  1. Tick checkbox against this IGW to select it and open the drop down list named “Actions” to attach this IGW with VPC.

AS You click “Attach to VPC” This page appears.





  1. Select the VPC to which you want to connect this IGW. The one created by us is being shown in the Available VPCs.

Now this is shown as Attached after we attached it to our VPC.





Creating Routing Table

9. Select Route Table from left pane in VPC and click “Create route table”. 




Route table for our VPC is created.




  1. Associate the created route table with our subnet by clicking on “Subnet Associations”.

Go to “Edit Subnet associations and click it.  




  1. Select the subnet created earlier from drop down list to associate it with route table.

The associated subnet status is still shown as “No subnet selected”. Click “Save”.  




Now, the associated subnet is shown here along with route table with which it is associated.


It is shown here on main page that the main route table is associated with subnet explicitly and VPC ID is also shown here.  





12. Now go to Routes to set it for internet traffic.

13.Click on “Add route”. Enter “0.0.0.0/0”. Select Internet gateway created by you from drop down list “Target” and click “Sava Routes”




Route is successfully edited to allow for internet traffic out of VPC.



Now your VPC is available for external communication using internet.






Creating an instance (VM) in subnet of VPC 13.

Go to EC2 to create an instance in VPC  





14. Choose AMI as per your choice



  1. Choose an instance type from free tier only

  1. Select your own created VPC under network category.

  1. Select your own created subnet under Subnet category.  




  1. Enable public IP under Auto-assign public IP category. Click “Next Add storage”

 




19. Change storage size from 8 GB to 30 GB. Click “Next and Tags”




20. Add tags as given here for your instance





  1. In Security Groups, change source to “Anywhere” and Type as “SSH” Or anything on which you want to give permission.




22.Create a new key pair.

Give newly created key pair a name. 





23. Download key pair and Launch Instance.





24.Click on the link created for instance or click on “View instances”





25.Instance is launched here. Give it a name.

26. Instance is given a name “SD Instance”.



Result: subnet in VPC created successfully

Post a Comment

Feel free to ask your query...
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.