Cannot send traffic across Serverless VPC Connector

Problem

Unable to ping private IP addresses within the same VPC network when Cloud function is connected, whereas the VM instances can ping them.

Environment

  • Serverless VPC Access

Solution

  1. The connector IP range should not overlap with any existing IP address reservations in your VPC network.
  2. Make sure there are no firewall rules on your VPC network with a priority before 1000 that deny ingress from your connector's IP range.
  3. Serverless VPC Connector doesn't support ping to private IPs through a VPC Connector.
  4. Serverless VPC Connectors support TCP and UDP protocols, and you can check the connectivity with TCP/UDP protocol such as using HTTP HEAD request, or using cURL command.

Cause

Serverless VPC Connectors currently do not support ICMP protocol (for private IPs). Therefore, it is expected that the ping result will fail, because the ping command is using ICMP protocol. To test connectivity to VPC Network, make use of TCP/UDP protocol as mentioned above. You can check the networking protocols supported by Serverless VPC Access connectors here.