2

In our office we've got an Amazon VPC linked to our office network with a bastion server in the middle.

When I try to ping servers within the VPC it doesn't work. The answer I got from a co-worker was that "ping won't work because ICMP isn't linked in our routing configuration, only TCP."

(I can ping servers on our local business network, and Internet websites).

My question is: Why does ping use ICMP not TCP?

user207421
  • 305,947
  • 44
  • 307
  • 483
hawkeye
  • 34,745
  • 30
  • 150
  • 304

2 Answers2

3

They belong to different layers in the OSI model. ICMP is layer 3, for networking. While TCP, UDP is layer 4, for transport.

Ping is echo request/reply, part of the layer 3.

Vincent Ho
  • 106
  • 7
  • 1
    This is the answer. Ping is a lower level test than things that test tcp or udp. Ping also predates udp by a lot. – Jason Cheng Mar 05 '21 at 20:19
0

there are ping utilities which use ping-like features over TCP or UDP to test whether a target host answers connection attempts. One of these is Mark Russinovich's psping (https://technet.microsoft.com/en-us/sysinternals/psping.aspx) which can use ICMP or TCP. Technically, it's not the same as ICMP as it's built upon the TCP handshake; in practice, you use it like ICMP ping.

hawkeye
  • 34,745
  • 30
  • 150
  • 304
user1016274
  • 4,071
  • 1
  • 23
  • 19