ICMP Redirect Message

From Wikipedia, the free encyclopedia

The Redirect Message is an ICMP message which informs a host to redirect its routing information (to send packets on an alternate route). If the host tries to send data through a router (R1) and then another router (R2) to reach the host, and a direct path from the host to R2 is available, the redirect will inform the host of such a route. The router will still send the original datagram to the intended destination. However, if the datagram contains routing information, this message will not be sent even if a better route is available. RFC1122 states that redirects should only be sent by gateways and should not be sent by Internet hosts.


00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Type = 5 Code Header Checksum

IP Address

IP Header + First 8 Bytes of Original Datagram's Data

Type must be set to 5. The code, which specifies the reason for the redirection, include the following:


Code Description
0 Redirect for Network Error.
1 Redirect for Host Error.
2 Redirect for Type of Service and Network Error.
3 Redirect for Type of Service and Host Error.

The IP address is the 32-bit address of the gateway to which the redirection should be sent. The additional data is included to allow the host to match the reply with the request the caused the redirection reply.

[edit] References

  • RFC 792 - INTERNET CONTROL MESSAGE PROTOCOL
  • RFC 1122 - Requirements for Internet Hosts -- Communication Layers