[[["易于理解","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-03。"],[],[],null,["# Test connectivity to Google Cloud load balancers\n\nThis page describes common scenarios for testing connectivity to\nGoogle Cloud load balancers.\n\nConnectivity Tests configuration analysis supports tracing simulated\npackets to all types of Google Cloud load balancers. The trace path for an\nexternal Application Load Balancer also applies to external proxy Network Load Balancers.\nFor more information, see the\n[Cloud Load Balancing overview](/load-balancing/docs/load-balancing-overview).\n\nIn the following example, Connectivity Tests traces a simulated packet\nfrom an external host to a virtual IP address (VIP) for an external Application Load Balancer.\nThe TCP connection from the external host terminates at the proxy for the\nexternal Application Load Balancer. The external Application Load Balancer then initiates a new TCP\nconnection to a VM acting as a load balancer backend.\n\n\n[](/static/network-intelligence-center/docs/connectivity-tests/images/trace-path-https-lb.svg) A typical trace path to an external Application Load Balancer\n\n\u003cbr /\u003e\n\nTrace diagrams on this page use the symbols described in the following legend.\n\nIn the following trace path, the Connectivity Tests configuration\nanalysis provides three traces, one for each possible path to the three load\nbalancer backends. Connectivity Tests does this because it validates\nonly configurations, not the live data plane.\n\n\n[](/static/network-intelligence-center/docs/connectivity-tests/images/trace-to-gcp-https-lb.svg) Packet trace to an external Application Load Balancer\n\n\u003cbr /\u003e\n\nNumber of traces in a test to a load balancer\n---------------------------------------------\n\nConnectivity Tests configuration analysis considers all configured\nbackends of proxy Network Load Balancer and passthrough Network Load Balancer and all backend services\nmentioned in the URL map of Application Load Balancer. Traces are produced only\nfor matching backends. The status of the health check probes is not taken into\nconsideration---traces are produced for both healthy and unhealthy backends.\n\nThe number of traces produced by Connectivity Tests configuration\nanalysis depends on the load balancer type, the number of matching backends,\nand the type of matching backends:\n\n- For backend services with PREFER_IPV6 [IP address selection policy](/load-balancing/docs/backend-service#ip-address-selection-policy), traces to both IPv4 and IPv6 backend endpoints are produced.\n- For other types of backends, a single trace to each backend endpoint is produced.\n\nConnectivity Tests configuration analysis has a limit for the number\nof traces it can return. If a load balancer has too many backends, some of them\nmight be omitted.\n\nA successful test to a load balancer\n------------------------------------\n\nThis section describes an example of a successful test to the external Application Load Balancer\ndescribed previously.\n\nIn the actual data plane, the load-balancing algorithm chooses a VM instance\nfor each backend connection. Because there are three load balancer backends in\nthis example, the **Trace selection** menu on the **Results** screen enables\nyou to\n[select the trace that you want to view](/network-intelligence-center/docs/connectivity-tests/how-to/running-connectivity-tests#viewing-tests).\n\nThe following successful test result validates that all of the following\nGoogle Cloud resources for the external Application Load Balancer are configured correctly:\n\n- The forwarding rule\n- The load balancer backends, including the ability for the load balancer to successfully send health checks to those backends\n- The proxy connection\n- VPC firewall rules\n\nThis result shows that a simulated packet from an external IP address could\nsuccessfully reach the backend VM instances.\n\nFor a detailed example of a trace to all three backends, see\n[Detect invalid or inconsistent configurations](/network-intelligence-center/docs/connectivity-tests/concepts/detecting-configs#inconsistent-config).\n\n\n[](/static/network-intelligence-center/docs/connectivity-tests/images/example-lb-test-success.png) Example output for a successful test to an external Application Load Balancer\n\n\u003cbr /\u003e\n\nIf you don't have permissions to review the Google Cloud resources\nin the network path for the external Application Load Balancer, you still see results in\nthe Google Cloud console, including successful results. However, the card\nfor each resource tested reads \"No permission to view resource in\n\u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e.\"\n\nA test showing a missing firewall rule for a health check\n---------------------------------------------------------\n\nA load balancer trace verifies many of the same Google Cloud resource\nconfigurations described previously. However, if the following load balancer\nresources are misconfigured, the analysis shows **Packet could be dropped**\n(a final state of the trace is [`Drop`](/network-intelligence-center/docs/connectivity-tests/concepts/state-tables#drop-state)).\n\nThe following test result shows that the VPC network's\ningress firewall rules do not allow a health check to the load balancer\nbackends, making the backends unavailable to the load balancer.\n\n\n[](/static/network-intelligence-center/docs/connectivity-tests/images/example-lb-test-invalid-healthcheck.png) Example output for a missing firewall rule\n\n\u003cbr /\u003e\n\nIn addition to invalid VPC firewall rules, the problems in the\nfollowing table are common configuration issues that\nConnectivity Tests detects for Google Cloud load balancers. To\ncorrect these issues, use the solutions described in the table.\n\nWhat's next\n-----------\n\n- [Common test scenarios](/network-intelligence-center/docs/connectivity-tests/concepts/common-use-cases)\n- [Learn about Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/concepts/overview)\n- [Troubleshoot Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/support/troubleshooting)"]]