AWS Classroom Series – 21/Mar/2021

AWS VPC

  • AWS VPC (Virtual Private cloud) enables us to launch the AWS resources in the virtual network. This virtual network resembles the traditional network
  • Concepts:
    • VPC:
      • A virtual network dedicated to our AWS Account in a specific region
      • AWS creates one default vpc in every region Preview Preview Preview
    • subnet: A range of ip addresses (cidr range) scoped to availability zone
      • In the default vpc AWS creates a subnet for every Availability zone
    • Route table: A set of rules called routes that are used to determine where the network traffic is directed
      • When we create a vpc aws automatically adds a default route table with routes to enable traffic b/w all subnets in a vpc
  • Lets create a vpc in the oregon region (us-west-2) Preview
  • the az’s will be
    • subnet1, subnet4 => us-west-2a
    • subnet2, subnet5 => us-west-2b
    • subnet3, subnet6 => us-west-2c
  • Lets create this Preview Preview
  • The successful creation of vpc will lead to a vpc id Preview Preview
  • Now lets try to create subnets Preview Preview Preview Preview Preview
  • Now lets refresh the page and filter the view based on vpc id Preview Preview Preview
  • Now lets look at rules defined by default route table Preview Preview
  • If your network i.e. vpc needs to be connected from internet and if the resource which you create in your vpc needs an internet access we have a component called as internet gateway
  • Internet Gateway attached to your vpc enables communication b/w vpc and the internet
  • Lets create an internet gateway Preview Preview Preview
  • Now we need attach internet gateway to our vpc (vpc can be attached to only one internet gateway) Preview Preview
  • Now the architecture looks as shown below Preview
  • Our vpc is still not connected to internet as there is no route b/w route table and internet gateway
  • So we need to create a route b/w router and internet gateway
  • A route is a rule:
    • Whenever any resource connected this router wants to communicate to internet forward the traffic to internet gateway
  • CIDR notations for:
    • Anywhere: the range should be 0.0.0.0 to 255.255.255.255 and this is expressed as 0.0.0.0/0
    • specific network: 35.25.0.0/16 This means any traffic to/from network with range 35.25.0.0 – 35.25.255.255
    • specific ip address: 35.25.23.43/32 => This means any traffic to/from specific ip address 35.25.23.43
  • Lets create a route to allow traffic to internet (anyip) Preview Preview Preview Preview Preview Preview

Next steps:

  • Lets understand Network interfaces and then create virtual machine in subnets and then verify internet connectivity

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin