1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Question regarding how DHCP requests work

Discussion in 'Networking (Hardware & Software)' started by rlambert7, 2004/04/17.

Thread Status:
Not open for further replies.
  1. 2004/04/17
    rlambert7

    rlambert7 Inactive Thread Starter

    Joined:
    2003/09/10
    Messages:
    199
    Likes Received:
    0
    My PC gets its IP address from a DHCP server. The lease expiration time is 24 hours from the time the lease was obtained.

    I read somewhere on MS's website that DHCP leases are automatically renewed when one half of the lease expiration time is reached. I've seen that happen on my PC occasionally, but not always (actually, rarely). I've used the command "ipconfig/renew_all ", and observed it work occasionally, too, but most of the time it returns, DHCP server Unavailable: renewing adapter " ". But, if I reboot my PC, the DHCP lease is renewed.

    So, what is different about the DHCP request that is made when I reboot versus the DHCP request that is made when I try "ipconfig/renew_all "?
     
  2. 2004/04/17
    Angel71

    Angel71 Inactive

    Joined:
    2003/09/01
    Messages:
    83
    Likes Received:
    0
    One explanation could be that the DHCP request is being blocked by a software firewall (like ZoneAlarm) but when you reboot the machine, the firewall isn't immediately active. Try it with just /renew too.
     
    Last edited: 2004/04/17

  3. to hide this advert.

  4. 2004/04/17
    Newt

    Newt Inactive

    Joined:
    2002/01/07
    Messages:
    10,974
    Likes Received:
    2
    If you leave the PC running and do nothing, does your lease get renewed?
     
    Newt,
    #3
  5. 2004/04/17
    rlambert7

    rlambert7 Inactive Thread Starter

    Joined:
    2003/09/10
    Messages:
    199
    Likes Received:
    0
    <One explanation could be that the DHCP request is being blocked by a software firewall (like ZoneAlarm) but when you reboot the machine, the firewall isn't immediately active. Try it with just /renew too.>

    Hmm, interesting. I do have Zonealarm, but I think it is one of the first things to "fire up ". Nevertheless, I thought I'd try turning off the firewall. I was just about to do that, but I thought I'd better first try the "ipconfig/renew_all" again before I turned it off. I did try it (just now), and this time it worked (without turning off the firewall). So, go figure. The way I have the firewall configured right now is to have it blab to me everytime it attempts to do something or even when it blocks something, so I'd say it seems to be letting the DHCP request through OK.

    BTW, I think the "/renew" requires an adapter number. Anyway, I've tried that, too, and not seen it work.

    <If you leave the PC running and do nothing, does your lease get renewed?>

    I've seen it happen on rare occasion, but usually, no, it does not.

    I was just about to post this, but I went back, and tried the "ipconfig/renew_all" again. It worked. In fact, I could do again, and again, and again. Sheesh. (The "ipconfig/renew adapter_number" worked, too.)

    Anyway, I'll keep the firewall in mind, and the next time the command does not work, I'll try turning off the firewall, and see if that makes any difference. Perhaps the DHCP server is wacko???
     
  6. 2004/04/19
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    Network connections are established and recorded by Windows when booting, before the operating system fully loads. Explore.exe is not yet loaded either, nor is True Vector Service (ZA) loaded yet.

    Your previous attempts to renew the ip address may actually have been successful every time. Often the DHCP server will issue the same IP address to you. The only noticable change will be the date and time of lease.

    You can also use the GUI version of ipconfig: (for NT, 2K & XP)
    http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/wntipcfg-o.asp
     
  7. 2004/04/19
    rlambert7

    rlambert7 Inactive Thread Starter

    Joined:
    2003/09/10
    Messages:
    199
    Likes Received:
    0
    < Your previous attempts to renew the ip address may actually have been successful every time. Often the DHCP server will issue the same IP address to you. The only noticable change will be the date and time of lease >

    No, they were not successful. It very easy to check to see if they were or not [renewed]. All you have to do is "ipconfig/all ", and look at the lease times. But actually, I can tell if the "ipconfig/renewal_all" is going to work in <2 seconds after I issue the command. If it's going to work, it's done in about that amount of time. Otherwise, it sits there for about 15-30 seconds (and then fails).

    Also, about an hour or so ago, I tried to renew the lease, and it did not work. So, I shut off the firewall, and tired it with the firewall off. Still did not work. So, I immediately rebooted, and got a renewed lease (with the same IP address).

    I tried "ipconfig/renew_all" just now [moments before posting this]. It worked. Firewall was/is on.
     
  8. 2004/04/19
    Newt

    Newt Inactive

    Joined:
    2002/01/07
    Messages:
    10,974
    Likes Received:
    2
    Since ipconfig /renew will renew all adapters, why are you adding in the renew_all?

    I'm not even sure that is a valid command. I see a few google references to both /renew_all and /release_all but my XP-pro system barks at me when I try either of them.
    Code:
    USAGE:
        ipconfig [/? | /all | /renew [adapter] | /release [adapter] |
                  /flushdns | /displaydns | /registerdns |
                  /showclassid adapter |
                  /setclassid adapter [classid] ]
    
    where
        adapter         Connection name 
                       (wildcard characters * and ? allowed, see examples)
    
        Options:
           /?           Display this help message
           /all         Display full configuration information.
           /release     Release the IP address for the specified adapter.
           /renew       Renew the IP address for the specified adapter.
           /flushdns    Purges the DNS Resolver cache.
           /registerdns Refreshes all DHCP leases and re-registers DNS names
           /displaydns  Display the contents of the DNS Resolver Cache.
           /showclassid Displays all the dhcp class IDs allowed for adapter.
           /setclassid  Modifies the dhcp class id.  
    
    The default is to display only the IP address, subnet mask and
    default gateway for each adapter bound to TCP/IP.
    
    [COLOR=darkred][b][i]For Release and Renew, if no adapter name is specified, then the IP address leases 
    for all adapters bound to TCP/IP will be released or renewed.[/i][/b][/COLOR]
    
    For Setclassid, if no ClassId is specified, then the ClassId is removed.
    
    Examples:
        > ipconfig                   ... Show information.
        > ipconfig /all              ... Show detailed information
        > ipconfig /renew            ... renew all adapters
        > ipconfig /renew EL*        ... renew any connection that has its 
                                         name starting with EL
        > ipconfig /release *Con*    ... release all matching connections,
                                         eg.  "Local Area Connection 1" or
                                              "Local Area Connection 2"   
     
    Newt,
    #7
  9. 2004/04/19
    rlambert7

    rlambert7 Inactive Thread Starter

    Joined:
    2003/09/10
    Messages:
    199
    Likes Received:
    0
    < Since ipconfig /renew will renew all adapters, why are you adding in the renew_all?

    I'm not even sure that is a valid command. I see a few google references to both /renew_all and /release_all but my XP-pro system barks at me when I try either of them. >

    I'm running W98. Here's what I get if I do "ipconfig /? ":

    Windows 98 IP Configuration
    Command line options:
    /All - Display detailed information.
    /Batch [file] - Write to file or ./WINIPCFG.OUT
    /renew_all - Renew all adapters.
    /release_all - Release all adapters.
    /renew N - Renew adapter N.
    /release N - Release adapter N.

    If I do "ipconfig/all ", I see 3 ethernet adapters: 0, 1, & 2. Adapter 2 is the one that uses DHCP. The others do not. It does not matter whether I use the command "ipconfig/renew_all" or the command "ipconfig/renew 2 ". When one fails [to renew], so does the other one. When one works, i.e., the renew is successful, so does the other one.

    My guess is that since adapters 0 & 1 are not using DHCP, the "ipconfig/renew_all" just doesn't bother with them
     
  10. 2004/04/19
    Newt

    Newt Inactive

    Joined:
    2002/01/07
    Messages:
    10,974
    Likes Received:
    2
    Ah - thanks. So 9X has the ..._all piece. Didn't know that.

    And you are correct that only an adapter set to use auto-assigned values (usually DHCP these days) will respond to the renew or release.
     
    Newt,
    #9
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.