This page describes how to configure NCC Gateway advertised routes. Each NCC Gateway advertised route is installed in the route table of the Network Connectivity Center hub to which the NCC Gateway spoke is connected. The NCC Gateway itself is the next hop for each route that it advertises. NCC Gateway advertised routes follow standard best path selection modes when it comes to priority.
NCC Gateway advertised routes provide paths that resources in other spokes of the hub use to send packets to the corresponding NCC Gateway.
Create NCC Gateway advertised routes
To create routes for traffic from the VPC networks to the NCC Gateway, follow these steps:
gcloud
Use the gcloud beta network-connectivity spokes gateways advertised-routes create
command:
gcloud beta 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 route.PRIORITY
: the priority for the advertised route. The default value is 0
API
Use the
projects.locations.spokes.gatewayAdvertisedRoutes
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
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.
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 an advertised route
You can delete an NCC Gateway advertised route by following these steps:
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 Network Connectivity Center.
- To get details about API and Google Cloud CLI commands, see APIs and reference.