Community discussions

MikroTik App
 
User avatar
arsalansiddiqui
just joined
Topic Author
Posts: 23
Joined: Mon Aug 14, 2017 1:03 pm
Location: Karachi, Pakistan
Contact:

Total IP's count

Sat Nov 06, 2021 5:37 pm

Hi all,
I want to get total number of ips in ip pool with a given name like: public-ip-pool in PHP.
I get used ips in php but i dont know how to get total ips with api.

I saw some methods using bash script with ssh but i dont understand it.
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 767
Joined: Mon May 27, 2013 2:05 am

Re: Total IP's count

Sun Nov 07, 2021 2:46 am

Get the ranges property and extrapolate from that, detect if its CIDR notation or x-y notation and then you can do the maths from then to figure out pool size.
 
User avatar
arsalansiddiqui
just joined
Topic Author
Posts: 23
Joined: Mon Aug 14, 2017 1:03 pm
Location: Karachi, Pakistan
Contact:

Re: Total IP's count

Sun Nov 07, 2021 11:05 am

isnt there a property/method where i get counts ?
 
Dude2048
Member Candidate
Member Candidate
Posts: 212
Joined: Thu Sep 01, 2016 4:04 pm

Re: Total IP's count

Sun Nov 07, 2021 11:56 am

Who is online

Users browsing this forum: JDF and 24 guests