This page describes how to use hub route tables and routes.
List hub route tables
To get a list of hub route tables, follow these steps.
gcloud
Run the
gcloud network-connectivity hubs route-tables list
command.
gcloud network-connectivity hubs route-tables list \ --hub=HUB_NAME
Replace HUB_NAME
with the name of the hub in your project
that you want to list the route table for.
API
Use the
networkconnectivity.hubs.routeTables.list
method with an empty request body.
GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables
Replace the following values:
PROJECT_ID
: the project ID of the project that contains the hubHUB_NAME
: the name of the hub for which you want to list the hub route table
View hub route tables
To view details, such as name and description of a Network Connectivity Center route table, follow these steps.
gcloud
Run the
gcloud network-connectivity hubs route-tables describe
command.
gcloud network-connectivity hubs route-tables describe NAME \ --hub=HUB_NAME
Replace the following:
NAME
: the name of the hub route tableHUB_NAME
: the name of the hub for which you want to view the hub route table
API
Use the
networkconnectivity.hubs.routeTables.get
method with an empty request body.
GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables/NAME
Replace the following values:
PROJECT_ID
: the project ID of the project that contains the new hubHUB_NAME
: the name of the hub for which you want to view the hub route tableNAME
: the name of the hub route table resource
Manage hub routes
A route resource nested under the hub route table corresponds to a subnet in a VPC spoke that has been exported from the VPC network to the hub. Only VPC spokes have routes.
List hub routes
To see a list of hub routes, follow these steps.
gcloud
Run the
gcloud network-connectivity hubs route-tables routes list
command.
gcloud network-connectivity hubs route-tables routes list \ --hub=HUB_NAME \ --route_table=NAME
Replace the following:
HUB_NAME
: the name of the hub, such asmy-hub
NAME
: the name of the hub route table, such asmy-route-table
API
Use the
networkconnectivity.hubs.routeTables.routes.list
method with an empty request body.
GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables/NAME/routes
Replace the following values:
PROJECT_ID
: the project ID of the project that contains the hubHUB_NAME
: the name of the hubNAME
: the name of the hub route table resource
View hub route details
To view the details of a specific hub route, follow these steps.
gcloud
Run the
gcloud network-connectivity hubs route-tables routes describe
command.
gcloud network-connectivity hubs route-tables routes describe \ --hub=HUB_NAME \ --route_table=NAME
Replace the following:
HUB_NAME
: the name of the hub, such asmy-hub
NAME
: the name of the hub route table, such asmy-route-table
API
Use the
networkconnectivity.hubs.routeTables.routes.get
method.
GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables/NAME/routes/ROUTE_NAME
Replace the following values:
PROJECT_ID
: the project ID of the project that contains the new hubHUB_NAME
: the name of the hub for which you want to view the hub route tableNAME
: the name of the hub route table resourceROUTE_NAME
: the name of the route
What's next
- To create hubs and spokes, see Work with hubs and spokes.
- To view a list of partners whose solutions are integrated with Network Connectivity Center, see Network Connectivity Center partners.
- To find solutions for Router appliance issues, see Troubleshooting.
- To get details about API and
gcloud
commands, see APIs and reference.