I'm wondering if there is a formula to work out the amount of IP addresses in a given range.
I have a system that takes either a single IP address or a start and and end IP address:
- A single one might be:
- A range might be:
184.108.40.206 - 220.127.116.11
The people inputting these aren't technical, nor are they receiving these details from technical people, so suggesting using CIDR notation isn't an answer for me.
I want to be able to highlight that when entering a range such as:
18.104.22.168 - 22.214.171.124 it might not actually be a range and rather 2 singular IP addresses since such a range would comprise of
x (large number of) IP addresses.
Is there a basic formula to help me highlight this?