Avatar of Damjan
Damjan
Flag for Slovenia asked on

Windows Server DHCP leases time frame

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...
Microsoft Legacy OSWindows Networking

Avatar of undefined
Last Comment
motnahp00

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
EVeuger

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Chris

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.
EVeuger

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!
Chris

Apologies. I must have read the question wrong. In that case EVeuger is correct. This isn't possible.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
motnahp00

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.