Windows Server DHCP leases time frame

Damjan
Damjan used Ask the Experts™
on
Hi,

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...
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Hi,

No, this is not possible...

You could limit the access for the user to office hours in the user object, but not in the DHCP lease.

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

Commented:
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!

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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial