AWS Classroom Series – 26/Mar/2021

AWS Networking contd..

  • Creating the network Preview Preview Preview
  • Now Lets add some more properties to vpc Preview Preview
  • Now lets understand the ip address allocation process to the ec2 instance
  • When we create an ec2 instance, a network interface called as Elastic Network Interface (ENI) is created and this ENI recieves a private ip from the cidr range of the subnet.
  • This ENI also recieves the private dns name
  • Now if we want to have a public access then the public ip is created and attached to ENI. Mapping the public ip to private ip is done by AWS
  • This public ip will be from the pool of aws public ip addresses. When you shut down your ec2 instance, private ip remains the same but public ip will be released and you will get a new public ip address on start.
  • We can also make public ip address static by creating Elastic IP Address and attaching it to the network interface Preview
  • Now if we need an access to the internet for the machines in the private subnet Preview
  • NAT server will help in forwarding packets from private network to public network to enable internet connectivity Preview
  • NAT server will have a static public ip address and will be in the public network
  • So in AWS, if we can create a NAT in the public subnet and modify the routes of private subnet to forward the packets to NAT when they want to access internet the problem of internet connectivity to private subnets can be resolved
  • IN AWS we have two options to create NAT Servers
    • NAT-instance:
      • You create ec2 instance in public subnet with NAT ami (IMAGE)
      • IF this ec2 instance goes down your connectivity also goes down
      • cost will be of the ec2 instance
    • NAT-Gateway
      • This is NAT as a service.
      • AWS creates a NAT as a managed service
      • NAT has its pricing Preview
  • Now lets create a NAT Gateway Preview Preview Preview Preview Preview
  • Now lets create one ec2 instance in public subnet and one in private subnet Preview
  • Now lets login into the public ec2 instance and from there into private subnet ec2 instance and then check the ping to google Preview Preview

Leave a Reply

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

About learningthoughtsadmin