As per Relevance of the word september, we have this rfc below:











Network Working Group D.
Request for Comments: 2186 K.
Category: Informational National Laboratory for
Network Research/
September 1997

Internet Cache Protocol (ICP), version 2

Status of this

This memo provides information for the Internet community. This
does not specify an Internet standard of any kind. Distribution
this memo is unlimited



This document describes version 2 of the Internet Cache
(ICPv2) as currently implemented in two World-Wide Web proxy
packages[3,5]. ICP is a lightweight message format used
communicating among Web caches. ICP is used to exchange hints
the existence of URLs in neighbor caches. Caches exchange
queries and replies to gather information to use in selecting
most appropriate location from which to retrieve an object

This document describes only the format and fields of ICP messages
A companion document (RFC2187) describes the application of ICP
Web caches. Several independent caching implementations now use ICP
and we consider it important to codify the existing practical uses
ICP for those trying to implement, deploy, and extend its use
their own purposes

1.

ICP is a message format used for communicating between Web caches
Although Web caches use HTTP[1] for the transfer of object data
caches benefit from a simpler, lighter communication protocol.
is primarily used in a cache mesh to locate specific Web objects
neighboring caches. One cache sends an ICP query to its neighbors
The neighbors send back ICP replies indicating a "HIT" or a "MISS."












Wessels & Claffy Informational [Page 1]

RFC 2186 ICP September 1997


In current practice, ICP is implemented on top of UDP, but there
no requirement that it be limited to UDP. We feel that ICP over
offers features important to Web caching applications. An
query/reply exchange needs to occur quickly, typically within
second or two. A cache cannot wait longer than that before
to retrieve an object. Failure to receive a reply message
likely means the network path is either congested or broken.
either case we would not want to select that neighbor. As
indication of immediate network conditions between neighbor caches
ICP over a lightweight protocol such as UDP is better than one
the overhead of TCP

In addition to its use as an object location protocol, ICP
can be used for cache selection. Failure to receive a reply from
cache may indicate a network or system failure. The ICP reply
include information that could assist selection of the
appropriate source from which to retrieve an object

ICP was initially developed by Peter Danzig, et. al. at
University of Southern California as a central part of
caching in the Harvest research project[3].

ICP Message

The ICP message format consists of a 20-octet fixed header plus
variable sized payload (see Figure 1).

NOTE: All fields must be represented in network byte order


One of the opcodes defined below


The ICP protocol version number. At the time of this writing
both versions two and three are in use. This document
only version two. The version number field allows for
development of this protocol














Wessels & Claffy Informational [Page 2]

RFC 2186 ICP September 1997


Message

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode | Version | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Request Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Option Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sender Host Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Payload |
/ /
/ /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

FIGURE 1: ICP message format

The total length (octets) of the ICP message. ICP messages
not exceed 16,384 octets in length

Request
An opaque identifier. When responding to a query, this value
be copied into the reply message


A 32-bit field of option flags that allows extension of
version of the protocol in certain, limited ways. See "ICP
Flags" below

Option
A four-octet field to support optional features. The
ICP features make use of this field

The ICP_FLAG_SRC_RTT option uses the low 16-bits of Option Data
return RTT measurements. The ICP_FLAG_SRC_RTT option is
described below








Wessels & Claffy Informational [Page 3]

RFC 2186 ICP September 1997


Sender Host
The IPv4 address of the host sending the ICP message. This
should probably not be trusted over what is provided by getpeer
name(), accept(), and recvfrom(). There is some ambiguity
the original purpose of this field. In practice it is not used


The contents of the Payload field vary depending on the Opcode
but most often it contains a null-terminated URL string

2. ICP

The following table shows currently defined ICP opcodes

Value
----- -----------------
0 ICP_OP_
1 ICP_OP_
2 ICP_OP_
3 ICP_OP_
4 ICP_OP_
5-9
10 ICP_OP_
11 ICP_OP_
12-20
21 ICP_OP_MISS_
22 ICP_OP_
23 ICP_OP_HIT_

ICP_OP_
A place holder to detect zero-filled or malformed messages.
cache must never intentionally send an ICP_OP_INVALID message
ICP_OP_ERR should be used instead

