6. Client/Server Message Formats
6. Client/Server Message Formats
All DHCP messages sent between clients and servers share the same fixed format header and a variable format area for options.
All values in message headers and options are in network byte order.
Options are stored sequentially in the options field, with no padding between options. Options are byte-aligned, but are not aligned in any other way, such as on 2- or 4-byte boundaries.
The following diagram illustrates the format of DHCP messages sent between clients and servers:
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 | transaction-id |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. options .
. (variable) .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
msg-type (message type)
Identifies the DHCP message type; available message types are listed in section 5.3.
transaction-id (transaction ID)
The transaction ID for this message exchange.
options (options)
Options carried in this message; options are described in section 22.