Community discussions

MikroTik App
 
netboyzin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Thu Mar 21, 2013 3:42 pm

DHCP Option 51

Thu Oct 29, 2020 10:25 am

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
 
IntLDaniel
Frequent Visitor
Frequent Visitor
Posts: 56
Joined: Thu Apr 04, 2019 7:21 pm

Re: DHCP Option 51

Fri May 07, 2021 5:09 pm

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
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP Option 51

Fri May 07, 2021 6:21 pm

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
Last edited by rextended on Fri May 07, 2021 6:38 pm, edited 2 times in total.
 
IntLDaniel
Frequent Visitor
Frequent Visitor
Posts: 56
Joined: Thu Apr 04, 2019 7:21 pm

Re: DHCP Option 51

Fri May 07, 2021 6:24 pm

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?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP Option 51

Fri May 07, 2021 6:36 pm

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...
 
IntLDaniel
Frequent Visitor
Frequent Visitor
Posts: 56
Joined: Thu Apr 04, 2019 7:21 pm

Re: DHCP Option 51

Fri May 07, 2021 6:40 pm

Interesting...but clear to me why it does not work. Thanks!

Who is online

Users browsing this forum: Google [Bot], holvoetn, karlisi and 90 guests