ICP_OP_
A query message. NOTE this opcode has a different payload
than most of the others. First is the requester's IPv4 address
followed by a URL. The Requester Host Address is not that of
cache generating the ICP message, but rather the address of
caches's client that originated the request. The Requester
Address is often zero filled. An ICP message with an all-
Requester Host Address address should be taken as one where
requester address is not specified; it does not indicate a
IPv4 address







Wessels & Claffy Informational [Page 4]

RFC 2186 ICP September 1997


ICP_OP_QUERY payload format

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Requester Host Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ Null-Terminated URL /
/ /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

In response to an ICP_OP_QUERY, the recipient must return one of
ICP_OP_HIT, ICP_OP_MISS, ICP_OP_ERR, ICP_OP_MISS_NOFETCH
ICP_OP_DENIED, or ICP_OP_HIT_OBJ

ICP_OP_
Similar to ICP_OP_QUERY, but for use in simulating a query to
origin server. When ICP is used to select the closest neighbor
the origin server can be included in the algorithm by bouncing
ICP_OP_SECHO message off it's echo port. The payload is
the null-terminated URL

NOTE: the echo server will not interpret the data (i.e. we
send it anything). This opcode is used to tell the
between a legitimate query or response, random garbage, and
echo response

ICP_OP_
Similar to ICP_OP_QUERY, but for use in simulating a query to
cache which does not use ICP. When ICP is used to choose
closest neighbor, a non-ICP cache can be included in the
by bouncing an ICP_OP_DECHO message off it's echo port.
payload is simply the null-terminated URL

NOTE: one problem with this approach is that while a system's
port may be functioning perfectly, the cache software may not
running at all

One of the following six ICP opcodes are sent in response to
ICP_OP_QUERY message. Unless otherwise noted, the payload must
the null-terminated URL string. Both the URL string and the
Number field must be exactly the same as from the ICP_OP_
message






Wessels & Claffy Informational [Page 5]

RFC 2186 ICP September 1997


ICP_OP_
An ICP_OP_HIT response indicates that the requested URL exists
this cache and that the requester is allowed to retrieve it

ICP_OP_
An ICP_OP_MISS response indicates that the requested URL does
exist in this cache. The querying cache may still choose to
the URL from the replying cache

ICP_OP_
An ICP_OP_ERR response indicates some kind of error in parsing
handling the query message (e.g. invalid URL).

ICP_OP_MISS_
An ICP_OP_MISS_NOFETCH response indicates that this cache is up
but is in a state where it does not want to handle cache misses
An example of such a state is during a startup phase where a
might be rebuilding its object store. A cache in such a mode
wish to return ICP_OP_HIT for cache hits, but not ICP_OP_MISS
misses. ICP_OP_MISS_NOFETCH essentially means "I am up
running, but please don't fetch this URL from me now."

Note, ICP_OP_MISS_NOFETCH has a different meaning
ICP_OP_MISS. The ICP_OP_MISS reply is an invitation to fetch
URL from the replying cache (if their relationship allows it),
ICP_OP_MISS_NOFETCH is a request to NOT fetch the URL from
replying cache

ICP_OP_
An ICP_OP_DENIED response indicates that the querying site is
allowed to retrieve the named object from this cache. Caches
proxies may implement complex access controls. This reply must
be interpreted to mean "you are not allowed to request
particular URL from me at this particular time."

Caches receiving a high percentage of ICP_OP_DENIED replies
probably misconfigured. Caches should track percentage of
replies which are ICP_OP_DENIED and disable a neighbor
exceeds a certain threshold (e.g. 95% of 100 or more queries).

Similarly, a cache should track the percent of ICP_OP_
messages that are sent to a given address. If the percent
denied messages exceeds a certain threshold (e.g. 95% of 100
more), the cache may choose to ignore all subsequent ICP_OP_
messages from that address until some sort of
intervention occurs





Wessels & Claffy Informational [Page 6]

RFC 2186 ICP September 1997


ICP_OP_HIT_
Just like an ICP_OP_HIT response, but the actual object data
been included in this reply message. Many requested objects
small enough that it is possible to include them in the
response and avoid the need to make a subsequent HTTP request
the object

