[[["易于理解","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,["# Troubleshoot BGP routes and route selection\n===========================================\n\nThis guide is for troubleshooting issues related to BGP routes, including route\nselection, route propagation, and route metrics.\n\nFor additional troubleshooting information, see the following:\n\n- [Troubleshoot BGP sessions](/network-connectivity/docs/router/support/troubleshoot-bgp-sessions)\n- [Troubleshoot BGP peering](/network-connectivity/docs/router/support/troubleshoot-bgp-peering)\n- [Troubleshoot Cloud Router log messages](/network-connectivity/docs/router/support/troubleshoot-log-messages)\n\nIPv6 BGP session is established but does not exchange IPv4 routes\n-----------------------------------------------------------------\n\n1. Verify that the VLAN attachment or HA VPN gateway has the\n required stack type of `IPV4_IPV6`. If the stack type is incorrect for the VLAN\n attachment, modify the VLAN attachment. For an HA VPN\n gateway, recreate the HA VPN gateway and its tunnels.\n\n2. Ensure that your Cloud Router is configured properly. Run the\n following command:\n\n gcloud compute routers describe ROUTER-NAME\n\n In the output, check the following values:\n - `bgpPeers.enableIpv4` is `true`\n - `bgpPeers.ipv4NexthopAddress` and `bgpPeers.peerIpv4NexthopAddress` are present\n\nSome on-premises IPv4 or IPv6 prefixes aren't reachable\n-------------------------------------------------------\n\nIf you are experiencing traffic loss, ping errors, or other problems when\nattempting to reach on-premises IPv4 or IPv6 destinations that are within\nprefixes learned by Cloud Router, there are a variety of possible\ncauses.\n\n### Check for inactive custom learned routes\n\nIf you are unable to reach an on-premises destination using a configured custom\nlearned route, do the following:\n\n- Check that the route is configured properly on the BGP session.\n- Check that the BGP session is up.\n- Check that the on-premises router is filtering some learned routes.\n\nFor more information, see [Check the status of custom learned\nroutes](/network-connectivity/docs/router/how-to/configure-custom-learned-routes#check-status).\n\n### Check for filtered learned routes\n\nTo see if a route is filtered, run the following command: \n\n gcloud compute routers get-status \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of your Cloud Router.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region that your Cloud Router is located in.\n\nThe output is similar to the following; look for the `routeStatus` set to\n`active`: \n\n kind: compute#routerStatusResponse\n result:\n bestRoutesForRouter:\n - asPaths:\n - asLists:\n - 65200\n pathSegmentType: AS_SEQUENCE\n creationTimestamp: '2024-03-22T13:57:15.533-07:00'\n destRange: 10.128.0.0/20\n kind: compute#route\n network: https://www.googleapis.com/compute/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e/global/networks/\u003cvar translate=\"no\"\u003eVPC_NAME\u003c/var\u003e\n nextHopIp: 169.254.73.246\n nextHopVpnTunnel: https://www.googleapis.com/compute/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e/regions/\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e/vpnTunnels/\u003cvar translate=\"no\"\u003eVPN_NAME\u003c/var\u003e\n priority: 100\n routeStatus: ACTIVE\n routeType: BGP\n bgpPeerStatus:\n - advertisedRoutes:\n - destRange: 10.128.0.0/20\n kind: compute#route\n network: https://www.googleapis.com/compute/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e/global/networks/aneta-vpc\n nextHopIp: 169.254.73.245\n nextHopVpnTunnel: https://www.googleapis.com/compute/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e/regions/\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e/vpnTunnels/\u003cvar translate=\"no\"\u003eVPN_NAME\u003c/var\u003e\n priority: 100\n routeType: BGP\n enableIpv6: false\n ipAddress: 169.254.73.245\n linkedVpnTunnel: https://www.googleapis.com/compute/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e/regions/\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e/vpnTunnels/\u003cvar translate=\"no\"\u003eVPN_NAME\u003c/var\u003e\n md5AuthEnabled: false\n name: aneta-bgp\n numLearnedRoutes: 1\n peerIpAddress: 169.254.73.246\n state: Established\n status: UP\n uptime: 10 hours, 11 minutes, 0 seconds\n uptimeSeconds: '36660'\n network: https://www.googleapis.com/compute/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e/global/networks/\u003cvar translate=\"no\"\u003eVPC_NAME\u003c/var\u003e\n\nThe `bestRoutesForRouter.routeStatus` value displays `ACTIVE` for an active\nroute, and `DROPPED` for a filtered route.\n\n### Check quotas and limits\n\nCheck that your Cloud Routers haven't exceeded the\n[quotas](/network-connectivity/docs/router/quotas#quotas) for learned routes. To view the number of\nlearned routes for a Cloud Router, view its\n[status](/network-connectivity/docs/router/how-to/viewing-router-details#viewing-router-status).\n\nFor information about the quotas, related log messages, and metrics, and how to\nresolve issues, see the following table.\n\nLearned routes (routes from an on-premises network) aren't propagated to other VPC networks\n-------------------------------------------------------------------------------------------\n\nA single Cloud Router can't re-advertise routes learned from one BGP\npeer to other BGP peers, including to Cloud Routers in other\nVPC networks.\n\nFor example, in the following hub and spoke topology, Cloud Router\ncannot support route advertisement between multiple VPC networks.\n[](/static/network-connectivity/docs/router/images/hub-spoke.svg) Cloud Router hub and spoke (click to enlarge).\n\nIn this case, there isn't an iBGP session between Cloud Routers that\nshare the same VPC network, and Cloud Router only\nadvertises VPC subnets and custom configured routes.\nCloud Router doesn't advertise dynamic routes from the\nVPC network.\n\nTo review recommendations for network topologies in Google Cloud, see\n[Best practices and reference architectures for VPC\ndesign](/architecture/best-practices-vpc-design).\n\nIn addition, to build and manage hub and spoke topologies in Google Cloud,\nyou can use\n[Network Connectivity Center](/network-connectivity/docs/network-connectivity-center/concepts/overview).\n\nIPv6 traffic isn't being routed\n-------------------------------\n\nIf you are experiencing difficulty connecting to IPv6 hosts, do the following:\n\n1. Verify that IPv4 routes are being correctly advertised. By checking IPv4\n traffic first, you can rule out general network issues. If IPv4 routes are\n not being advertised, perform the general troubleshooting procedures listed\n in this document.\n\n2. Inspect [firewall rules](/vpc/docs/using-firewalls) to ensure that you are\n allowing IPv6 traffic between your VPC network and your\n on-premises network.\n\n3. Determine whether you have exceeded your available quota for learned\n routes. If you have exceeded your quota for learned routes, IPv6 prefixes\n are dropped before IPv4 prefixes. See\n [Check quotas and limits](#check-quotas-and-limits).\n\n4. Verify that all components that require IPv6 configuration have been\n configured correctly.\n\n - The VPC subnet is configured to use the `IPV4_IPV6` stack\n type.\n\n - The VPC subnet has`--ipv6-access-type` set to `INTERNAL`.\n\n - The Compute Engine VMs on the subnet are configured with IPv6\n addresses.\n\n - The HA VPN gateway or the VLAN attachment for\n Dedicated Interconnect is configured to use the\n `IPV4_IPV6` stack type.\n\n - The BGP session is enabled to advertise IPv6 routes and the next-hop is\n an IPv6 address.\n\n - To view Cloud Router status and routes, see\n [View Cloud Router status and routes](/network-connectivity/docs/router/how-to/viewing-router-details#viewing-router-status).\n\n - To view BGP session configuration, see\n [View BGP session configuration](/network-connectivity/docs/router/how-to/viewing-router-details#viewing-router-status).\n\nCloud Router doesn't return ICMPv6 ping responses\n-------------------------------------------------\n\nICMPv6 `ping` isn't supported for Cloud Router BGP addresses. To test\nlayer 3 connectivity for Cloud Router BGP addresses, use ICMPv4 `ping`.\n\nWhat's next\n-----------\n\n- For more information about how to use Cloud Logging to monitor\n Cloud Router, see\n [View logs and metrics](/network-connectivity/docs/router/how-to/viewing-logs-metrics).\n\n- For additional support, see\n [Getting support](/network-connectivity/docs/router/support/getting-support).\n\n- For information about BGP session states, see\n [BGP session states](/network-connectivity/docs/router/concepts/bgp-states).\n\n- For information about diagnostic messages and session states related to\n Bidirectional Forwarding Detection (BFD), see\n [BFD diagnostic messages and session states](/network-connectivity/docs/router/concepts/bfd-states).\n\n- For issues related to using Cloud Router with Router appliance,\n see\n [Troubleshooting Router appliance](/network-connectivity/docs/network-connectivity-center/support/troubleshooting#troubleshooting-ra)\n in the Network Connectivity Center documentation."]]