What is VPC
Take a small piece of AWS network and call it your own, control IP address ranges, routing patterns, tighten security etc.
AWS definition: “Amazon VPC lets you provision a logically isolated section of the Amazon Web Services (AWS) cloud where you can launch AWS resources in a virtual network that you define.”
Every account has a default VPC in every region. Your resources are created in this default VPC.
What is VPC Peering
VPC Peering: IPV4 or IPV6 traffic routes between VPCs created to establish communication between one or more multiple VPCs.
AWS definition: “A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. Instances in either VPC can communicate with each other as if they are within the same network. “
- Through VPC Peering, traffic stays within the AWS network and not go over the internet.
- Non-overlapping CIDRs – The 2 VPCs you are trying to peer, must have a mutually exclusive set of IP ranges.
- Transitive VPC Peering – not allowed i.e
To understand what is transitive peering, Please refer to the following image.
(If VPC A & B have peered and VPC A & C have peered, VPC B & C cannot share contents until there is an exclusive peering done between VPC B & C)
As mentioned earlier VPC peering can be done to another region or another account as well.
There are two VPCs isolated by default ( as it supposed to be ) but with a help of this peering connection, we are going to allow Traffic between these two VPCs.
There are multiple possibilities and scenarios when it comes to VPC peering in AWS.
- You can connect two VPCs in two different AWS account
- You can establish peering relationships between VPCs across different AWS Regions (also called Inter-Region VPC Peering).
- You can connect two or more number of VPCs together
- One, two or multiple VPCs peered together.
For this article, we are going to take the simple VPC peering within the same AWS account.
Ref:
https://www.middlewareinventory.com/blog/aws-vpc-peering-tutorial/

No comments:
Post a Comment