old-www/LDP/nag/node33.html

60 lines
3.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-c (Feb 29, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>The Internet Control Message Protocol</TITLE>
</HEAD>
<BODY LANG="EN">
<A HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <BR>
<B> Next:</B> <A HREF="node34.html">The Domain Name System</A>
<B>Up:</B> <A HREF="node23.html">Issues of TCP/IP Networking</A>
<B> Previous:</B> <A HREF="node32.html">Metric Values</A>
<BR> <P>
<H1><A NAME="SECTION004500000">The Internet Control Message Protocol</A></H1>
IP has a companion protocol that we haven't talked about yet. This is
the <em>Internet Control Message Protocol</em> (ICMP) and is used by the
kernel networking code to communicate error messages and the like to
other hosts. For instance, assume that you are on erdos again and
want to telnet to port 12345 on quark, but there's no
process listening on that port. When the first TCP packet for this port
arrives on quark, the networking layer will recognize this and
immediately return an ICMP message to erdos stating ``Port
Unreachable''.
<p>
There are quite a number of messages ICMP understands, many of which
deal with error conditions. However, there is one very interesting
message called the Redirect message. It is generated by the routing
module when it detects that another host is using it as a gateway,
although there is a much shorter route. For example, after booting the
routing table of sophus may be incomplete, containing the routes
to the Mathematics network, to the FDDI backbone, and the default route
pointing at the Groucho Computing Center's gateway (gcc1).
Therefore, any packets for quark would be sent to gcc1
rather than to niels, the gateway to the Physics Department. When
receiving such a datagram, gcc1 will notice that this is a poor
choice of route, and will forward the packet to niels, at the
same time returning an ICMP Redirect message to sophus telling it
of the superior route.
<P>
Now, this seems a very clever way to avoid having to set up any but
the most basic routes manually. However be warned that relying on
dynamic routing schemes, be it RIP or ICMP Redirect messages, is not
always a good idea. ICMP Redirect and RIP offer you little or no
choice in verifying that some routing information is indeed authentic.
This allows malicious good-for-nothings to disrupt your entire network
traffic, or do even worse things. For this reason, there are some
versions of the networking code that treat Redirect messages
that affect network routes, as if they were only Redirects for host
routes.
<P>
<HR><A HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <BR>
<B> Next:</B> <A HREF="node34.html">The Domain Name System</A>
<B>Up:</B> <A HREF="node23.html">Issues of TCP/IP Networking</A>
<B> Previous:</B> <A HREF="node32.html">Metric Values</A>
<P><ADDRESS>
<I>Andrew Anderson <BR>
Thu Mar 7 23:22:06 EST 1996</I>
</ADDRESS>
</BODY>
</HTML>