路由器设备实例总共参与四个边界网关协议 (BGP) 对等互连会话:在 VPC 网络 A 中,Cloud Router A 与路由器设备实例建立两个会话。在 VPC 网络 B 中,Cloud Router B 与路由器设备实例建立两个会话。
在此场景中,Cloud Router A 通过防火墙路由器设备获知 192.168.10.0/24 子网。此路由安装在 VPC 网络 A 的路由表中。同样,Cloud Router B 通过防火墙路由器设备获知 10.1.3.0/24 子网,并且路由安装在 VPC 网络 B 的路由表中。现在,虚拟机 A 和虚拟机 B 可以相互通信(具体取决于您为设备定义的防火墙规则)。
所有 Google Cloud区域都支持以这种方式使用路由器设备。
使用防火墙设备(点击可放大)
如需以这种方式设置路由器设备 Spoke,请按照使用第三方设备建立连接中的步骤操作。虽然“连接到 Google Cloud”描述了站点到云连接场景,但 Network Connectivity Center 步骤与上图相同。
[[["易于理解","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-05。"],[],[],null,["# VPC-to-VPC topology that uses a third-party appliance\n\nNetwork Connectivity Center lets you use a third-party network virtual appliance to\nestablish connectivity between your\nVirtual Private Cloud (VPC) networks. To establish this type of\nconnectivity, you use the Router appliance feature. Using\nRouter appliance in this way is supported in all Google Cloud regions.\n\nWhen you use Router appliance, you install the image of a virtual appliance\non a Compute Engine virtual machine (VM) that uses Border Gateway Protocol\n(BGP). We recommend using an image provided by a\n[supported Network Connectivity Center partner](/network-connectivity/docs/network-connectivity-center/partners).\nFor more information about Router appliance, see the\n[Router appliance overview](/network-connectivity/docs/network-connectivity-center/concepts/ra-overview).\n\nThis page uses a firewall appliance as an example. However, you could use the\ntopology described on this page when setting up an SD-WAN router, a\nload-balancing appliance, or another type of device.\n\nNetwork Connectivity Center lets you use a hub-and-spoke architecture for network\nconnectivity. For information about Network Connectivity Center, see the\n[Network Connectivity Center overview](/network-connectivity/docs/network-connectivity-center/concepts/overview). For more\ninformation about Router appliance, see the\n[Router appliance overview](/network-connectivity/docs/network-connectivity-center/concepts/ra-overview).\n\nSample topology\n---------------\n\nIn the following topology, the router appliance instance hosts a firewall\nappliance image. The firewall appliance mediates connectivity between\ntwo Virtual Private Cloud (VPC) networks.\n\nThe VM that hosts the router appliance instance has interfaces in both\nVPC networks. Each interface has been used to create a\nRouter appliance spoke.\n\nThe router appliance instance engages in a total of four Border\nGateway Protocol (BGP) peering sessions: In VPC network A,\nCloud Router A establishes two sessions with the router appliance instance.\nIn VPC network B, Cloud Router B establishes two sessions\nwith the router appliance instance.\n\nIn this scenario, Cloud Router A learns the 192.168.10.0/24 subnet through\nthe firewall Router appliance. This route is installed on the routing table\nin VPC network A. Similarly, Cloud Router B learns the\n10.1.3.0/24 subnet through the firewall Router appliance, and the route is\ninstalled on the routing table in VPC network B. Now, VM A\nand VM B can communicate---subject to the firewall rules that you've\ndefined for your appliance.\n\nUsing Router appliance in this way is supported in all Google Cloud\nregions.\n[](/static/network-connectivity/docs/network-connectivity-center/images/firewall-topology.svg) Use a firewall appliance (click to enlarge) **Note:** This topology would also work for a scenario where you want to use an SD-WAN router, a load balancer, or some other type of appliance in two VPC networks.\n\nTo set up Router appliance spokes in this way, follow the procedure in\n[Establish connectivity by using a third-party appliance](/network-connectivity/docs/network-connectivity-center/how-to/connect-site-to-cloud).\nAlthough \"Connect to Google Cloud\" describes a site-to-cloud connectivity\nscenario, the Network Connectivity Center steps are the same as in the preceding diagram.\n\nWhat's next\n-----------\n\n- To create hubs and spokes, see [Working 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)."]]