| Programming | Software Engineering | Web Design | Database | Operating Systems

How to set DHCP scope lease time through netsh

A.J.Anto
Keywords: DHCP,netsh
From: http://blogs.msdn.com/anto_rocks/archive/2005/03/28/402862.aspx

In this post, I am going to talk about how to set the lease time for a given scope in the DHCP server through netsh command-line. The command is a little unintuitive considering the fact that you won't be mentioning anything about lease time in the command itself. The fact that you are updating the lease time is specified through the option-id for the lease time option. Without delaying any longer, let me give the command:

netsh dhcp server scope 10.0.0.0 set optionvalue 51 DWORD 3600

Let me explain this command: scope 10.0.0.0 specifies that you are going to change the lease time of the scope whose id is 10.0.0.0. 51 is the option-id for the option Lease time. This is an IETF assigned number: http://www.faqs.org/rfcs/rfc2132.html DWORD is the datatype of the lease-time option. And finally 3600 represents the option value in number of seconds.

Compare this to the way you edit the lease time in your snap-in. You right-click on the scope icon and click 'Properties' and change the lease time. That's it!! That's a lot simpler I must say....


Related Article
  • All about the DHCP server callout API functions
  • Documentation related to Windows DHCP Server and Client
  • How do you find out the instantaneous load of the DHCP server
  • All about DHCP vendor classes and user classes
  • Why are some of the addresses in the Address Leases for a given scope are marked as BAD_ADDRESS in the DHCP snap-in

  • Comment
    No comment now.
    Add Your Comment:
    Your Name:      
    Your Comment:
    Note: After you post comment,please refresh the browser to show you comment.
    Search In YeYan.CN:
     

    Home | Privacy Policy | Copyright Policy | Contact Us | Site Map
    Copyright © 2006 YeYan.CN, All Rights Reserved.