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
In the Google Cloud console, go to the Network Connectivity Center page.
In the project menu, select a project in which you want to create the spoke.
Click the Spokes tab.
On the Spokes page, click the spoke for which you want to add NCC Gateway advertised routes.
On the Spoke details page, in the Routes advertised from NCC Gateway to hub section, click Add routes.
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.
To add more routes, click Add route and enter the information in the previous step.
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 createREGION: the region that contains the NCC GatewayPROJECT: the ID of the project that contains the NCC GatewaySPOKE_NAME: the name of the gateway spokeIP_RANGE: the destination IP address range of the NCC Gateway advertised routePRIORITY: 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 GatewayREGION: the region that contains the NCC GatewaySPOKE_NAME: the name of the gateway spokeIP_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 GatewayREGION: the region that contains the NCC GatewaySPOKE_NAME: the name of the gateway spokeROUTE_NAME: the name of the NCC Gateway advertised routePRIORITY: 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 routeREGION: the region that contains the NCC GatewayPROJECT: the ID of the project that contains the NCC GatewaySPOKE_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 GatewayREGION: the region that contains the NCC GatewaySPOKE_NAME: the name of the gateway spokeROUTE_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
In the Google Cloud console, go to the Network Connectivity Center page.
In the project menu, select the project the spoke resides in.
In the Spoke name column, click the NCC Gateway spoke for which you want to view the gateway advertised route.
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 GatewayPROJECT: the ID of the project that contains the NCC GatewaySPOKE_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 GatewayREGION: the region that contains the NCC GatewaySPOKE_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
In the Google Cloud console, go to the Network Connectivity Center page.
In the project menu, select a project in which you want to create the spoke.
Click the Spokes tab.
On the Spokes page, click the spoke for which you want to add NCC Gateway advertised routes.
On the Spoke details page, in the Routes advertised from NCC Gateway to hub section, click the routes that you want to delete.
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 deleteREGION: the region that contains the NCC GatewayPROJECT: the ID of the project that contains the NCC GatewaySPOKE_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 GatewayREGION: the region that contains the NCC GatewaySPOKE_NAME: the name of the gateway spokeROUTE_NAME: the name of the NCC Gateway advertised route that you want to delete
What's next
- To learn about NCC Gateway, see NCC Gateway overview.
- To learn how to configure NCC Gateway, see NCC Gateway setup overview.
- To find solutions for common issues, see Troubleshoot NCC.
- To get details about API and Google Cloud CLI commands, see APIs and reference.