[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-12。"],[],[],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)."]]