# How does concept of "redirection" works in ICMP?

I am trying to understand this figure, what it is trying to say?

Routing table is updated dynamically. However, for efficiency, hosts do not take part in the routing update process because there are terrible number of hosts. (Can you explain this with figure? What does it mean by host don't take part in routing update process?)

Hosts thus use static routing. Host usually know only 1 IP address of router, the default router. Thus host may send datagram to wrong router.

Solution is that router send redirection message back to host.

But how is this working in this figure?

Say at first,host A sends datagram to R1. Turns out it was the wrong router. So it sends redirection message to A. Now, A learns that it send message to wrong router.

If R1 sends the message to R2, what is the point of R1 sending redirection message to A? I mean what difference would it make here if there was no redirection message?

• This question is rather technology specific, so I think you may want to try Network Engineering. Sep 3 '21 at 11:00

Now what? A only knows about R1, it doesn't have information about R2, how will it send data to R2?

R1 sends R2's IP address in the Redirect Message to A. That is the whole point of the Redirect Message: to tell the host where to redirect the datagram to.

This is all pretty well explained in RFC 792 Internet Control Message Protocol:

 0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |     Code      |          Checksum             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+