Page 1 of 1
DHCP Option 51
Posted: Thu Oct 29, 2020 10:25 am
by netboyzin
Hi
Can I specify DHCP Lease Time through DHCP Option 51 in Mikrotik DHCP Server instead of specifying Lease-Time directly in DHCP Server ?
BR
Re: DHCP Option 51
Posted: Fri May 07, 2021 5:09 pm
by IntLDaniel
I would like to know the same. It means, I am trying to set an option (code 51) for DHCP option set but it does not work for me. Static leases clients with selected option set still uses predefined lease time value from DHCP server. Maybe I do no know the right format for the time in that option?
I have tried values in "Value" field like:
'1h'
'00:60:00'
'01:00:00'
'00 01:00:00'
but nothing works for me :-( RouterOS 6.48.2
Re: DHCP Option 51
Posted: Fri May 07, 2021 6:21 pm
by rextended
On static dhcp leases already is present lease-time.
If you want change lease time to be different to dhcp server, simply modify inside static lease.
If you want change all lease with specific lease-time (but is effective at the end of current leased time)
simply put for example
/ip dhcp-server lease [find] lease-time=1h
about value, is 4Byte number of seconds, from 0 to 4.294.967.295 seconds, more than 100 years
Re: DHCP Option 51
Posted: Fri May 07, 2021 6:24 pm
by IntLDaniel
Thanks for reply. So you mean that option 51 (lease time) cannot be set via Option Sets and I HAVE TO use an option in static lease definition?
Re: DHCP Option 51
Posted: Fri May 07, 2021 6:36 pm
by rextended
Thanks for reply. So you mean that option 51 (lease time) cannot be set via Option Sets and I HAVE TO use an option in static lease definition?
Yes, near all DHCP software ignore "Apple" DHCP 51 request (request for lease bigger than DHCP Server setting)...
If someone set on dhcp server, for example, 1h, 1h must be...
Re: DHCP Option 51
Posted: Fri May 07, 2021 6:40 pm
by IntLDaniel
Interesting...but clear to me why it does not work. Thanks!