Soru

Zorluk: ZorManaging Networking Resources

An organization maintains two Virtual Private Cloud (VPC) networks in Google Cloud: a central network named `hub-vpc` and a workload network named `spoke-vpc`. The two networks are connected using VPC Network Peering via a peering connection named `peering-hub-to-spoke` created on `hub-vpc`. The workload team recently added custom static routes in `spoke-vpc` and enabled custom route exporting on their peering end. However, virtual machines in `hub-vpc` cannot route traffic to those custom destinations because `hub-vpc` is not receiving the advertised routes. Which `gcloud` command should the cloud engineer execute to configure `hub-vpc` to receive the exported custom routes from `spoke-vpc`?

  1. gcloud compute networks peerings update peering-hub-to-spoke --network=hub-vpc --import-custom-routesCevap
  2. B
    gcloud compute networks peerings update peering-hub-to-spoke --network=hub-vpc --export-custom-routes
  3. C
    gcloud compute routes create peering-route --network=hub-vpc --next-hop-peering=peering-hub-to-spoke
  4. D
    gcloud compute networks update hub-vpc --peering-route-exchange=enable-import

Cevap

The correct action is to execute `gcloud compute networks peerings update peering-hub-to-spoke --network=hub-vpc --import-custom-routes`.
In Google Cloud VPC Network Peering, custom route exchange is bi-directional but independently controlled. For `hub-vpc` to receive custom routes from `spoke-vpc`, the peering connection on `spoke-vpc` must have custom route exporting enabled, and the peering connection on `hub-vpc` (`peering-hub-to-spoke`) must have custom route importing enabled via `gcloud compute networks peerings update peering-hub-to-spoke --network=hub-vpc --import-custom-routes`.

Adım Adım Çözüm

1
Identify the VPC Network Peering route exchange requirement
Recognize that for custom static or dynamic routes to cross a VPC peering boundary, the sending VPC peering end must export custom routes and the receiving VPC peering end must import custom routes.
VPC Network Peering does not automatically import custom routes by default even if the peer VPC is exporting them.
2
Determine the required command context and target flags
Identify that the configuration must be applied to the peering connection named `peering-hub-to-spoke` located on `--network=hub-vpc` using the `--import-custom-routes` flag.
The receiving network (`hub-vpc`) must explicitly set its peering configuration to import incoming custom routes.
3
Validate `gcloud` CLI syntax for network peerings
Select `gcloud compute networks peerings update peering-hub-to-spoke --network=hub-vpc --import-custom-routes`.
This is the precise GCP CLI command structure required to update peering configuration properties.

Anahtar Kavram

VPC Network Peering Custom Route Exchange
Bu soruyu puanla