9. Relay Agent/Server Message Formats
This section preserves the RFC text for DHCPv6, including message exchanges, relay behavior, DUIDs, IA_NA, IA_TA, IA_PD, DHCP options, RKAP authentication, IANA registries, normative requirements, and appendix option-appearance matrices.
Original RFC Text
9. Relay Agent/Server Message Formats
Relay agents exchange messages with other relay agents and servers to
relay messages between clients and servers that are not connected to
the same link.
All values in the message header and in options are in network byte
order.
Options are stored serially in the "options" field, with no padding
between the options. Options are byte-aligned but are not aligned in
any other way (such as on 2-byte or 4-byte boundaries).
There are two relay agent messages (Relay-forward and Relay-reply),
which share the following 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| msg-type | hop-count | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
| link-address |
| |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
| peer-address |
| |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
. .
. options (variable number and length) .... .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 3: Relay Agent/Server Message Format
The following sections describe the use of the relay agent message
header.
9.1. Relay-forward Message
The following list defines the use of message fields in a Relay-
forward message.
msg-type: RELAY-FORW (12). A 1-octet field.
hop-count: Number of relay agents that have already relayed this
message. A 1-octet field.
link-address: An address that may be used by the server to identify
the link on which the client is located. This is typically a
globally scoped unicast address (i.e., GUA or ULA), but see the
discussion in Section 19.1.1. A 16-octet field.
peer-address: The address of the client or relay agent from which
the message to be relayed was received. A 16-octet field.
options: MUST include a Relay Message option (see Section 21.10);
MAY include other options, such as the Interface-Id option (see
Section 21.18), added by the relay agent. A variable-length field
(34 octets less than the size of the message).
See Section 13.1 for an explanation of how the link-address field is
used.
9.2. Relay-reply Message
The following list defines the use of message fields in a Relay-reply
message.
msg-type: RELAY-REPL (13). A 1-octet field.
hop-count: Copied from the Relay-forward message. A 1-octet field.
link-address: Copied from the Relay-forward message. A 16-octet
field.
peer-address: Copied from the Relay-forward message. A 16-octet
field.
options: MUST include a Relay Message option (see Section 21.10);
MAY include other options, such as the Interface-Id option (see
Section 21.18). A variable-length field (34 octets less than the
size of the message).