This page describes how to view VPC route tables. This page assumes that you are familiar with how to list routes for a VPC network.
List and describe routes in a VPC spoke
You can use the Google Cloud CLI or the API to list and view details about the following types of routes:
- System-generated default routes
- Subnet routes
- Peering subnet routes
- Network Connectivity Center subnet routes
- Static routes
Neither the gcloud CLI commands nor the API methods show the following types of routes:
To see the complete route view, use the Google Cloud console. To list and describe policy-based routes, see Use policy-based routes.
Console
In the Google Cloud console, go to the Routes page.
On the Effective routes tab, do the following:
- Choose a VPC network.
- Choose a region.
Click View.
You can filter on properties including route type, destination IP range, and next hop type.
Optional: Click the Show suppressed routes toggle to the on position to view routes that are suppressed. To view the reason why a route is suppressed, point to the icon in the Status column.
gcloud
To list and view details for subnet routes
and static routes, use the gcloud compute
routes
commands. These commands don't
show other types of routes. To see all routes, use the Google Cloud console.
To list routes, do the following:
gcloud compute routes list \ --filter="network=NETWORK_NAME" \ --project=PROJECT_ID
To get details for a route, do the following:
gcloud compute routes describe ROUTE_NAME \ --format="flattened()" \ --project=PROJECT_ID
Replace the following:
NETWORK_NAME
: the name of the VPC network.PROJECT_ID
: the project ID that contains your VPC network.ROUTE_NAME
: the name of the route.
API
To list and view details for subnet routes and static routes, use the routes.list and routes.get methods. These methods don't show other types of routes. To see all routes, use the Google Cloud console.
To list routes, do the following:
GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/routes?filter=network="NETWORK_URL
To get details for a route, do the following:
GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/routes/ROUTE_NAME
Replace the following:
PROJECT_ID
: the project ID that contains your VPC network.NETWORK_URL
: the URL of the VPC network.ROUTE_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.