Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

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

Posted

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. :D

Posted

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?

Posted
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. :D

 

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

Posted

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

Posted

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

Posted
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!'

Posted

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.

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

 

RFC2131 States that once the lease is agreed the DHCP process does repeat through the lease period a shortened version of which uses a dhcp request and dchp acknowledgment in communication between client and server. Why would this be different on Linux, if it is then Linux does not comply with RFC2131 and MS does?

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

 

I agree and I very rarely come across issues with windows DHCP only where networking issues prevent the DHCP server from contacting the DC. I would recommend spanning the scope over two DHCP servers to provide some redundancy.

Posted
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. :D

 

Wow. DHCP server would have to be stoopid to fall for that one. Surely it would just look up the MAC address and hand back the same address.

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

 

Hello I am back online and feeling fine. I am not broken I have to say thankfully! It's not my fault if someone decides to switch me off is it? :lol:

 

Remeber kids! I'm here to wash your IP address assigning blues away! You want a new IP address no worries! Have you been here before? No? Have a newly assigned IP address then! Here you go, just for you!

 

How long would you like that for sir? 14 day lease? No problem at all!

 

Your friendly DHCP is happy to help! I am near not far just like your local SPAR!

 

:D

Posted

Hum, missed the replies on this thread the first time round. Anyway, to answer your questions. :)

 

RFC2131 States that once the lease is agreed the DHCP process does repeat through the lease period a shortened version of which uses a dhcp request and dchp acknowledgment in communication between client and server

 

Yes, that's correct.

 

Why would this be different on Linux, if it is then Linux does not comply with RFC2131 and MS does?

 

As I explained (possibly badly) Windows DHCP does not reliably give out the same IP for a lease when responding to a DHCP REQUEST. This doesn't seem to bother Windows clients at all. However in a mixed network enviroment (no idea about Macs) paticularly with Linux machines (or indeed Linux based devices) hilarity can ensue. Linux expects to get the same IP back. As I've said, Windows Server doesn't always do this. Resulting in a DHCP REQUEST / DHCP OFFER storm between the Linux client and the Windows Server. Linux will eventually give up and blacklist the DHCP server. Resulting in no network configuration (unless you've setup a backup configuration).

 

What should happen is the DHCP server should send a DHCP NAK telling the client it's idea of network configuration is wrong. The client will then merrily do a DHCP DISCOVER and it'll work out fine.

 

Oh, and MS DHCP doesn't seem to support DHCP SELECTION either. A minor nitpick but it would be easier to do load balancing (no need for scopes) if the client/server supported it.

 

Wow. DHCP server would have to be stoopid to fall for that one. Surely it would just look up the MAC address and hand back the same address.

 

Microsoft DNS Server for NT4 Server had this 'feature'.

Posted

I'm not going to dispute this Geoff, as you will know more about Linux than I do. But it does seem nonsensical that when your Linux box has not been used for a period of time that takes it beyond the lease expiry date, that it could loose this address. So does Linux then give us the same hilarity as you described it, or does it just receive a NAK and then requests a new address like other clients. (A Storm as you described) or a simple Discover, Offer, Request and Acknowledgement the four steps in the lease process. So if your correct and Linux does as you say then surely its Linux that is broken not M$ as in your own words

As I explained (possibly badly) Windows DHCP does not reliably give out the same IP for a lease when responding to a DHCP REQUEST. This doesn't seem to bother Windows clients at all. However in a mixed network enviroment (no idea about Macs) paticularly with Linux machines (or indeed Linux based devices) hilarity can ensue. Linux expects to get the same IP back.

Posted

sudo vi /etc/network/interfaces

 

* edit *

 

iface eth0 inet static

address 192.168.1.100

netmask 255.255.255.0

network 192.168.1.0

broadcast 192.168.0.255

gateway 192.168.1.1

 

* edit *

 

sudo /etc/init.d/networking restart

 

:lol:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...