Comments (1)
Hey @Strykar,
so there's a bit to unpack here, let me try to explain what happened.
First of all: IpQualityScore API key has nothing to do with bulk geolocation performed in the asn
script. The "better" results from your second run are not a result of adding that API key, but rather of exactly how RIPE IPMap works.
When you first ran your asn -g
commands, RIPE IPMap (the primary geolocation service the script uses when doing bulk lookups) had a location of Ranong, Ranong, TH (Thailand)
associated with the IPs you were looking up. This is because IPMap had the following geofeed associated with most of these IPs:
➜ curl -s "https://ipmap.ripe.net/api/v1/locate/143.244.33.78/best" | jq '.location.geofeed'
"143.244.33.78,TH,TH-85,Ranong,"
So your first asn
run reported this (allegedly wrong) geolocation information in its results.
Now what IPMap does, is when you query its API and the geolocation it finds is old/stale, it triggers a new measurement using a batch of RIPE Atlas probes for your target. The probes start the measurement (basically ping the target and report back the RTT and reachability), and when it finishes, IPMap updates its geolocation information for the target(s) with fresh data ingested by its latency engine.
You can double check this is exactly what happened, because RIPE Atlas measurements and their results are public.
Let's take your targets in the 143.244.33.0/24
range: your first lookup triggered measurements 68197612, 68197610, 68197616 and 68197617 (1 IP -> 1 measurement).
If you open those measurements, and select the Latest Results tab, you will notice they could all reach the target, except in the case of IP 143.244.33.78
: infact measurement 68197610 reports destination unreachable from all the probes.
This in turn triggered the IPMap update that you saw later on: All IPs are now correctly geolocated in Singapore (based on the low latency from the Atlas probes based in SG to the targets) instead of Ranong - all of which happened because your lookups triggered the measurements that made this update possible.
This alone is the reason why, in your next run (after adding the IpQualityScore token) the data is now more accurate (and explains why only 143.244.33.78
is still geolocated in Ranong).
Regarding the UK IP addresses: same sequence of events happened, you can look up the measurements you triggered by yourself here (just search by IP).
You kept seeing wrong geolocation results because the measurements weren't finished yet (except for 89.187.88.237
). If you try it again now, I bet you'll get consistent UK results on all targets.
There's only one question I cannot answer for sure: why were those IPs geolocated in Thailand in the first place?
I have verified using the excellent geofeed-finder that the geofeed IPMap refers to does not exist, so it's either a bug or maybe a stale leftover from the past. I don't know. The only person who may have a clue is @massimocandela (the original IPMap author).
Hope that clarifies things a bit. Thanks for the feeback!
from asn.
Related Issues (20)
- Cannot iterate over null HOT 1
- IPv4 address retrieval for a specific AS does not work anymore HOT 14
- Installed ipcalc not detected HOT 3
- Some IPv6 ranges not picked up HOT 1
- ipcalc bad argument HOT 4
- `jq: error (at <stdin>:1): Cannot iterate over null (null)` HOT 1
- zsh: killed bash (exec 3<>/dev/tcp/whois.ripe.net/43) HOT 6
- Last AS missing in AS path information HOT 6
- Feature request: add option to always query IPQualityScore and pass settings HOT 3
- IPv6 traceroute refusing to start on my host HOT 2
- Issue with obtaining v4 and v6 prefixes on MACOS HOT 11
- Suggestion: IP geolocation and proxy detection using IP2Location.io HOT 2
- Feature question - Bulk name/ip lookup HOT 1
- [Feature Request] Support IP2Location.io API to Query ASN HOT 1
- Add support for docker, automatically start in server mode. HOT 2
- Use HTTPS when it's available HOT 1
- Stuck on "retrieving information for ipv4 prefix..." HOT 2
- Exciting News: 'asn' Tool Soon to be Included in Debian! HOT 9
- upstream/transit 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 asn.