Comments (1)
I try my best to explain the calculation about the CIDR calculation. The IP address contains 4 octets, and each of them are 8 bits that give values between 0 and 255. The number that comes after the slash is the number of bits consisting of the routing prefix. This can be calculated as netmask, and also determine how many available addresses are in the block.
If the routing prefix value is less than 31, first and last IPs are base and broadcast addresses and are unusable.
For the group you suggested (124.55.21.1 - 124.55.21.227), where the CIDR base IP is on 124.55.21.0, the closest group you can get is 124.55.21.1/25. Its first useable IP is 124.55.21.1 and last usable IP is 124.55.21.126 (Not 124.55.21.127).
You can cross-check the result with ARIN, and Wikipedia.
from ip2location-go.
Related Issues (12)
- This client doesn't support IP2Proxy database HOT 1
- Re-write in idiomatic Go? HOT 2
- importing the package fails HOT 1
- Idiomatic Go HOT 1
- Mistake in latest version tag HOT 1
- ip2location.IP2Locationrecord has no field or method ProxyType HOT 2
- Reduce GC pressure HOT 3
- Timezone is empty and EOF is always an error HOT 3
- New library HOT 10
- Index out of range
- DB Info HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ip2location-go.