Community discussions

MikroTik App
 
vodnik911
just joined
Topic Author
Posts: 1
Joined: Sat Jun 06, 2020 10:04 pm

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

Sat Jun 06, 2020 10:11 pm

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
 
User avatar
mpuria
just joined
Posts: 13
Joined: Sun Dec 06, 2020 12:56 am
Location: Philippines
Contact:

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

Wed Jan 20, 2021 6:07 pm

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.
 
tdw
Forum Guru
Forum Guru
Posts: 2086
Joined: Sat May 05, 2018 11:55 am

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

Wed Jan 20, 2021 6:48 pm

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.
 
User avatar
mpuria
just joined
Posts: 13
Joined: Sun Dec 06, 2020 12:56 am
Location: Philippines
Contact:

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

Sun Jan 24, 2021 6:36 am

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