ICMP Redirect Message

The ICMP type 5 contains a redirect message to send data packets on an alternative route. ICMP Redirect is a mechanism for routers to convey routing information to hosts. The Redirect Message is an ICMP message which informs a host to update its routing information (to send packets on an alternate route). If a host tries to send data through a router (R1) and R1 sends the data on another router (R2) and a direct path from the host to R2 is available (that is, the host and R2 are on the same Ethernet segment), then R1 will send a redirect message to inform the host that the best route for the destination is via R2. The host should then send packets for the destination directly to R2. 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.
1 Redirect for Host.
2 Redirect for Type of Service and Network.
3 Redirect for Type of Service and Host.

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 that caused the redirection reply.

Famous quotes containing the word message:

    What’s the use? She would only want me to take a message to dear Albert.
    Benjamin Disraeli (1804–1881)