CAVEAT: ICP_OP_HIT_OBJ has some negative side effects which
its use undesirable. It transfers object data without HTTP
therefore bypasses the standard HTTP processing,
authorization and age validation. Another negative side effect
that ICP_OP_HIT_OBJ messages will often be much larger than
path MTU, thereby causing fragmentation to occur on the
packet. For these reasons, use of ICP_OP_HIT_OBJ is
recommended

A cache must not send an ICP_OP_HIT_OBJ unless
ICP_FLAG_HIT_OBJ flag is set in the query message Options field

ICP_OP_HIT_OBJ payload format

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ Null-Terminated URL /
/ /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Object Size | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
/ Object Data /
/ /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


The receiving application must check to make sure it
receives Object Size octets of data. If it does not, then
should treat the ICP_OP_HIT_OBJ reply as though it were a
ICP_OP_HIT

NOTE: the Object Size field does not necessarily begin on a 32-
boundary as shown in the diagram above. It begins
following the NULL byte of the URL string





Wessels & Claffy Informational [Page 7]

RFC 2186 ICP September 1997


UNRECOGNIZED
ICP messages with unrecognized or unused opcodes should
ignored, i.e. no reply generated. The application may choose
note the anomalous behaviour in a log file

3. ICP Option

0x80000000 ICP_FLAG_HIT_
This flag is set in an ICP_OP_QUERY message indicating that it
okay to respond with an ICP_OP_HIT_OBJ message if the object
will fit in the reply

0x40000000 ICP_FLAG_SRC_
This flag is set in an ICP_OP_QUERY message indicating that
requester would like the ICP reply to include the responder'
measured RTT to the origin server

Upon receipt of an ICP_OP_QUERY with ICP_FLAG_SRC_RTT bit set,
cache should check an internal database of RTT measurements.
available, the RTT value MUST be expressed as a 16-bit integer,
units of milliseconds. If unavailable, the responder may
set the RTT value to zero, or clear the ICP_FLAG_SRC_RTT bit
the ICP reply. The ICP reply MUST not be delayed while
for the RTT measurement to occur

This flag is set in an ICP reply message (ICP_OP_HIT, ICP_OP_MISS
ICP_OP_MISS_NOFETCH, or ICP_OP_HIT_OBJ) to indicate that the
16-bits of the Option Data field contain the measured RTT to
host given in the requested URL. If ICP_FLAG_SRC_RTT is clear
the query then it MUST also be clear in the reply.
ICP_FLAG_SRC_RTT is set in the query, then it may or may not
set in the reply

4. Security

The security issues relating to ICP are discussed in the
document, RFC2187.














Wessels & Claffy Informational [Page 8]

RFC 2186 ICP September 1997


5.

[1] Fielding, R., et. al, "Hypertext Transfer Protocol -- HTTP/1.1",
RFC 2068, UC Irvine, January 1997.

[2] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform
Locators (URL)", RFC 1738, CERN, Xerox PARC, University of Minnesota
December 1994.

[3] Bowman M., Danzig P., Hardy D., Manber U., Schwartz M.,
Wessels D., "The Harvest Information Discovery and Access System",
Internet Research Task Force - Resource Discovery
http://harvest.transarc.com/.

[4] Wessels D., Claffy K., "ICP and the Squid Web Cache",
Laboratory for Applied Network Research
http://www.nlanr.net/~wessels/Papers/icp-squid.ps.

[5] Wessels D., "The Squid Internet Object Cache",
Laboratory for Applied Network Research
http://squid.nlanr.net/Squid

6.

The authors wish to thank Paul A Vixie for
excellent feedback on this document

7. Authors'

Duane
National Laboratory for Applied Network
10100 Hopkins
La Jolla, CA 92093

EMail: wessels@nlanr.


K.
National Laboratory for Applied Network
10100 Hopkins
La Jolla, CA 92093

EMail: kc@nlanr.








Wessels & Claffy Informational [Page 9]








if you see any problems within the linking, don't worry be happy,
this is version 0.1 of the Relevance System and you gotta expect some crappy subroutines sometimes,
just be content we did not write this in Java, which would have made this "bigger and better" HAHAHHA.




RFC documents can be found at I.E.T.F.



Relevance System Copyright © 2002 Spectrum WorldResearch
other technical nosh by ServerMasters Corporation
collaboration of BobX







Spectrum