what is type of ICMP packets? TCP or UDP

851

Solution 1

Is there any relation between ICMP with TCP

Not directly. ICMP is IP protocol 1, TCP is IP protocol 6. Other common IP protocols are 17 (udp) and 47 (gre).

In other can we guaranty their arrival in the network

Typically ICMP is not sent within any type of framework that uses acknowledgements and timeouts like TCP does. So the answer here is no.

I want to know ICMP packets in the network is tcp or udp or which one or non of them?

None of them. It behaves mostly like udp but it's not designed to transport data. There is no "link" or session created with ICMP, it's typically a very simple request-response, if that. You could "hack" ICMP to trade data over echo ICMP packets if you really wanted to.

Solution 2

None of them – they're sent directly over IP. ICMP packets are mainly used for network control, i. e. between routers or ping and many other uses.

Share:
851

Related videos on Youtube

Remon Shehatta
Author by

Remon Shehatta

Updated on September 18, 2022

Comments

  • Remon Shehatta
    Remon Shehatta over 1 year

    I want to calculate json object Size in KB/Mb.

    there is a similar post here but it's in Java. Kotlin doesn't allow us to get bytes of a String.

    how can I do it in Kotlin?

  • Mohammad Reza Rezwani
    Mohammad Reza Rezwani over 10 years
    is there any guaranty for that? assume your ICMP packet last in the link
  • noggerl
    noggerl over 10 years
    It doesn't matter as it's a totally different protocol and the most routers and firewalls handle it differently.In the Wikipedia article for ICMP you can read the following: ICMP differs from transport protocols such as TCP and UDP in that it is not typically used to exchange data between systems, nor is it regularly employed by end-user network applications (with the exception of some diagnostic tools like ping and traceroute) -> en.wikipedia.org/wiki/Internet_Control_Message_Protocol
  • user5249203
    user5249203 over 10 years
    @alex: The ICMP protocol doesn't provide for guaranteed delivery. Given the kinds of tasks it performs that wouldn't be possible anyway (e.g sending an ICMP echo request to the IP-address of a server that is down)
  • Pacerier
    Pacerier almost 7 years
    So if it doesn't use TCP, if an ICMP packet is lost, how would you know?
  • LawrenceC
    LawrenceC almost 7 years
    You simply assume after a timeout period that you will not get a response and that no one is on the other end.