I'm looking into ICMP control messages. The example that's given regarding a redirect message is to have a host connected to two routers, R1 and R2 with R1 set as the default gateway. The host wants to contact another host on a different network so the traffic is sent to the DG but R1 knows that a better route to the remote host is via R2, so it sends a redirect message back to the local host.
The question I have is about what the local host does with the redirect message. Does it actually change the TCP/IP setting to show R2 as the DG for all remote addresses? If not, how does the host know (and remember) that traffic to the same remote host should be sent to R2 rather than R1?
Thank you. So, thinking out aloud, it seems that the redirect message changes the host's routing table and that must take precedence over the DG which has been set in TCP/IP properties. I've been assuming that the host is Windows based but I supposed it could be Linux or some other platform.
The behaviour is generic rather than OS specific. I need to try this myself to see for sure, but it sounds like it adds a route into the routing table pointing the destination in question to the new gateway; the default gateway entry remains unchanged and will still get used for all other traffic