Content

                                                  Content How to create an AWS free Account? Lab 1: To launch amazon Linux EC2 instance Lab 2: To Connect to the instance from Linux client Operating System Lab 3:To Launch amazon windows instance Lab 4: Installing apache in EC2 instance Lab 5: Installing Nginx in EC2 instance Lab 6: Changing Host Name Lab 7: Creating a user and making as a sudoer Lab 8:Assigning an Elastic ip Lab 9:Creating ebs,attach and detach the volumn to the instance Lab 10:Creating an S3 Bucket and creating cross replication in another region Lab 11:Load Balancer Lab 12:Two instances with Application Load Balancer Lab 13:Launching two instances with load Balancer Lab:14 Creating Own VPC  Lab 15: Two instances which classic load Balance with own VPC Lab 16:Two instances with Application load Balancer with own VPC Lab 17: Relational Data B...

Lab 14:Creating Own VPC

                                                             Lab 14:Creating Own VPC 




What is vpc ?Why we use it?

vpc is a virtual network where you can launch your aws resourses /ec2 instances in vpc by using private ip address you can create your own ip/ network in vpc in aws account every region will have default vpc in each region we can create 5 vpc's in some enterprises its not at all recommended to use default vpc for security purpose its better to create our own vpc.

CIDR block-when you create a vpc you you must specify a range of ipv4 adresses for the vpc in the form  of a classless inter –domain routing(CIDR)block. for eg-10.0.0.0/16

Some keywords releated vpc:

1.       Subnets

2.       Route stable

3.       IGW

4.       Nat gateway

Subnets : subnet is a part in vpc which will divide virtually in vpc.in vpc subnets will be created availability zone wise for high availability purpose. Subnets will be like public and private.

Public subnet-bastion,jump server,load balancer,reverse prioxy

Private subnet-application servers->tomcat,jboss,sap,weblogic,etc..and data bases.

If we want to connect web server via internet we have to go from public sub net only.

IGW:Internet gateway->to connect from internet to public subnet we will use igw in vpc

NAT gateway:(Public subnet) but it is used for private subnet purpose .

Route table :Adding public subnet with IGW,adding private subnet with NAT gw.

Steps to create VPN:

Step 1: Create your VPC

Go to VPC dashboard then click on Create vpc


 Then Enter VPC name and CIDR block  and then Click on Create



 Step 2: Create  subnet public and private

After creating the public subnet go to action and Enable modify auto assign ip setting

Click on create subnet


Then give public subnet name,select your VPC and select availability Zone Hen give CIDR block

 

Then click on Create

After creating the public subnet go to the action  Yes and Enable Modify Auto assign Ip a s Enable

 

Step 3:Create Private subnet as public  subnet

 

Step 4:Create IGW and attach to Vpc

Go to IGW dashboard and click on Create IGW

 


Then attach this created IGW to VPC.

Select this IGW go to Action attach to vpc

 

Step 5: Create NAT gateway

 


Select Subnet and give public subnet ip and for elastic ip select create new ip and click on create

Step 6:Create the route table one is for public and associate route table to public subnet and need to add IGW also.Another is for private subnet and associate to private subnet and you need to nat gateway as well.

Public roue table:

Go to route table dashboard select to create route table for public subnet and then click on create .

 

After create for Public click on associate subnet to Associate public subnet to public route table .

 




After associating come to route edit and add IGW.

 

After this do same private route table.

Create route table for private

 

After this associate with private subnet

 

And then Edit route and add NAT gateway.


Comments

Popular posts from this blog

Lab 21:Installing docker in instance and build an image

Lab 22:Pushing a docker image to docker hub

Lab 5: Installing Nginx in EC2 instance