Question

Difficulty: MediumManaging Networking Resources

A Cloud Engineer is managing a network setup where two Virtual Private Cloud networks, `vpc-analytics` and `vpc-core`, are connected using VPC Network Peering. Custom static routes created in `vpc-analytics` are currently not propagating to virtual machines in `vpc-core`. Which two actions must be taken using `gcloud compute networks peerings` to allow custom static routes to be properly exchanged between these two peered networks? (Select TWO.)

  1. Update the peering connection configuration in `vpc-analytics` to enable the `--export-custom-routes` flag.Answer
  2. Update the peering connection configuration in `vpc-core` to enable the `--import-custom-routes` flag.Answer
  3. C
    Update the peering connection in both VPC networks to set the `--auto-create-subnetworks` flag.
  4. D
    Lower the priority numerical value on default ingress firewall rules to force route propagation across peering boundaries.

Answer

To successfully exchange custom static routes between peered VPC networks, the sending network must update its peering configuration to export custom routes (`--export-custom-routes`), and the receiving network must update its peering configuration to import custom routes (`--import-custom-routes`).
In Google Cloud VPC Network Peering, custom static routes are not shared automatically. Exchanging custom routes requires a two-sided configuration: the peer network originating the routes (`vpc-analytics`) must set `--export-custom-routes`, and the receiving network (`vpc-core`) must set `--import-custom-routes`.

Step-by-Step Solution

1
Identify the routing requirement across VPC Peering
By default, VPC Network Peering exchanges subnet routes, but custom static routes and dynamic routes are not exported or imported unless explicitly configured.
VPC peering routes require bi-directional consent for custom route exchange.
2
Configure route exporting on the source network
Execute `gcloud compute networks peerings update` on `vpc-analytics` specifying `--export-custom-routes`.
The source network must grant permission to send its custom static routes over the peering connection.
3
Configure route importing on the target network
Execute `gcloud compute networks peerings update` on `vpc-core` specifying `--import-custom-routes`.
The destination network must grant permission to receive and insert peer custom static routes into its routing table.

Key Concept

VPC Network Peering Custom Route Exchange
Rate this question