ICMP redirect messages are used by routers to inform hosts in the broadcast domain that a better path exists to the destination. It happens when a router has to switch a packet out of the same interface it received it to reach the destination.
To understand this let’s look at the following topology
The host H1 access internet through its default gateway of 10.0.12.1, which is router R1. The host does not have any other routes other than the default route (gateway). If H1 wants to access the server at 10.0.23.3, it will send the packet to its gateway (10.0.12.1). Router R1 finds that to reach the destination it has to send the packet to R2. R2 is also in the same broadcast domain as the host.
Continue reading »