none
DHCP renewal failure on Windows 7 x64: possible causes?

    Question

  • My workplace recently switched from 24-hour DHCP leases to 2-hour leases.  This seems to have surfaced a DHCP renewal problem.  Specifically, leases are not being renewed as normal.  At the end of each lease, users' machines are left with 169.* automatic addresses.  Upon enabling the Microsoft-Windows-Dhcp-Client/Operational log, I see:

    Request-Ack is initiated on the adapter with Interface Id 14 (at the moment when the lease is scheduled to expire)

    An error has occurred in opening the socket in the adapter 14. Error Code is 0x2741 (several times afterward)

    and finally

    Cancelling pending renewals on the adapter in the Interface Id 14

     

    As I understand it, DHCP leases are supposed to be renewed well before they expire, generally halfway through the lease's lifetime, but it seems that this isn't happening.  Instead, Windows is taking no action until the second that the lease expires.  Can anyone suggest any measures to try?  Also, is there a way to view the time of the next planned DHCP renewal under Windows?  (You can under some OSes.)  Thanks!

     

    Update:

    Multiple users (with near-identical system images) are experiencing this problem.

    This problem only occurs under Windows; Linux machines are unaffected.

    This problem only seems to occur on each machine's Gigabit Ethernet adapter; wireless adapters seem to renew leases normally.

    Wednesday, November 09, 2011 7:31 PM

Answers

  • My office changed the renewal to every 12 hours, which doesn't address the root cause of this issue but does alleviate the symptoms.  Thanks for your suggestions, everyone.
    Tuesday, November 15, 2011 6:14 PM

All replies

  • First thing I would suggest is to do an IPCONFIG /ALL on one of the affected clients and see if the DHCP server matches the IP address of your DHCP server.

    Recently, a user on my network brought in a laptop that was infected with malicious software, and it acted like a DHCP server, and before I knew it, a bunch of users had weird IP addresses.

    This may not be your problem, but I'd check it just to be sure.

    Also, make sure there are enough addresses in your scope to satisfy the amount of leases needed.

    Thursday, November 10, 2011 4:37 AM
  • First thing I would suggest is to do an IPCONFIG /ALL on one of the affected clients and see if the DHCP server matches the IP address of your DHCP server.

    Recently, a user on my network brought in a laptop that was infected with malicious software, and it acted like a DHCP server, and before I knew it, a bunch of users had weird IP addresses.

    This may not be your problem, but I'd check it just to be sure.

    Also, make sure there are enough addresses in your scope to satisfy the amount of leases needed.

    The DHCP server address is correct.

    There are plenty of addresses.

    Thanks for the suggestions.  The problem is that Windows isn't even making an attempt to renew the lease before its expiration. The initial lease is acquired without any apparent problems; the difficulty is only in renewal.  It's a problem on the client side and is Windows-specific.  (I'm not yet sure if it's Windows 7-specific.)

    I've looked at netsh's dhcpclient options but haven't found anything that affects renewal behavior.  Likewise for browsing through the registry, group policies, etc.

    Thursday, November 10, 2011 5:56 AM
  • Error code 0x2741 means:

    WSAEADDRNOTAVAIL
    10049 (0x2741)

    The requested address is not valid in its context.

    Question, if you manually release and renew the address on the client, does it work?

    > IPCONFIG /RELEASE

    > IPCONFIG /RENEW

     

    Thursday, November 10, 2011 1:26 PM
  • Error code 0x2741 means:

    WSAEADDRNOTAVAIL
    10049 (0x2741)

    The requested address is not valid in its context.

    Question, if you manually release and renew the address on the client, does it work?

    > IPCONFIG /RELEASE

    > IPCONFIG /RENEW

     

    Yes.  A renewal without releasing also works, just as it should.  (i.e. preserving the continuity of the current lease.)
    Thursday, November 10, 2011 2:06 PM
  • Not sure what is causing the problem, but a quick fix could be to create a batch file:

    > copy con newip.bat

    ipconfig /renew

    <F6>

    >

    Then either attach newip.bat to an e-mail you send to everyone, or make it execute in a login script.

     

    Thursday, November 10, 2011 2:17 PM
  • Not sure what is causing the problem, but a quick fix could be to create a batch file:

    > copy con newip.bat

    ipconfig /renew

    <F6>

    >

    Then either attach newip.bat to an e-mail you send to everyone, or make it execute in a login script.

     

    Well, as I said above: the initial IP acquisition works fine, it's the renewal before end of lease that's the problem.  I could do something like that as a scheduled task, but it'd be a major kludge.  I'd rather fix the source of the problem.
    Thursday, November 10, 2011 2:21 PM
  • I do have a feeling that the problem occurred because you reduced the leases from 24 to 2 hours, and that once you manually tell them all to renew, they will automatically renew every 2 hours.

    Again, I can't tell you what the cause is, but if that doesn't work, I'm not sure where to look next.

     

    Thursday, November 10, 2011 2:41 PM
  • My office changed the renewal to every 12 hours, which doesn't address the root cause of this issue but does alleviate the symptoms.  Thanks for your suggestions, everyone.
    Tuesday, November 15, 2011 6:14 PM