Create and manage NCC Gateway advertised routes

This page describes how to configure NCC Gateway advertised routes. Each NCC Gateway advertised route is installed in each region of the NCC hub route table with a next hop being the NCC Gateway spoke. The standard best path selection mode determines the priority of each NCC Gateway advertised route. NCC Gateway advertised routes provide paths that resources in other spokes of the hub use to send packets to the corresponding NCC Gateway.

When you configure a gateway advertised route in the gateway spoke, this route is not propagated to the NCC hub route table until there is an active SSE gateway.

Create NCC Gateway advertised routes

To create routes for traffic from the VPC networks to the NCC Gateway, do the following.

Console

  1. In the Google Cloud console, go to the Network Connectivity Center page.

    Go to Network Connectivity Center

  2. In the project menu, select a project in which you want to create the spoke.

  3. Click the Spokes tab.

  4. On the Spokes page, click the spoke for which you want to add NCC Gateway advertised routes.

  5. On the Spoke details page, in the Routes advertised from NCC Gateway to hub section, click Add routes.

  6. In the Add routes dialog, do the following:

    • In the Route name field, enter a name for the route.
    • In the IP range field, enter the destination IP address range of the NCC Gateway advertised route.
    • In the Priority field, enter the priority for the advertised route. The default value is 0.
  7. To add more routes, click Add route and enter the information in the previous step.

  8. Click Create.

gcloud

Use the gcloud network-connectivity spokes gateways advertised-routes create command:

gcloud network-connectivity spokes gateways advertised-routes create ROUTE_NAME \
    --region=REGION \
    --project=PROJECT \
    --spoke=SPOKE_NAME \
    --ip-range=IP_RANGE \
    --priority=PRIORITY \
    --advertise-to-hub

Replace the following:

  • ROUTE_NAME: the name for the NCC Gateway advertised route that you want to create
  • REGION: the region that contains the NCC Gateway
  • PROJECT: the ID of the project that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke
  • IP_RANGE: the destination IP address range of the NCC Gateway advertised route
  • PRIORITY: the priority for the advertised route. The default value is 0

API

Use the projects.locations.spokes.gatewayAdvertisedRoutes.create method with the IP address range and priority specified:

POST https://networkconnectivity.googleapis.com/v1beta/projects/PROJECT/locations/REGION/spokes/SPOKE_NAME/gatewayAdvertisedRoutes
{
"ip_range": "IP_RANGE",
"priority": "PRIORITY",
"recipient": "ADVERTISE_TO_HUB",
}

Replace the following:

  • PROJECT: the ID of the project that contains the NCC Gateway
  • REGION: the region that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke
  • IP_RANGE: the destination IP address range of the NCC Gateway advertised route.
  • PRIORITY: the priority for the advertised route. The default value is 0

Update gateway advertised routes

The only attribute that you can change on an existing NCC Gateway advertised route is its priority. To change the priority of an advertised route, follow these steps.

API

Use the projects.locations.spokes.gatewayAdvertisedRoutes.patch method:

POST https://networkconnectivity.googleapis.com/v1beta/projects/PROJECT/locations/REGION/spokes/SPOKE_NAME/gatewayAdvertisedRoutes/ROUTE_NAME
{
"priority": PRIORITY
}

Replace the following:

  • PROJECT: the ID of the project that contains the NCC Gateway
  • REGION: the region that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke
  • ROUTE_NAME: the name of the NCC Gateway advertised route
  • PRIORITY: the new priority for the advertised route

Get details of a gateway advertised route

You can get details of an NCC Gateway advertised route by following these steps:

gcloud

Use the gcloud beta network-connectivity spokes gateways advertised-routes describe command:

gcloud beta network-connectivity spokes gateways advertised-routes describe ROUTE_NAME \
    --region=REGION \
    --project=PROJECT \
    --spoke=SPOKE_NAME

Replace the following:

  • ROUTE_NAME: the name of the NCC Gateway advertised route
  • REGION: the region that contains the NCC Gateway
  • PROJECT: the ID of the project that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke

API

Use the projects.locations.spokes.gatewayAdvertisedRoutes.get method with an empty request body:

GET https://networkconnectivity.googleapis.com/v1beta/projects/PROJECT/regions/REGION/spokes/SPOKE_NAME/gatewayAdvertisedRoutes/ROUTE_NAME

Replace the following:

  • PROJECT: the ID of the project that contains the NCC Gateway
  • REGION: the region that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke
  • ROUTE_NAME: the name of the NCC Gateway advertised route

View a list of gateway advertised routes

You can view a list of NCC Gateway advertised routes by following these steps.

Console

  1. In the Google Cloud console, go to the Network Connectivity Center page.

    Go to Network Connectivity Center

  2. In the project menu, select the project the spoke resides in.

  3. In the Spoke name column, click the NCC Gateway spoke for which you want to view the gateway advertised route.

  4. The Spoke details page lists Routes advertised from NCC Gateway to hub.

gcloud

Use the gcloud beta network-connectivity spokes gateways advertised-routes list command:

gcloud beta network-connectivity spokes gateways advertised-routes list \
    --region=REGION \
    --project=PROJECT \
    --spoke=SPOKE_NAME

Replace the following:

  • REGION: the region that contains the NCC Gateway
  • PROJECT: the ID of the project that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke

API

Use the projects.locations.spokes.gatewayAdvertisedRoutes.list method with an empty request body:

LIST https://networkconnectivity.googleapis.com/v1beta/projects/PROJECT/regions/REGION/spokes/SPOKE_NAME/gatewayAdvertisedRoutes

Replace the following:

  • PROJECT: the ID of the project that contains the NCC Gateway
  • REGION: the region that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke

Delete a gateway advertised route

You can delete an NCC Gateway advertised route by following these steps.

Console

  1. In the Google Cloud console, go to the Network Connectivity Center page.

    Go to Network Connectivity Center

  2. In the project menu, select a project in which you want to create the spoke.

  3. Click the Spokes tab.

  4. On the Spokes page, click the spoke for which you want to add NCC Gateway advertised routes.

  5. On the Spoke details page, in the Routes advertised from NCC Gateway to hub section, click the routes that you want to delete.

  6. Click Delete routes.

gcloud

Use the gcloud beta network-connectivity spokes gateways advertised-routes delete command:

gcloud beta network-connectivity spokes gateways advertised-routes delete ROUTE_NAME \
  --region=REGION \
  --project=PROJECT \
  --spoke=SPOKE_NAME

Replace the following:

  • ROUTE_NAME: the name of the NCC Gateway advertised route that you want to delete
  • REGION: the region that contains the NCC Gateway
  • PROJECT: the ID of the project that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke

API

Use the projects.locations.spokes.gatewayAdvertisedRoutes.delete method with an empty request body:

DELETE https://networkconnectivity.googleapis.com/v1beta/projects/PROJECT/regions/REGION/spokes/SPOKE_NAME/gatewayAdvertisedRoutes/ROUTE_NAME

Replace the following:

  • PROJECT: the ID of the project that contains the NCC Gateway
  • REGION: the region that contains the NCC Gateway
  • SPOKE_NAME: the name of the gateway spoke
  • ROUTE_NAME: the name of the NCC Gateway advertised route that you want to delete

What's next