2

I provisioned one VM, I am trying to ping gateway IP from the terminal (in same VM using ssh) but I am not able to do so.

For Example: My Internal Ip : 10.142.10.12

ip route show :-> 10.142.10.1

I am trying : ping 10.142.10.1

"no byte received"

any idea? I have other raspi devices, there I am able to ping the gateway IP. Not sure if there is any setup for the same.

Leads please help.

stackjohnny
  • 645
  • 3
  • 7
  • 22

2 Answers2

1

The IP address you are trying to ping is a reserved IP address used as a "Default Gateway". You can find more information on this regard in the GCP Official Documentation.

The Default Gateway IP addresses are not attached to any device managed by the user, so it's not possible to ping them.

Alfredo GH
  • 26
  • 2
  • Your document link does not even mention `ping`. Do you have a reference link for your answer? The fact that a user does not manage a device is not related to the abilty to ping the device. – John Hanley Jan 31 '19 at 23:05
  • Until this moment I don't know any public document confirming or denying that a Default Gateway have to respond ICMP requests; however, I neither have seen before a Default gateway responding to ICMP requests. – Alfredo GH Feb 01 '19 at 22:32
  • Reading the [VPC concepts document](https://cloud.google.com/vpc/docs/advanced-vpc#detailedconnectionwalkthrough), when a VM calls to an IP address outside the VPC, an ARP request is made to resolve the gateway's MAC address. -- Using a MAC address sound like Layer 2 communication -- Then, the VPC handles the packets until comes an answer from the remote device, and the VPC delivers to the GCP instance again via MAC address. Note the communication happens in the L2, this could explain why the Default Gateway doesn't respond ICMP. – Alfredo GH Feb 01 '19 at 22:33
  • I know this is not like an official answer; however, if you think Google should explain why the Default Gateway's IP address doesn't respond to ICMP packages, you can click on the button "SEND FEEDBACK" at the bottom of the [official document](https://cloud.google.com/vpc/docs/advanced-vpc#detailedconnectionwalkthrough) mentioning this information should be included. I already sent my feedback. – Alfredo GH Feb 01 '19 at 22:33
  • You are missing the point. You have created an answer with no basis in fact. You are theorizing why, which is not an answer, it is a comment. – John Hanley Feb 01 '19 at 22:37
0

GCP software defined networking reserves a virtual gateway IP address for the primary IP ranges of each subnet in a VPC network. However, virtual gateways do not respond to ICMP traffic or decrement IP TTL headers.

Source

Eran Chetzroni
  • 1,046
  • 2
  • 14
  • 27