Link to home
Start Free TrialLog in
Avatar of Damjan
DamjanFlag for Slovenia

asked on

Windows Server DHCP leases time frame


I want to configure my DHCP Server on w2008R2 to assign IP addresses to clients only between working hours (8am - 4pm,). Is it possible? How can I manage that?
I need this for testing purposes only...
Avatar of EVeuger
Flag of Netherlands image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This isn't possible within DHCP itself. you could implement this in another way though - set a scheduled task at 4pm to run 'net stop dhcpserver' then setup another at 8 to run 'net start dhcpserver'.

It's a bit of a bodge and I don't know if I'd like to do it myself but it should let you achieve what you're after.
Stopping the DHCP server would only stop it from handing out new addresses, it will not prevent the clients who already have a lease to get access to the network!
Apologies. I must have read the question wrong. In that case EVeuger is correct. This isn't possible.
You could shorten the lease too something extremely short, so when the client's lease runs out, it will attempt to contact the DHCP server again, which would be unavailable if you created a task to stop the service at a certain time.

Only downfall I see to this is the unnecessary traffic generated in the DORA process for your clients across your production network.