Search This Blog

Wednesday 17 April 2019

Basic Setup for VPC Peering

What is VPC Peering?
 - VPC peering  is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses.

-You can create a VPC peering connection between your own VPCs, or with a VPC in another AWS account.

-The VPCs can be in different regions (also known as an inter-region VPC peering connection).

Setup: VPC Peering Connection

-Create two VPCs :-
-VPC A (CIDR: 10.0.1.0/16) and
-VPC B (CIDR: 10.2.0.0/16).
 -Create subnets for VPCs and also you can edit the routing table if required.

-Go to the “Peering Connections” in the AWS Console


Click on “Create Peering connection” and configure the peering


Here my request is “VPC A”
           my accepter is “VPC B” and
           VPCs are in the same account.
========================================================================You can use different VPC in different AWS account also. After keying all the relevant fields click on “Create Peering Connection”.
======================================================================== After creating the peering connection, you can see “Pending Acceptance” in the status bar,


you can see “Pending Acceptance” in the status bar of the Peering connection.
 Click on “Actions” -----> “Accept Request” ------> “Yes, Accept” -----> “Accept VPC Peering Connection Request” prompt box.

status changing from “Pending” to “Active”.
 Next setup is to make an entry to the VPC route table. In route table select “VPC A” route table, then go to the Routes tab and Edit it.
Click on “Add another route”. In the ‘destination field’ enters the IP of “VPC B” like 10.0.1.0/16 and select the target as “VPC Peering Connection ID” of VPC A to VPC B.


No comments:

Post a Comment