AWS VPC Networking: Accessing VPC A and VPC B from VPC C

AWS VPC Networking

Prev Question Next Question

Question

There are currently 3 VPC's. VPC A - CIDR Block - 10.111.0.0/16 There are 14 servers in this VPC in the range 10.111.0.101 - 10.111.0.114 VPC B - CIDR Block - 10.111.2.0/24 There are 16 servers in this VPC in the range 10.111.2.120 - 10.111.2.136 VPC C - 172.31.0.0/16 You need to access VPC A and VPC B from VPC C.

How can you achieve this? Choose 2 answers from the options below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - B and C.

Again here if you use the CIDR calculator, if you add a more specific route of 10.111.0.96/27 for VPC A and 10.111.2.0/24 for VPC B , this would work.

Also note that VPC Peering would be possible from VPC C to VPC B and from VPC C to VPC A.

For more information on VPC Peering, please visit the below URL:

http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/Welcome.html

To access VPC A and VPC B from VPC C, we need to create VPC peering connections between VPC C and VPC A and VPC B.

VPC peering is a network connection between two VPCs that enables communication between instances in the VPCs using private IP addresses. Peering can be established between VPCs in the same account or different accounts.

Option A: Create a peering connection between VPC C and VPC A, and add a route to VPC A's peering connection for 10.111.2.96/28. This means that traffic destined for the IP addresses between 10.111.2.96 and 10.111.2.111 in VPC A will be routed through the peering connection from VPC C. However, this option only allows traffic to the range 10.111.2.96/28 in VPC A, not the entire VPC.

Option B: Create a peering connection between VPC C and VPC A, and add a route to VPC A's peering connection for 10.111.0.96/27. This option allows traffic to the entire range of IP addresses in VPC A (10.111.0.0/16), not just a specific subset of IP addresses.

Option C: Create a peering connection between VPC C and VPC B, and add a route to VPC B's peering connection for 10.111.2.0/24. This option allows traffic to the entire range of IP addresses in VPC B (10.111.2.0/24).

Option D: Changing the CIDR block of VPC B is not a feasible solution as it would affect the existing instances and resources in VPC B and may cause disruption to the application.

Therefore, the correct options to access VPC A and VPC B from VPC C are A and B. By creating VPC peering connections and adding the relevant routes to the route tables in each VPC, communication between the instances in the VPCs can be established.