VPC Peering Connection by Cloud Architect (i.e Girish Babu)
This article is primarily intended for AWS Batch 43. For any queries, feel free to contact me at 9036367291.
I'm considering 2 AWS Regions (Virginia & Ohio) for VPC Peering
Step1: Create VPC (10.0.0.0/16) on Virginia (VPC Name: VirginiaVPC)
Step2: Select Virginia VPC --> Goto actions and enable DNS hostnames and save changes.
Step3: Create Public Subnet (10.0.1.0/24) on Virginia VPC
Step4: Select Public Subnet and Ensure to assign Public IP for this Public Subnet
Step5: Create IG and attach it the Virginia VPC.
Step6: Create a Route Table --> Goto to Routes --> edit the routes --> Enter 0.0.0.0/0 and select IG under next drop down.
Step7: Goto the Route table --> go to the subnet associations --> add the subnet, click on save.
Step8: Launch EC2 instances in Virginia region and select the Public subnet.
Step9: Create new SG with the name as Virginia_SG and add inbound rules (ICMP Port, set IP as 10.1.0.0/16) and save the SG.
Please create another VPC & Launch Instance in Ohio region
by following above steps from Step1 to Step9:
Note: VPC Name (OhioVPC - 10.1.0.0/16) & Subnet IP (10.1.0.0/24)
Please repeat above steps (from 1 to 9) in Ohio Region.
Step10: While launching EC2 instance in Ohio Region, Create new SG with the name as Ohio_SG and add inbound rules (ICMP Port, set IP as 10.0.0.0/16) and save the SG.
Step11: Go to the Virginia region VPC services in the AWS console --> click on Peering connections --> Create a peering, select receiver and accepter and add the Ohio region VPC ID.
Step12: Navigate to the Ohio region VPC peering, click on actions, accept the peering
Step13: Goto Virginia RT --> Goto to Routes --> edit the routes --> Enter 10.1.0.0/16 and select target as Peering connection under next drop down.
Step14: Do the same in Ohio region as well, Goto Ohio RT --> Goto to Routes --> edit the routes --> Enter 10.0.0.0/16 and select target as Peering connection under next drop down.
That's it...Wowsa!!!!!!
VPC peering is done. Now it's time to do Peering testing.
Step15: Connect to your Virginia EC2 instance and Ping IP address of Ohio EC2
instance.
Step16: Connect to your Ohio EC2 instance and Ping IP address of Virginia EC2 instance.
Note: If it's Windows Instance -- Then RDP it to and Ping another Peered Instance IP from CMD
Below screenshot is for you're kind reference (This is Linux Instance).
Happy Learning guys....!!!! Cheers...!!!
Comments
Post a Comment