Google Professional Cloud Network Engineer Question 238
Select 2Google Cloud PlatformYou are designing a Google Cloud VPC for a multi-tier web application. The application includes a front-end service in a public subnet and a backend database in a private subnet. To ensure secure and efficient communication between the front-end service and the database, you need to configure VPC routing. Which of the following steps are required to achieve this configuration?
- A
Create a custom route that allows traffic from the public subnet to the private subnet.
- B
Ensure that the subnets are part of the same VPC network.
- C
Configure firewall rules to permit traffic between the subnets.
- D
Enable VPC peering between the public and private subnets.
- E
Assign a static external IP address to the database.
Show answer and explanation
Correct answers: B, C
Explanation
To enable secure and efficient communication between subnets in a single VPC, ensure that both subnets belong to the same VPC network and configure firewall rules to allow the necessary traffic. Google Cloud automatically handles routing between subnets in the same VPC, so custom routes and VPC peering are not required.
- A. Incorrect.
Creating a custom route is unnecessary in this scenario because Google Cloud automatically creates routes between subnets in the same VPC.
- B. Correct.
Subnets in the same VPC network automatically have connectivity, but they need to be part of the same VPC for this to work.
- C. Correct.
Firewall rules are required to permit traffic between subnets, as they define what traffic is allowed or denied.
- D. Incorrect.
VPC peering is not needed here because both subnets reside within the same VPC. VPC peering is used to connect different VPC networks.
- E. Incorrect.
Assigning a static external IP address to the database is not necessary and would expose the database to the internet, which goes against the secure design principles.