Reader to Reader - 01 Aug 1998

\[Editor's note: Email your Exchange and Outlook solutions (under 400 words) to R2R at [email protected] Please include your phone number. We will edit submissions for style, grammar, and length. If we print your contribution, you'll get $100.\]

Dynamic Host Configuration Protocol (DHCP) automatically configures TCP/IP hosts. If the DHCP server and a client are on different subnets and routers aren't compliant with Request for Comments (RFC) 1542, a DHCP Relay Agent must be active on the client's subnet. Many DHCP messages are broadcasts, and routers block them. Relay Agent forwards DHCP broadcasts as direct packets to a DHCP server on a remote subnet.

A DHCP client with no valid IP configuration tries to contact the DHCP server by broadcasting a DHCPDISCOVER message. A client with a previously assigned IP address broadcasts a DHCPREQUEST message. If the DHCP server doesn't respond, the client retransmits the message, and the Seconds (sec) field of the retransmitted message contains the number of seconds elapsed from the time it sent the first message.

In NT Server 4.0, the Relay Agent includes the Seconds threshold parameter (default value 4). If the value of the sec field in a DHCP message is less than the Seconds threshold value, the Relay Agent doesn't retransmit this message to the remote DHCP server, thus giving a local DHCP server a chance to serve the client and reducing routed traffic.

RFC 1541 stipulates that if the client receives neither the DHCPACK nor the DHCPNACK message after transmitting four DHCPREQUESTs, the client can keep a previously assigned IP address. The retransmission algorithm requires that the first retransmission be within 3 seconds to 5 seconds of the original transmission, and the second retransmission within 7 seconds to 9 seconds of the first retransmission. A Relay Agent with a 4-second threshold will pass the DHCPREQUEST if the client re-sent it 4 or more seconds after the original message.

Our mobile NT users don't have a problem getting an appropriate configuration from the DHCP server over NT Server Relay Agents. Windows 95 clients, however, have had to use the winipcfg utility (release/renew) to obtain a valid configuration.

Using Network Monitor, we discovered that Win95 DHCP clients send only two DHCPREQUEST messages with a 2-second delay. The DHCP server doesn't have a chance to reply with a DHCPNACK message because the Relay Agent blocks both requests. Instead of continuing to query the DHCP server, the client gives up and tries to use its old setting after the second request. The old settings are invalid for a new subnet, so the user can't log on. The NT DHCP client also sends two DHCPREQUEST messages, but with a 9-second delay. The second request reaches the DHCP server, which replies with the DHCPNACK message, and the client has to drop its settings and start over with DHCPDISCOVER. We couldn't find a way to control this behavior in the Registry, and so we simply set the Relay Agent's Seconds threshold value to 0.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish