Page 1 of 1

Controlling "lease time" ip pool in defined in ppp profile

Posted: Sat Jun 06, 2020 10:11 pm
by vodnik911
Hi Community,

I have just configured ppp for accessing network through VPN. I have defined an IP Pool and used it in ppp in profile.

When couple of devices connect router using vpn they get an IP defined in pool. How to control how long this IP is reserved for this device ? There is no such configuration of lease time in IP Pool and in ppp profile. What if number of free IP in pool reach low limit ? Should i carry about this ?

Regards,
Marcin

Re: Controlling "lease time" ip pool in defined in ppp profile

Posted: Wed Jan 20, 2021 6:07 pm
by mpuria
this is an interesting question. I am too also curious about this.

but I think the answer to this question could be this, but not sure though...
viewtopic.php?t=31142#p184067
one other option is to divide pool in smaller pools, because when /ip pool gives out address it will chech if it has free address, if it has, it will give out, then when all free addresses are used up, it will go through and give out addresses that where assigned previously but now are free, it will jump to next pool when all addresses from first pool if used up, or return error in logs, if no next pool is assigned.

Re: Controlling "lease time" ip pool in defined in ppp profile

Posted: Wed Jan 20, 2021 6:48 pm
by tdw
IP pools have no concept of lease time, that is specific to DHCP. A PPP-like connection uses IPCP to inform the client of their IP address, and lasts for as long as the PPP session is connected.

Address allocation from pools is generally 'sticky' between reboots of the Mikrotik so if a client disconnects and reconnects sometime later it will likely receive the same address. When there are few never-used addressess (or possibly none) then currently inactive ones will be reused by new clients.

The pool (or pools if using next-pool) must contain sufficient addresses for the number of clients which will be active at the same time.

Re: Controlling "lease time" ip pool in defined in ppp profile

Posted: Sun Jan 24, 2021 6:36 am
by mpuria
IP pools have no concept of lease time, that is specific to DHCP. A PPP-like connection uses IPCP to inform the client of their IP address, and lasts for as long as the PPP session is connected.

Address allocation from pools is generally 'sticky' between reboots of the Mikrotik so if a client disconnects and reconnects sometime later it will likely receive the same address. When there are few never-used addressess (or possibly none) then currently inactive ones will be reused by new clients.

The pool (or pools if using next-pool) must contain sufficient addresses for the number of clients which will be active at the same time.
I see. Indeed it makes sense with my current setup as well. Thanks for the explanation!
Cheers