Recipe14.4.Enabling Address Conflict Detection


Recipe 14.4. Enabling Address Conflict Detection

Problem

You want to enable address conflict detection on a DHCP Server. With conflict detection enabled, the DHCP Server will ping the IP address it wants to grant a lease for to make sure no other computers are using that IP address. If the ping request receives a reply, the server will mark the IP as BAD_ADDRESS.

Solution

Using a graphical user interface

  1. Open the DHCP snap-in.

  2. In the left pane, right-click on DHCP and select Add Server.

  3. Type in the name of the DHCP Server you want to target and click OK.

  4. Right-click the server in the left pane and select Properties.

  5. Click the Advanced tab.

  6. Enter the number of ping attempts beside Conflict detection attempts. I highly recommend you use either 1 or 2.

  7. Click OK.

Using a command-line interface

The following command configures conflict detection:

> netsh dhcp server \\<ServerName> set detectconflictretry <PingAttempts>

This command displays the current conflict detection setting:

> netsh dhcp server \\<ServerName> show detectconflictretry

Using VBScript

See Recipe 14.0 for more information on how to run the netsh command from within a script.

Discussion

Enabling address conflict detection is generally a good idea so clients don't obtain an IP address in use by another computer. The DHCP Server will ping the IP address it is about to grant to ensure nothing responds. You can configure the number of ping attempts, but one or two should be sufficient in most cases.

You might wonder why conflict detection is even necessary. There are three situations where a DHCP Server can give a lease for an IP address that is already in use:

  1. A user hardcodes an IP address that is within a scope's IP address range.

  2. The DHCP Server's database becomes corrupted or lost and the server does not know which clients it previously gave leases to. Since its lease database is empty, the server may start handing out previously allocated leases.

  3. A buggy DHCP client does not use its lease correctly.

Enabling conflict detection adds some overhead to the lease request process. Each ping attempt must timeout, which takes about a second per attempt, before the server can grant the lease. For this reason, you don't want to configure more than one or two ping attempts.

See Also

MS KB 161430 (DHCP: Detecting and Flagging Duplicate IP Addresses)



Windows Server Cookbook
Windows Server Cookbook for Windows Server 2003 and Windows 2000
ISBN: 0596006330
EAN: 2147483647
Year: 2006
Pages: 380
Authors: Robbie Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net