如果内部直通式网络负载均衡器的 IP 地址位于远程 Network Connectivity Center spoke VPC 中,并且由于导出过滤条件而未进行交换,则无法使用来自另一个 VPC spoke 的静态路由访问该 IP 地址。因此,传送到目的地范围的流量会被丢弃。
如果您在一个 Network Connectivity Center VPC spoke 中创建了通往某个 IP 地址的静态路由,然后删除了该 spoke 的子网和内部直通式网络负载均衡器,并创建了一个 IP 地址范围包含新的内部直通式网络负载均衡器的 IP 地址的新子网,则流量会自动重新路由到新 spoke。
[[["易于理解","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-09-04。"],[],[],null,["This document describes how Network Connectivity Center supports static routes in\nVPC spokes.\n\nBefore reading this page, ensure that you're familiar with the following resources:\n\n- [Routes](/vpc/docs/routes) for a general overview of routes in Google Cloud\n- [Static routes](/vpc/docs/static-routes) for an overview of static routes\n\nIntroduction\n\nUnlike subnet routes and dynamic routes, Network Connectivity Center hubs don't exchange\nstatic routes. Instead, a hub provides additional configuration flexibility for\nstatic routes created in each VPC spoke.\n\nA static route in one VPC spoke can use a next hop in a\ndifferent VPC spoke if all of the following are true:\n\n- The static route doesn't use a network tag.\n- The destination range of the static route is an IPv4 range.\n- The specified next hop of the static route is an IPv4 address of an internal passthrough Network Load Balancer.\n- Google Cloud is able to [identify a next hop\n internal passthrough Network Load Balancer](#identify-nh) at the specified next hop IP address.\n- [Network Connectivity Center connectivity requirements](#ncc-reqs) have been met.\n\nThe additional configuration flexibility for static routes applies only to\nVPC spokes, not to VPC networks that are purely\nrouting VPC networks (containing only hybrid spokes).\n\nFor a comparison to other types of static route next hops, see [Next hop\nproject and network](/vpc/docs/static-routes#static-route-next-hop-loc).\n\nIdentifying the next hop internal passthrough Network Load Balancer\n\nGoogle Cloud attempts to find an internal passthrough Network Load Balancer for a static route that\nhas a next hop internal passthrough Network Load Balancer IP address by using the following process:\n\n- If the next hop IP address is in the destination range of a local subnet\n route: Google Cloud exclusively searches for an internal passthrough Network Load Balancer whose\n forwarding rule IP address is in the corresponding local subnet. If a next\n hop internal passthrough Network Load Balancer is found, both the static route and next hop are in the\n same VPC network.\n\n- If the next hop IP address is in the destination range of a Network Connectivity Center\n subnet route (imported from the hub): Google Cloud exclusively searches\n for an internal passthrough Network Load Balancer whose forwarding rule IP address is in the corresponding\n subnet of another VPC spoke. If a next hop internal passthrough Network Load Balancer\n is found, the static route is in one VPC spoke, and the next\n hop is in a different VPC spoke.\n\n - For details about how an internal passthrough Network Load Balancer in another VPC spoke\n can be found, see [Network Connectivity Center requirements for\n connectivity](#ncc-reqs).\n\n - If you want to use a next hop internal passthrough Network Load Balancer in a routing\n VPC network (containing hybrid spokes), you must add the\n routing VPC network to the hub as a VPC\n spoke. For more limitations relevant to using a routing VPC\n network as a VPC spoke, see [Limitations of dynamic route\n exchange](/network-connectivity/docs/network-connectivity-center/concepts/vpc-spokes-overview#limitations-of-route-exchange).\n\n- If the next hop IP address is in the destination range of a peering subnet\n route (imported from another network that is using VPC Network Peering):\n Google Cloud exclusively searches for an internal passthrough Network Load Balancer whose forwarding\n rule IP address is in the corresponding subnet of the peered VPC\n network. If a next hop internal passthrough Network Load Balancer is found, the static route is in one\n VPC network, and the next hop is in the peered VPC\n network.\n\nIf no next hop internal passthrough Network Load Balancer is found, packets sent to the destination\nrange of the static route are dropped.\n\nUpdates to the next hop internal passthrough Network Load Balancer\n\nGoogle Cloud continuously attempts to identify a next hop internal passthrough Network Load Balancer.\nIn the following example situations, the next hop for a static route is updated\nautomatically.\n\n- Replacing the next hop internal passthrough Network Load Balancer: when the next hop for a static route is\n the IP address of an internal passthrough Network Load Balancer, you can delete the next hop internal passthrough Network Load Balancer\n without needing to first delete the static route. If Google Cloud finds a\n replacement internal passthrough Network Load Balancer with the same IP address, Google Cloud switches\n to the replacement internal passthrough Network Load Balancer next hop.\n\n- An existing static route without a valid next hop internal passthrough Network Load Balancer can become\n operational: when a valid next hop internal passthrough Network Load Balancer is found, Google Cloud\n begins using that internal passthrough Network Load Balancer next hop.\n\n- Adjusting Network Connectivity Center configuration: moving a VPC spoke to\n a different spoke group or adjusting export filters can result in a next hop\n internal passthrough Network Load Balancer no longer being found or a different next hop internal passthrough Network Load Balancer being\n found and used.\n\nNetwork Connectivity Center requirements for connectivity\n\nTo find a next hop internal passthrough Network Load Balancer in another VPC spoke, the\nsubnet used by the internal passthrough Network Load Balancer forwarding rule must be accessible in the\nVPC spoke where the static route is defined. Both the following\nconditions must be true:\n\n1. The [hub\n topology](/network-connectivity/docs/network-connectivity-center/concepts/connectivity-topologies)\n must allow exchange of subnet routes that contain the next hop internal passthrough Network Load Balancer.\n\n - If you use the mesh topology, all VPC spokes are part of the\n same spoke group. The static route can exist in any VPC\n spoke, and its next hop internal passthrough Network Load Balancer can exist in any VPC\n spoke.\n\n - If you use the star topology, the following requirements apply:\n\n - If the static route is in a VPC spoke of the edge\n spoke group, the next hop internal passthrough Network Load Balancer can be in that edge\n VPC spoke or in any VPC spoke of the\n center spoke group. The next hop can't be in a different\n VPC spoke of the edge spoke group.\n\n - If the static route is in a VPC spoke of the center\n spoke group, its next hop internal passthrough Network Load Balancer can be in any\n VPC spoke (in either the edge spoke group or the center\n spoke group).\n\n2. The subnet range used by the internal passthrough Network Load Balancer forwarding rule must be exported\n to the hub. For more information, see [VPC connectivity with\n export\n filters](/network-connectivity/docs/network-connectivity-center/concepts/vpc-spokes-overview#vpc-connectivity-with-export-filters).\n\nEffect of global access\n\nNext hop internal passthrough Network Load Balancers that don't have global access enabled aren't reachable\nfrom regions outside of the load balancer's region. If Google Cloud has\nidentified a next hop load balancer at the specified next hop IP address,\nand Network Connectivity Center connectivity requirements are met, but the load balancer\ndoesn't have global access enabled, Google Cloud drops all packets sent\nfrom VM instances, VLAN attachments, and Cloud VPN tunnels in regions\ndifferent from the load balancer's region.\n\nTo change this behavior and make the next hop load balancer reachable from all\nregions, [enable global\naccess](/load-balancing/docs/internal/setting-up-internal#ilb-global-access).\n\nWhat's next\n\n- [Configure static routes](/network-connectivity/docs/network-connectivity-center/how-to/configure-static-routes)"]]