Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, descrevemos como usar tabelas e rotas de rota hub.
Quando você cria um hub e o configura para usar a topologia de malha, uma
única tabela de rota de hub padrão é gerada. Com a topologia em estrela
uma tabela de rotas do hub é gerada por grupo.
Permissões exigidas para a tarefa
Para executar esta tarefa, são necessárias as seguintes permissões
ou papéis do IAM.
Permissões
networkconnectivity.hubRouteTables.list para listar tabelas de rotas do hub
networkconnectivity.hubRouteTables.get para ver as tabelas de rotas de hub
Papéis
roles/networkconnectivity.hubAdmin
roles/networkconnectivity.hubViewer
Listar tabelas de rotas do hub
Para ver uma lista das tabelas de rotas de hub, siga estas etapas.
No menu do projeto, selecione o projeto em que você quer ver os detalhes do
hub.
Clique no nome do hub onde você quer acessar a tabela de rotas do hub.
Clique na guia Rotas. Siga estas etapas, dependendo da topologia para a qual
o hub está configurado.
Se você estiver usando a conectividade de topologia de malha, as rotas e os detalhes da rota serão exibidos
na seção Rotas.
Se você estiver usando a conectividade de topologia em estrela, na seção
Rotas, altere o Grupo de spoke
para Centro ou Borda para ver a tabela de rotas apropriada.
GROUP_NAME: o nome do grupo que você quer
ver a tabela de rotas do hub. Para conectividade de topologia de malha,
há um único grupo padrão, para conectividade de topologia em estrela, há um grupo de
centro ou borda.
HUB_NAME: o nome do hub com a tabela de rota de hub que você quer visualizar
GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables/NAME/routes
Substitua os seguintes valores:
PROJECT_ID: o ID do projeto que contém o hub
HUB_NAME: o nome do hub
NAME: o nome do recurso da tabela de rota hub
Ver detalhes da rota hub
Para conferir os detalhes de uma rota de hub específica, como o tipo de rota, o intervalo de endereços IP de destino e o próximo salto, siga estas etapas.
Console
No console do Google Cloud, acesse a página do Network Connectivity Center.
ROUTE_TABLE: o nome da tabela de rota do hub, como
edge-route-table ou center-route-table para conectividade de topologia em estrela
e default-route-table para topologia de malha completa.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-28 UTC."],[],[],null,["# View the hub route table and routes\n\nThis page describes how to use hub route tables and routes.\n\nWhen you create a hub and configure it to use mesh topology, a\nsingle default hub route table is generated. With star topology,\none hub route table *per group* is generated.\n\n#### Permissions required for this task\n\nTo perform this task, you must have been granted the following permissions\n*or* the following IAM roles.\n\n**Permissions**\n\n- `networkconnectivity.hubRouteTables.list` to list hub route tables\n- `networkconnectivity.hubRouteTables.get` to view hub route tables\n\n**Roles**\n\n- `roles/networkconnectivity.hubAdmin`\n- `roles/networkconnectivity.hubViewer`\n\n### List hub route tables\n\nTo get a list of hub route tables, follow these steps. \n\n### gcloud\n\nRun the\n[`gcloud network-connectivity hubs route-tables list` command](/sdk/gcloud/reference/network-connectivity/hubs/route-tables/list). \n\n```\ngcloud network-connectivity hubs route-tables list \\\n --hub=HUB_NAME\n```\n\nReplace \u003cvar translate=\"no\"\u003eHUB_NAME\u003c/var\u003ewith the name of the hub in your project\nthat you want to list the route table for.\n\n### API\n\nUse the\n[`networkconnectivity.hubs.routeTables.list` method](/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.routeTables/list) with an empty request body. \n\n```\n GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables\n```\n\nReplace the following values:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the project that contains the hub\n- \u003cvar translate=\"no\"\u003eHUB_NAME\u003c/var\u003e: the name of the hub for which you want to list the hub route table\n\n### View hub route tables\n\nTo view details, such as name and description of a Network Connectivity Center route\ntable, follow these steps. \n\n### Console\n\n1. In the Google Cloud console, go to **Network Connectivity Center**.\n\n [Go to Network Connectivity Center](https://console.cloud.google.com/hybrid/hubs/list)\n2. In the project menu, select the project in which you want to view the hub\n details.\n\n3. Click the name of the hub that you want to view the hub route table for.\n\n4. Click the **Routes** tab.\n\n5. In the **Region** section, select the region for which you want to view routes.\n\n6. Follow these steps depending on the topology that\n your hub is configured for.\n\n - If you're using mesh topology connectivity, the routes and route details are displayed in the **Routes** section.\n - If you're using star topology connectivity, in the **Routes** section, change the **Spoke group** to **Center** or **Edge** to see the appropriate route table.\n\n### gcloud\n\nRun the\n[`gcloud network-connectivity hubs route-tables describe` command](/sdk/gcloud/reference/network-connectivity/hubs/route-tables/describe). \n\n```\ngcloud network-connectivity hubs route-tables describe GROUP_NAME \\\n --hub=HUB_NAME\n\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eGROUP_NAME\u003c/var\u003e: the name of the group for which you want to view the hub route table. For mesh topology connectivity, there is a single default group; for star topology connectivity, there is a *center* or *edge* group.\n- \u003cvar translate=\"no\"\u003eHUB_NAME\u003c/var\u003e: the name of the hub for which you want to view the hub route table\n\n### API\n\nUse the\n[`networkconnectivity.hubs.routeTables.get` method](/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.routeTables/get) with an empty request body. \n\n```\n GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables/NAME\n```\n\nReplace the following values:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the project that contains the new hub\n- \u003cvar translate=\"no\"\u003eHUB_NAME\u003c/var\u003e: the name of the hub for which you want to view the hub route table\n- \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name of the hub route table resource\n\nManage hub routes\n-----------------\n\nA route resource nested under the hub route table corresponds to a subnet in a\nVPC spoke that has been exported from the VPC\nnetwork to the hub.\n\n#### Permissions required for this task\n\nTo perform this task, you must have been granted the following permissions\n*or* the following IAM roles.\n\n**Permissions**\n\n- `networkconnectivity.hubRoutes.get` to view hub routes\n- `networkconnectivity.hubRoutes.list` to list hub routes\n\n\u003cbr /\u003e\n\n**Roles**(one of the following):\n\n- `roles/networkconnectivity.hubAdmin`\n- `roles/networkconnectivity.hubViewer`\n\n### List hub routes\n\nTo see a list of hub routes for a specific region, follow these steps. \n\n### Console\n\n1. In the Google Cloud console, go to the **Network Connectivity Center** page.\n\n [Go to Network Connectivity Center](https://console.cloud.google.com/hybrid/hubs/list)\n2. In the project menu, select the project in which you want to view the hub\n route details.\n\n3. Click the name of the hub that you want to view the route details for.\n\n4. Click the **Routes** tab.\n\n5. In the **Region** section, select the region for which you want to view\n routes. The route table lists both subnet routes and dynamic\n routes.\n\n### gcloud\n\nRun the\n[`gcloud network-connectivity hubs route-tables routes list` command](/sdk/gcloud/reference/network-connectivity/hubs/route-tables/routes/list). \n\n```\ngcloud network-connectivity hubs route-tables routes list \\\n --hub=HUB_NAME \\\n --route_table=NAME \\\n --effective-location=EFFECTIVE_LOCATION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eHUB_NAME\u003c/var\u003e: the name of the hub, such as `my-hub`\n- \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name of the hub route table, such as `edge-route-table` or `center-route-table`\n- \u003cvar translate=\"no\"\u003eEFFECTIVE_LOCATION\u003c/var\u003e: the location of the hub for which you want to view routes, such as `us-central1`\n\n### API\n\nUse the\n[`networkconnectivity.hubs.routeTables.routes.list` method](/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.routeTables.routes/list) with an empty request body. \n\n```\n GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables/NAME/routes\n```\n\nReplace the following values:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the project that contains the hub\n- \u003cvar translate=\"no\"\u003eHUB_NAME\u003c/var\u003e: the name of the hub\n- \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name of the hub route table resource\n\n### View hub route details\n\nTo view the details of a specific hub route, such as route type, destination\nIP address range, and next hop, follow these steps. \n\n### Console\n\n1. In the Google Cloud console, go to the **Network Connectivity Center** page.\n\n [Go to Network Connectivity Center](https://console.cloud.google.com/hybrid/hubs/list)\n2. In the project menu, select the project in which you want to view the hub\n route details.\n\n3. Click the name of the hub that you want to view the route details for.\n\n4. Click the **Routes** tab.\n\n5. Use the **Filter** field to sort routes by type, IP version, destination IP\n address range, priority, spoke, or next hop.\n\n### gcloud\n\nRun the\n[`gcloud network-connectivity hubs route-tables routes describe` command](/sdk/gcloud/reference/network-connectivity/hubs/route-tables/routes/describe). \n\n```\ngcloud network-connectivity hubs route-tables routes describe NAME \\\n --hub=HUB_NAME \\\n --route_table=ROUTE_TABLE\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name or ID of the route that you want to describe. Query the API to get the exact route name by using the [`gcloud network-connectivity hubs route-tables routes list` command](/network-connectivity/docs/network-connectivity-center/how-to/vpc-view-hub-route-table#list_hub_routes).\n- \u003cvar translate=\"no\"\u003eHUB_NAME\u003c/var\u003e: the name of the hub, such as `my-hub`.\n- \u003cvar translate=\"no\"\u003eROUTE_TABLE\u003c/var\u003e: the name of the hub route table, such as `edge-route-table` or `center-route-table` for star topology connectivity and `default-route-table` for full mesh topology.\n\n### API\n\nUse the\n[`networkconnectivity.hubs.routeTables.routes.get` method](/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.global.hubs.routeTables.routes/get). \n\n```\n GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/global/hubs/HUB_NAME/routeTables/NAME/routes/ROUTE_NAME\n```\n\nReplace the following values:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the project that contains the new hub\n- \u003cvar translate=\"no\"\u003eHUB_NAME\u003c/var\u003e: the name of the hub for which you want to view the hub route table\n- \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name of the hub route table resource\n- \u003cvar translate=\"no\"\u003eROUTE_NAME\u003c/var\u003e: the name of the route\n\nWhat's next\n-----------\n\n- To create hubs and spokes, see [Work with hubs and spokes](/network-connectivity/docs/network-connectivity-center/how-to/working-with-hubs-spokes).\n- To view a list of partners whose solutions are integrated with Network Connectivity Center, see [Network Connectivity Center partners](/network-connectivity/docs/network-connectivity-center/partners).\n- To find solutions for Router appliance issues, see [Troubleshooting](/network-connectivity/docs/network-connectivity-center/support/troubleshooting#troubleshooting-ra).\n- To get details about API and `gcloud` commands, see [APIs and reference](/network-connectivity/docs/network-connectivity-center/apis)."]]