Thursday, June 22, 2023

VPC

  1. It is an isolated network and Unique in the cloud.
  2. VPC is Region specific.
  3. Every Region has one default VPC. but do not delete this default VPC. Not able to do the task in that particular Region if we delete Default VPC.
  4. Suppose if we accidentally delete this VPC, we will create support case to AWS people.
  5. VPC is free of cost.
  6. we will create 5 VPC’s per Region (in AWS free-tier account ).We can create n Number of VPC in licenced account(in real time)
  7. VPC has a CIDR notation ==>> /16.
Internet Gateway (IGW) :
an Internet Gateway (IGW) is a horizontally scalable, highly available, and redundant virtual appliance that serves as the entry and exit point for network traffic to and from a Virtual Private Cloud (VPC).
  1. It is the gateway to all end-users to access application.
  2. IGW is the Region specific.
  3. Every Region has one default IGW, do not delete this default one, you are not able to do the things in this Region, if we delete this default one ..
  4. Internet gateway is the free of cost.
  5. IGW also has a CIDR notation is 0.0.0.0/0 (0.0.0.0/0 means anybody can access this application)
  6. We will create multiple IGW under one VPC. By default it is Detached status only.
  7. Internetgatway is Attached (Changed to Attached status) to VPC and Routing Tables.
Subnets :
A Subnet is a range of IP addresses within the VPC's IP address space. Subnets are used to divide the VPC's IP address range into smaller, manageable segments. Each Subnet represents a portion of the VPC's address space that can be assigned to specific resources within the VPC.
  1. It is a smaller network inside VPC.
  2. We will create multiple Subnets under one VPC.
  3. Subnets are Availability Zone specific.
  4. Subnets are also having CIDR notation ==>> /24
  5. Subnets are free of cost.
  6. Subnets are Attached to Routing Tables.
  7. Every Region has multiple Subnets.
  8. every Region has default Subnets, we do not delete this Default one.
Routing Tables : 
A Routing table is a logical construct that controls the traffic flow between subnets within the VPC and the internet. A Routing table contains a set of rules, called routes, that determine where network traffic is directed.
  1. It is virtual router in the cloud.
  2. The main purpose of Routing tables is to communicate with the different Networks.
  3. Routing tables are Region specific.
  4. Routing tables are free of cost.
  5. Every Region has one default Routing table ==>>> do not delete this.
  6. whenever we create a VPC then automatically AWS implicitly creates a Routing table that is called Main Routing table.
  7. we will also create our own Routing tables this is called Custom Routing tables.
  8. Routing tables are attached to internet gateway and Subnets.
Security Group :
  1. it is a virtual firewall at ec2 instance level.
  2. It contains set of Rules ( ssh , http ,https , mysql ,alltraffic...etc) every Rule/Application are their OWN port number
  3. In Security Group the Source having 3 fields
    1. Anywhere;   it is used in Freeware
    2.  Custom: In Real time
    3.  My IP: not used in specific
  4. Security Groups are Region specific.
  5. Security Groups are free of cost.
  6. Every Region has one default Security Group but do not delete this.
  7. Security Groups has Inboundrules and Outboundrules.
VPC Peering : 
A VPC peering connection is a Networking connection that allows you to route traffic between two VPCs using private IPv4 or IPv6 addresses.
Note : VPC Peering is not supported for Transitive Peering
VPC peering will be doing in 3 ways.
  1. same region.
  2. different region.
  3. different AWS accounts / cross AWS accounts.
VPC peering thumbrule :
  • Both VPC ‘s CIDR notations should not be collide to each other.
  • VPC peering not supported transitive (but supported same sequence network peering) peering.
    • Eg : vpc1 connect to vpc2 connect to vpc3 connect to vpc4 supported same sequence.
    • Eg : vpc1 connect to vpc5 connect to vpc3 connect to vpc7 Not supported Transitive order.
    • Here vpc1 should not communicate with vpc3
    • Here vpc2 should not communicate with vpc4
  • In VPC peering, we are only decided to specify who is the requester and accepter 
  • key point : Both VPC CIDR notations are interchanged in both main routing tables..
Then these two VPC 's in between VPC peering connection established.

* Qus :- Difference Between Default Routing Table , Main Routing Table and Custom Routing Table ?
Default Routing Table :- Whenever we create a AWS account, by Default one Routing table is created that is called Default Routing Table.
Main Routing Table :- Whenever we Create VPC,  by default AWS created one Routing Table for every VPC that is called Main Routing Table.
Custom Routing Table:- Whenever we create our own Routing table that is called Custom Routing table

How many VPC peering connections would be needed for a full mesh connectivity between all VPCs in an account?
Simple formula: n*(n-1)/2 where n = number of VPCs to be peered.
e.g. four VPCs full mesh connectivity would need 4*(4-1)/2 = 6 peering connections.


No comments:

Post a Comment

Thread

Native Thread Demon Thread Non-Demon Thread Native Thread: - Any Method/Thread which is mapped to OS is called Native Thread or Method. Demo...