Search code examples
ipprotocolspingdatagram

I want to clarify some things about IP Datagram and Ping


Are datagrams a protocol or not? Is "Ping" (protocol ICMP) used in an IP DATAGRAM? Or is it using other protocols, such as TCP or UDP?
How do you know the message "Reply" the way back? Why the Tel number stays the same?


Solution

  • https://en.wikipedia.org/wiki/IPv4#Protocol

    Datagrams are basically the packets that go back an forth over the network at IP level. Each of these packets can specify a protocol. You can have TCP, UDP, ICMP, etc. (see https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers)

    So to answer your question, yes the protocol for datagrams is basically IP. You can have higher level protocols that run over IP such the one above. See https://en.wikipedia.org/wiki/Internet_protocol_suite

    Ping uses the ICMP protocol.