How to force DHCP release through registry on shutdown?
Results 1 to 11 of 11

Thread: How to force DHCP release through registry on shutdown?

  1. #1
    Registered User
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    198

    Post How to force DHCP release through registry on shutdown?

    The following works for windows 98, does anyone know of a way to do this in windows 95?

    SUMMARY
    You can configure Windows 98 to automatically release all Dynamic Host Configuration Protocol (DHCP) lease information at shutdown by modifying the registry.

    MORE INFORMATION
    WARNING : Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

    For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).

    Add the following registry items to cause Windows 98 to automatically release all DHCP lease information at shutdown:

    Key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\VxD\DHCP
    Value name: ReleaseLeaseOnShutdown
    Type: DWORD
    Value data: 0x00000001 (1)
    Key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\Shutdown
    Value name: FastReboot
    Type: STRING
    Value data: 0
    NOTE : The first value (ReleaseLeaseOnShutdown) is not present by default and must be added. The second value (FastReboot) is set to 1 by default.

    The fast shutdown feature must be disabled for this method to work correctly. If it is not disabled, Windows 98 cannot process the command to release the DHCP information before shutting down.

    When Windows 98 obtains TCP/IP configuration information from a DHCP server, it creates registry entries to store that information. If there is a problem contacting the DHCP server the next time the computer is started, the necessary TCP/IP configuration information is already stored. However, this may not be the optimal behavior in some network environments.

  2. #2
    Registered User Gabriel's Avatar
    Join Date
    Aug 2000
    Location
    Tel Aviv Israel
    Posts
    2,161

    Post

    I don't know about registry Tweak
    But you can make -
    Ipconfig /release
    Seems like the easiest way of doing this.

    Alternativaly you can configure the DHCP to lease the IP for period of one day.
    Real stupidity beats Artifical Intelligence
    Avatar courtesy of A D E P T

  3. #3
    Geezer confus-ed's Avatar
    Join Date
    Jul 1999
    Location
    In front of my PC....
    Posts
    13,087

    Post

    Am I being real stupid, but the release should be on the server not the client???

    Isn't that achieved by timeout or some server method, the info you quoted is to do with re-using the same ip and fastboot problems, where if you don't release the ip first the machine has re-booted and is trying to use the same IP as that value hasn't expired in the DHCP tables. <img src="confused.gif" border="0">

  4. #4
    Registered User Gabriel's Avatar
    Join Date
    Aug 2000
    Location
    Tel Aviv Israel
    Posts
    2,161

    Post

    [quote]Originally posted by confus-ed:
    <strong>Am I being real stupid, but the release should be on the server not the client???

    Isn't that achieved by timeout or some server method, the info you quoted is to do with re-using the same ip and fastboot problems, where if you don't release the ip first the machine has re-booted and is trying to use the same IP as that value hasn't expired in the DHCP tables. </strong><hr></blockquote>

    when client machine do
    IPCONFIG /release
    It "tells" the DHCP that the IP is released.
    Real stupidity beats Artifical Intelligence
    Avatar courtesy of A D E P T

  5. #5
    Geezer confus-ed's Avatar
    Join Date
    Jul 1999
    Location
    In front of my PC....
    Posts
    13,087

    Post

    Indeed! So the release is on the DHCP server, not the client. I'm not disagreeing with you Gabriel.

    The info quoted is where a machine might reboot and attempt to use its original ip, not a new one from the server???

  6. #6
    Registered User
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    198

    Post

    [quote]Originally posted by confus-ed:
    <strong>The info quoted is where a machine might reboot and attempt to use its original ip, not a new one from the server???</strong><hr></blockquote>

    This is exactly the problem, I have a user that moves between buildings throughout the day. Each building uses a different ip scheme, so when she boots back up in a new building it is often trying to use an ip address from the previous building. She is not the brightest user and I want to set it up so her machine will release the ip address for her. Is there an easier way of doing this? Can I add ipconfig /release to one of the startup files?

  7. #7
    Geezer confus-ed's Avatar
    Join Date
    Jul 1999
    Location
    In front of my PC....
    Posts
    13,087

    Post

    Ahhhh! Mobile user!

    Comprehension.

    Don't see why you can't use ipconfig/release in say autoexec? Or just put a batch file to do it on her desktop and attatch it to an icon for her to click then she can see its done.

  8. #8
    Registered User Gabriel's Avatar
    Join Date
    Aug 2000
    Location
    Tel Aviv Israel
    Posts
    2,161

    Post

    NOw we both got it
    well, you have many ways to solve it..
    1. Try using symantec mobile essentials (free) - this proggy can switch domains and IP's with ease.
    2. if you use Windows 2K (or higher) you can easily Use the NETSH command utility - which can export and import IP settings from simple TXT files.
    3. I don't remember where Exactly it is BUT in the Registry of Windows 98 there is a place where you can state alternative IP address - in other words - Multihomed computer.

    As always Good Luck
    Gabriel
    Real stupidity beats Artifical Intelligence
    Avatar courtesy of A D E P T

  9. #9
    Registered User
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    198

    Post

    I think I will try the batch file on her desktop, and just have her run it before she leaves a building. I could also make her a batch file to renew the address when she gets to the new building. That way if she doesnt shut down she should still be ok. Thanks for everyones input.

  10. #10
    Registered User Gabriel's Avatar
    Join Date
    Aug 2000
    Location
    Tel Aviv Israel
    Posts
    2,161

    Talking

    [quote]Originally posted by gpint:
    <strong>She is not the brightest user and I want to set it up so her machine will release the ip address for her.</strong><hr></blockquote>

    I have to disagree with you - There is no Such thing as a Bright User - They are all DUMB.

    Real stupidity beats Artifical Intelligence
    Avatar courtesy of A D E P T

  11. #11
    Banned Ya_know's Avatar
    Join Date
    Jun 2001
    Posts
    10,692

    Post

    Winipcfg is not the most difficult of utilities. If the user can use Word, Excel and Outlook with some comprehension, then Winipcfg should be a piece of cake. I usually spend about 15 extra minutes with all mobile users, and explain a slimmed down version of IP's and subnets, then why and how to use this utility. I have yet to have a user not get it.

    For me a properly educated user is far better than anything “made easy” for them. If they can fix their own problems, they are less likely to call for something stupid.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •