mtr
mtr copied to clipboard
mtr does not returning AS Number.
Hi, I am using MTR to get traceroute with AS Number, I am using the following command to get the details, It was working fine. Suddenly I am not getting AS Number in the MTR result. How to get AS Number in the MTR result.
sudo ./mtr -z -T 8.40.222.155
Start: 2017-08-28T14:58:48+0530
HOST: siva-2356 Loss% Snt Last Avg Best Wrst StDev
1. AS??? 192.168.220.1 0.0% 10 1.1 3.9 1.0 20.6 6.0
2. AS??? 192.168.100.3 0.0% 10 0.9 0.8 0.6 1.0 0.1
3. AS??? 121.244.91.1.static 0.0% 10 3.4 1.8 1.0 3.4 0.8
4. AS??? 121.244.91.165.stat 0.0% 10 12.8 6.8 2.9 15.6 4.6
5. AS??? 172.31.167.57 0.0% 10 7.6 5.1 2.8 10.7 2.8
6. AS??? ix-ae-4-2.tcore1.CX 0.0% 10 65.5 67.3 65.5 76.1 3.4
7. AS??? if-ae-3-3.tcore2.CX 0.0% 10 66.8 69.8 66.5 80.7 4.5
8. AS??? if-ae-6-2.tcore2.SV 0.0% 10 67.9 73.7 67.1 90.3 7.9
9. AS??? if-ae-20-2.tcore1.S 0.0% 10 67.1 71.7 66.7 76.8 3.6
10. AS??? 120.29.215.194 0.0% 10 65.4 69.7 65.3 79.8 5.2
11. AS??? ae2-10G.msr11.hkg3. 0.0% 10 101.9 105.2 99.9 117.8 5.4
12. AS??? ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
13. AS??? ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
14. AS??? ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
15. AS??? ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
16. AS??? ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
17. AS??? ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
18. AS??? 8.40.222.155 0.0% 10 276.3 273.1 260.2 285.3 8.2
I must confess: I know very little about AS numbers. 0.85 (installed on my system) has the same problem.
I vaguely remember that AS number lookup requires server IP addresses to be stored inside the MTR binary. Not a desirable situation. I vaguely remember that thos IP addresses needed to be changed.
static char *get_ipinfo(
struct mtr_ctl *ctl,
ip_t * addr)
It seems the above funtion is getting the AS info. It has origin.asn.cymru.com
url been hard coded. does it mean the url not responding?
When I tested it just now, it was slow as if it didn't respond and timed out. So... yes I think it is not responding.
It uses DNS based on a service by team-cymru, and the service indeed seems broken. It's probably temporary because even the examples from the website don't currently work (SERVFAIL): http://www.team-cymru.org/IP-ASN-mapping.html#dns
Hmm, their website does mention some infrastructure change in June 2017:
This month (June 2017), our IP to ASN mapping service will undergo its first major overhaul since first released to the public nearly 10 years ago! The popularity of this utility has surpassed our expectations time and time again, and thus we have dedicated significantly more infrastructure to it.
However I would be surprised that their DNS service has been broken for the last two months, because it's used quite a lot everywhere.
Is there any way to handle this problem with any other working URLs.
I have contacted their support, they said they are looking into the issue.
maybe it's not a bad idea to add more sources of IP info, there is a lot of other data sources that we may use for that, some of them below https://github.com/yvs2014/mtr/blob/850609272b0f097ad42d043fa02d4f568fa1a846/ipinfo.c#L109-L148 https://github.com/yvs2014/mtr/blob/850609272b0f097ad42d043fa02d4f568fa1a846/mtr.8#L287-L394
3 years later I come here because I'm looking why the major french ISP AS never appears in mtr traces. So I will patch the code with another service since there is no option to override the one used.
AS3215 backbone IPs aren’t announced, so you won’t have the ASN for them anyway.
When you patch it, make it configurable. Maybe store candidates in a local file, maybe add a list-of-IP-addresses to the repository here and get https://github....mtr/raw/list-of-ip-addresses when it doesn't work?