VPC Peering: A Walk Through

VPC peering allows you to connect 2 VPCs, much like a VPN tunnel allows for traffic between two sites in traditional, on-prem networking.

We’ll go through the setup for VPC peering…

For our lab setup, there are 2 VPCs- VPC1 and VPC2, which we’ll be peering together.

vpc1.png

Note that the IP address space DOESN’T overlap.

We’ve got 1 subnet in each VPC:

vpc2.png

From the VPC Dashboard, we’ll select Peering Connections > Create Peering Connection.

vpc3.png

We’ll specify VPC1 as our Requestor and VPC2 as the Acceptor. This is more of an important step when the Acceptor VPC is in another account.

vpc4.png

You’ll then see that the Status on the Peering connection is Pending Acceptance.

vpc5.png

Since these are both in the same account, we’ll go to Actions > Accept Request

vpc7.png

After this, the Peering is active. But we still need to create some routes.

vpc8.png

For VPC1’s routing table, we’ll put VPC2’s subnet with the Peering Connection as the target.

vpc9.png

Then, we’ll do the same for VP2:

vpc9_001.png

To test, we’ll launch a Windows 2 Instance in each VPC.

After updating the security groups to allow traffic from the other subnets, we’ll ping to test connectivity.

vpc12.png

And that’s it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s