Configuring a short DHCP lease for wireless users

Configuring a short DHCP lease for wireless users

*** Problem Description ***
This particular customer had a very large network with many wireless users.
Wireless users also roamed into differebt subnets getting new IP addresses. It was not uncommon for these users to get 20 or more different IP addresses with an 8 day lease from different subnets. With hundereds of wireless users the IP addresses were getting depleted.
Customer wanted wireless users to get a 1 hour lease. They also want the A and PTR records deleted from DNS shortly after the lease expires.

This can be done with a DHCP user class
Create a New User or Vendor Option Class
1. Start DHCP Manager.
2. In the console tree, click the applicable DHCP server branch.
3. Right-click the server, and then click Define User Classes to create a new user class.
4. Click Add.
5. Enter a name in the Display Name box. Example: "Wireless" (This is for display only)
6. Enter a description in the Description field. Example: "Short lease for wirless users".
7. In the next box click under the ASCII section. Enter a name here. This is the real name of the class (This is also the name that the client will use). Example:
8. Click OK and then click Close.
Configure a DHCP Scope with the New Class ID
1. In DHCP Manager, double-click the appropriate DHCP scope.
2. Right-click Scope Options and then click Configure Options .
3. Click Advanced.
4. In the User Class drop down, select the user class you just defined.
5. In Available Options section, check the box for 051 Lease and click ok.
6. You will now notice 051 Lease is in the Scope Options with a class type of Wireless.
7. Double click 051 Lease
8. Change the value in the "long" field to desired number of seconds. Example:
3600 (3600 seconds = 1 hour) and click ok.
NOTE: This entry will automattically get converted to hex. You can also enter this value in hex by prefixing your entry with 0x. In this case 3600 will get converted to 0xe10.
Configuring the client computers to use this new value.
Client computers that connect to a Windows 2000-based DHCP server can use the following command to set the specified DHCP class ID:
ipconfig /setclassid {adapter name} {class}
For example: ipconfig /setclassid "Local Area Connection" WRCLSS
This will set the class ID to WRCLSS
NOTE : Class IDs in ASCII are case sensitive, and must match the class identifying data entered in the Edit Class dialog box used to create the new user or vendor option class.
Type: ipconfig /all to confirm that the client is now using a one hour lease.

DNS configuration
When a DHCP lease expires it goes into a grace period. Leases that are expired can be identified by the icon with a blue exclamation point on them. The default grace period for Windows server 2003 is 4 hours.
You can shorten the lease grace period with the following regkey:
DWORD value: LeaseExtension
Value measure: minutes
Example: 10
Once a lease is expired it then becomes eligible for deletion
By default the delete cycle on Windows 2003 server is 1 hour
You can shorten the delete cyle with the following regkey:
DWORD value: DatabaseCleanupInterval
Value measure: minutes
Example: 30
When the delete cycle runs it has a limit on the number of records that it can delete in the DNS database. This means that some A and PTR records may not get deleted.
You can increase the number of records that the cycle can delete with the following regkey:
DWORD value: DynamicDNSQueueLength
Value measure: memory size
Example: 2048
You must stop and then restart the DHCP Server service after you apply these registry changes.

Comments (0)

Skip to main content