Community discussions

MikroTik App
 
jKaufmann
just joined
Topic Author
Posts: 11
Joined: Tue Mar 09, 2021 11:47 pm

DHCP-server lease-time

Tue Mar 16, 2021 11:59 pm

In Webfig Terminal (RouterOS v6.47.9), when I attempt to set a lease time:
/ip dhcp-server set lease-time 0s
an error returns:
expected end of command (line 1 column 32)
The problem has nothing to do with
0s
(indefinite lease); error is the same regardless of argument, regardless of number, with or without "s". If I terminate the line with no argument, it returns "
no such item
". What is wrong?
 
biomesh
Long time Member
Long time Member
Posts: 561
Joined: Fri Feb 10, 2012 8:25 pm

Re: DHCP-server lease-time

Wed Mar 17, 2021 2:22 am

You have to specify the dhcp server instance/config.
 
jKaufmann
just joined
Topic Author
Posts: 11
Joined: Tue Mar 09, 2021 11:47 pm

Re: DHCP-server lease-time

Wed Mar 17, 2021 11:55 pm

You have to specify the dhcp server instance/config.
Thanks, but can you point me toward info on that? I have found nothing in the wiki or new documentation on it, and am getting no leads from the command line help.
 
biomesh
Long time Member
Long time Member
Posts: 561
Joined: Fri Feb 10, 2012 8:25 pm

Re: DHCP-server lease-time

Thu Mar 18, 2021 1:07 am

/ip dhcp-server add address-pool=dhcp_pool0 disabled=no interface=bridge1 name=dhcp1 lease-time=0s

It's in the docs but the option isn't on many of the examples. When in doubt use tab completion. I'm not sure if it's available in webfig since I don't use it.

Who is online

Users browsing this forum: BartoszP and 30 guests