Aller au contenu principal

6. Client/Server Message Formats

  1. Client/Server Message Formats

    All DHCP messages sent between clients and servers share an identical fixed format header and a variable format area for options.

    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 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 Identifies the DHCP message type; the available message types are listed in section 5.3.

    transaction-id The transaction ID for this message exchange.

    options Options carried in this message; options are described in section 22.