+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 29
Wireless Networks Thread, Why doesnt DHCP work as it should in theory? in Technical; Theory has always told me that when a PC gets a DHCP address, it will try to renew 50% through ...
  1. #1

    Join Date
    Jul 2006
    Location
    London
    Posts
    2,962
    Thank Post
    159
    Thanked 152 Times in 116 Posts
    Rep Power
    49

    Why doesnt DHCP work as it should in theory?

    Theory has always told me that when a PC gets a DHCP address, it will try to renew 50% through the lease, if it cannot, it will try again at 75%, and if it still cant, it actually expires at the end.

    Our DHCP lease duration is set to 8 days. So a PC SHOULD be able to go for at least 4 days with no DHCP server yes?

    However, whenever we have a problem with DHCP, for example a few weeks ago we rebooted the server and DHCP didnt start. Shouldnt be a problem right? Well, no-one could log on. I would expect some PC's whose lease had run out to not be able to, but NO-ONE could

    Also if we say reboot a PC and it cant find the DHCP server due to network traffic etc, it instantly gives itself a 169.x address. Yet if it has only just got a lease on the last reboot (say its a new build) shouldnt it keep the address?

    I dont know if something is configured wrong or if my theories about DHCP are just wrong?

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,009
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108

    Re: Why doesnt DHCP work as it should in theory?

    It still looks to the server for the lease information.

  3. #3

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Why doesnt DHCP work as it should in theory?

    According to the DHCP RFC specs, yes what you say is what should happen. However MS's implementation of the RFC spec is faulty/broken/wrong.

    You might want to consider using two DHCP servers if your having reliablility problems.

  4. #4

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,812
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168

    Re: Why doesnt DHCP work as it should in theory?

    I thought the renewal times applied to a computer that is switched on for that length of time.

    If you switch it off and on again then its going to go through the whole DHCP discovery process - no DHCP server - then no server assigned address.

    (Then it trys alternate address if provided - then defaults to a 169.xxx number)

    regards

    Simon

  5. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Why doesnt DHCP work as it should in theory?

    No, the client is supposed to preserve it's lease information between reboots. Linux does this by recording it in '/var/dhcp/dhcp.leases' for instance.

    If it didn't you'd be able to DoS a DHCP server by repeatedly rebooting your machine. Each time it wold request a new lease, until the DHCP server ran out of addresses.

  6. #6

    Join Date
    Jul 2006
    Location
    London
    Posts
    2,962
    Thank Post
    159
    Thanked 152 Times in 116 Posts
    Rep Power
    49

    Re: Why doesnt DHCP work as it should in theory?

    OK fair enough

    I was thinking about adding a second one so the load is evened out a bit

    Was thinking of giving both the entire scope then excluding half on each one

    Thing is, is this going to give me major problems if I do it during term time?
    Would it be better to create the second one, get that authorised and live and then set up the exclusion on the original one?

  7. #7

    Join Date
    Jul 2006
    Location
    London
    Posts
    2,962
    Thank Post
    159
    Thanked 152 Times in 116 Posts
    Rep Power
    49

    Re: Why doesnt DHCP work as it should in theory?

    Quote Originally Posted by Geoff
    No, the client is supposed to preserve it's lease information between reboots. Linux does this by recording it in '/var/dhcp/dhcp.leases' for instance.

    If it didn't you'd be able to DoS a DHCP server by repeatedly rebooting your machine. Each time it wold request a new lease, until the DHCP server ran out of addresses.
    Good, I thought clients should be able to. So it could be a MS oddity then?

    But surely you couldnt DoS a server that way, because its still going to have the lease information in its database, so even if a client does keep requesting, its always going to give it the same address

  8. #8

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Why doesnt DHCP work as it should in theory?

    It's supposed to, but MS DHCP server doesn't do it reliably. Hence my earlier comment about it being broken. :P

  9. #9

    Join Date
    Jul 2006
    Location
    London
    Posts
    2,962
    Thank Post
    159
    Thanked 152 Times in 116 Posts
    Rep Power
    49

    Re: Why doesnt DHCP work as it should in theory?

    So you recommend I implement a Linux one then :P

  10. #10

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Why doesnt DHCP work as it should in theory?

    You need to migrate your DNS too.

    DNSMasq has all the features you need.

  11. #11

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,812
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168

    Re: Why doesnt DHCP work as it should in theory?

    As an experiment I just tried rebooting my Xubuntu test machine (i'm at home ) and it did not retain its IP address after disconnecting it from DHCP server and rebooting it. (Not suprisingly really)

    So in practice I don't think this is a windows/linux issue at all.

    regards
    Simon

  12. #12

    Join Date
    Sep 2006
    Location
    Essex
    Posts
    781
    Thank Post
    1
    Thanked 32 Times in 30 Posts
    Rep Power
    24

    Re: Why doesnt DHCP work as it should in theory?

    I would investigate why DCHP didn't start after re-booting the server, especially if the sever is the PDC for your domain.

  13. #13

    Join Date
    Jul 2006
    Location
    London
    Posts
    2,962
    Thank Post
    159
    Thanked 152 Times in 116 Posts
    Rep Power
    49

    Re: Why doesnt DHCP work as it should in theory?

    It was only that once, subsequent reboots have been fine

    The error I got that day was "The DHCP Server Failed to see a directory server for authorization"

    However there were no other errors that would indicate something else hadnt started that could have caused it to not authorise

    For static IP clients the network was working perfectly

  14. #14

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Why doesnt DHCP work as it should in theory?

    Quote Originally Posted by SimpleSi
    As an experiment I just tried rebooting my Xubuntu test machine (i'm at home ) and it did not retain its IP address after disconnecting it from DHCP server and rebooting it. (Not suprisingly really)
    Obviously if there's no DHCP server it can't safely assume that it can use its old IP address.

    What it'll do when it contacts the DHCP server is ask 'Can I have my old IP back?' instead of blindly saying 'I need an IP!'

  15. #15
    Disease's Avatar
    Join Date
    Jan 2006
    Posts
    1,093
    Thank Post
    117
    Thanked 70 Times in 48 Posts
    Rep Power
    56

    Re: Why doesnt DHCP work as it should in theory?

    The Dynamic Host Configuration Protocol (DHCP) is an Internet protocol for automating the configuration of computers that use TCP/IP. DHCP can be used to automatically assign IP addresses, to deliver TCP/IP stack configuration parameters such as the subnet mask and default router,and to provide other configuration information such as the addresses for printer, time and news servers.

    It's not a windows problem, its required.

    Each time you reboot the client it says to the DHCP can I have the address I am leased, the server says yes. DHSP holds the lease not the client.

    DHCP is not broken on windows and is working as intended.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. "if you can't work with them, work round them"
    By djm968 in forum General Chat
    Replies: 45
    Last Post: 30th June 2008, 11:13 AM
  2. MAC OSX NOT GETTING IP FROM DHCP
    By thegrassisgreener in forum Mac
    Replies: 4
    Last Post: 18th January 2008, 08:50 AM
  3. Batch file to remove registry key doesnt work
    By sidewinder in forum Windows
    Replies: 4
    Last Post: 7th December 2007, 04:48 PM
  4. VPN +DHCP
    By Dos_Box in forum Wireless Networks
    Replies: 7
    Last Post: 30th September 2005, 01:14 AM
  5. DHCP
    By kingswood in forum Wireless Networks
    Replies: 10
    Last Post: 7th September 2005, 06:29 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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