ICMP redirects

Under the Internet model, all a system needs to know to

get anywhere in the Internet is its own address, the

address of where it wants to go, and how to reach a

gateway which knows about the Internet. It doesn't

have to be the best gateway. If the system is on a

network with multiple gateways, and a host sends a

packet for delivery to a gateway which feels another

directly connected gateway is more appropriate, the

gateway sends the sender a message. This message is an

ICMP redirect, which politely says "I'll deliver this

message for you, but you really ought to use that gate-

way over there to reach this host". BSD 4.2 ignores

these messages. This creates more stress on the gate-

ways and the local network, since for every packet

-17-

sent, the gateway sends a packet to the originator.

BSD 4.3 uses the redirect to update its routing tables,

will use the route until it times out, then revert to

the use of the route it thinks is should use. The

whole process then repeats, but it is far better than

one per packet.

Hitchhiker's Guide to the Internet · 第 19 / 25 题