03-26-2018 06:58 AM - edited 03-08-2019 02:23 PM
Hello,
I have cisco router 2600 series and configured as DHCP server, so, i want it to stop obtaining IP Addresses in specific time and start obtaining IP Addresses again in specific time.
Regrads,
Hasan Nisar
03-26-2018 08:57 AM
Hi,
you can configure Time-based ACL on your router as below:
time-range dhcp-block
periodic daily 20:00 to 8:00 <mention time here>
!
access-list 101 deny udp any any eq bootpc time-range dhcp-block
access-list 101 deny udp any any eq bootps time-range dhcp-block
access-list 101 permit ip any any
!
Apply the ACL in LAN interface.
Regards,
Deepak Kumar
03-26-2018 09:14 AM
Hello,
I would go for a time range extended ACL with bootpc as source port and bootps as destination port and apply it on the interface in the inbound direction:
https://www.cisco.com/c/en/us/support/docs/security/ios-firewall/23602-confaccesslists.html
But be aware that hosts can still use static IP addresses or keep their lease for 50% of their lease time (on windows 7 even if rebooted, the obtained lease is used for this time if the host can join the gateway specified in the lease)
03-26-2018 09:22 AM
Hasan
I find your post confusing. You describe the 2600 as being configured as server. Then you want it to obtain address and stop obtain address at specific times. This behavior suggests operating as client rather than as server. Can you provide clarification?
I believe that if you want to change behavior at specified times that your solution will be to write two EEM scripts. One EEM script will check for time and begin the appropriate behavior. The second EEM script will check for time and will stop the behavior.
HTH
Rick
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide