-1

RFC2131 section 3.1 describe the DHCP working flow as follows:

            Server          Client          Server
        (not selected)                    (selected)

              v               v               v
              |               |               |
              |     Begins initialization     |
              |               |               |
              | _____________/|\____________  |
              |/DHCPDISCOVER  | DHCPDISCOVER \|
              |               |               |
          Determines          |          Determines
         configuration        |         configuration
              |               |               |
              |\              |  ____________/|
              | \________     | /DHCPOFFER    |
              |  DHCPOFFER\   |/              |
              |            \  |               |
              |       Collects replies        |
              |              \|               |
              |     Selects configuration     |
              |               |               |
              | _____________/|\____________  |
              |/ DHCPREQUEST  |  DHCPREQUEST\ |
              |               |               |
              |               |     Commits configuration
              |               |               |
              |               | _____________/|
              |               |/ DHCPACK      |
              |               |               |
              |    Initialization complete    |
              |               |               |
              .               .               .
              .               .               .
              |               |               |
              |      Graceful shutdown        |
              |               |               |
              |               |\ ____________ |
              |               | DHCPRELEASE  \|
              |               |               |
              |               |        Discards lease
              |               |               |
              v               v               v
 Figure 3: Timeline diagram of messages exchanged between DHCP
           client and servers when allocating a new network address

My question is: As for client requsting an IP address, What's the benefit of two phase packet exchange? I think it's sufficient to only define DHCPREQUEST/DHCPACK .

I mean, I hope someone can cite a case where DHCPDISCOVER can bring benefit to the working of the protocol.

Reducing one packet exchange(specifically involving MAC broadcast) reduces the risk of packet lost, especially on some not-so-reliable medium, such as 802.11 wireless network.

Jimm Chen
  • 1,779
  • 5
  • 19
  • 32

1 Answers1

3

The benefit of sending a discovery out and then sending a request to just one of those servers that responded is that you don't get all the DHCP servers going through the process of allocating an IP address.

I can't think of many reasons to have multiple DHCP servers handling the same clients (other than redundancy), but if you have, a single stage process would end up with DHCP servers allocating an IP address that never gets used. It makes sense for the client to search for DHCP servers, then actually ask one of them to allocate the IP address in a second step.

USD Matt
  • 5,411
  • 18
  • 26