5. Sample Usage
The following scenarios illustrate some typical uses of RLP. In all cases the indicated messages are encapsulated in a UDP datagram with the appropriate source and destination port numbers, message length, and checksum. This datagram is further encapsulated in an IP datagram with the appropriate source address of the sending host and destination address (either broadcast or individual) for the receiving host.
All numeric protocol examples are as specified in the appropriate protocol description documents listed in the references.
1. Suppose a freshly rebooted host H wishes to find some gateway on its directly connected network to which it can send its first external packet. It then broadcasts the request
<Who-Provides?> <Flags>=<Local-Only> <Message-ID>=12345
<Resource-List>={[GGP], [EGP]}
encoded as the 8 octet message
+-----+-----+-----+-----+-----+-----+-----+-----+
| 0 | 128 | 12345 | 3 | 0 | 8 | 0 |
+-----+-----+-----+-----+-----+-----+-----+-----+
on its local network.
Gateway G1 (which understands EGP) receives the request and returns the reply
<I-Provide> <Flags>=none <Message-ID>=12345
<Resource-List>={[EGP]}
encoded as the 6 octet message
+-----+-----+-----+-----+-----+-----+
| 4 | 0 | 12345 | 8 | 0 |
+-----+-----+-----+-----+-----+-----+
to host H which then remembers that gateway G1 may be used to route traffic to the rest of the Internet.
At the same time, gateway G2 (which understands both GGP and EGP) might also receive the request and return the reply
<I-Provide> <Flags>=none <Message-ID>=12345
<Resource-List>={[GGP], [EGP]}
encoded as the 8 octet message
+-----+-----+-----+-----+-----+-----+-----+-----+
| 4 | 0 | 12345 | 3 | 0 | 8 | 0 |
+-----+-----+-----+-----+-----+-----+-----+-----+
to host H which might then also add gateway G2 to its list if it chooses.
2. Assume instead that host H is a stand-alone system which has just encountered some fatal software error and wishes to locate a crash dump server to save its state before reloading. Suppose that the crash dump protocol on the host's local network is implemented using the Trivial File Transfer Protocol (TFTP) [8]. Furthermore, suppose that the special file name "CRASH-DUMP" is used to indicate crash dump processing (e.g. the server might locally generate a unique file name to hold each dump that it receives from a host). Then host H might broadcast the request
<Who-Provides?> <Flags>=none <Message-ID>=54321
<Resource-List>={[UDP, TFTP, WRQ, "CRASH-DUMP"]}
encoded as the 21 octet message
+-----+-----+-----+-----+-----+-----+-----+-----+
| 0 | 0 | 54321 | 17 | 15 | 69 |
+-----+-----+-----+-----+-----+-----+-----+-----+
| 2 | 'C' 'R' 'A' 'S' 'H' '-' |
+-----+-----+-----+-----+-----+-----+-----+-----+
| 'D' 'U' 'M' 'P' 0 |
+-----+-----+-----+-----+-----+
to its local network (note that the file name component is explicitly terminated by a null so as not to exclude future further specialization of the crash dump protocol).
Host C (which supports this specialization of the TFTP protocol) receives the request and returns the reply
<I-Provide> <Flags>=none <Message-ID>=54321
<Resource-List>={[UDP, TFTP, WRQ, "CRASH-DUMP"]}
encoded as the 21 octet message
+-----+-----+-----+-----+-----+-----+-----+-----+
| 4 | 0 | 54321 | 17 | 15 | 69 |
+-----+-----+-----+-----+-----+-----+-----+-----+
| 2 | 'C' 'R' 'A' 'S' 'H' '-' |
+-----+-----+-----+-----+-----+-----+-----+-----+
| 'D' 'U' 'M' 'P' 0 |
+-----+-----+-----+-----+-----+
to host H which may then proceed to send its crash dump to host C and reload.
Host D (which provides TFTP service but not the crash dump specialization), however, might receive the request and determine that it provides no support for the resource (since the resource name contains components following the UDP port number which it does not understand). It would therefore return no reply to host H.