home | list info | list archive | date index | thread index

Re: Routing via US (was Re: Canadian Web Hosting)

mtr can give you the list of IP addresses in a format that puts the IP address in a predictable numbered field.
That can be parsed by grep or awk or Python 4, or whatever.
   Or maybe you can turn off all the other data in mtr? Did not check.
Anyway, with that, you can pass the IP addresses in a loop to some geolocation tool.

Sample output of mtr using some params for convenience:
rob@bunny:~$ mtr -n -b -c 1 -r namespro.ca
Start: 2025-02-07T12:30:41-0500
HOST: bunny Loss% Snt Last Avg Best Wrst StDev 1.|-- 192.168.1.1 0.0% 1 2.4 2.4 2.4 2.4 0.0 2.|-- 173.206.0.1 0.0% 1 19.9 19.9 19.9 19.9 0.0 3.|-- 10.201.117.10 0.0% 1 19.7 19.7 19.7 19.7 0.0 4.|-- 10.201.117.73 0.0% 1 20.1 20.1 20.1 20.1 0.0 5.|-- 10.201.121.49 0.0% 1 20.0 20.0 20.0 20.0 0.0 6.|-- 206.80.255.86 0.0% 1 19.4 19.4 19.4 19.4 0.0 7.|-- 206.80.255.6 0.0% 1 19.6 19.6 19.6 19.6 0.0 8.|-- ??? 100.0 1 0.0 0.0 0.0 0.0 0.0 9.|-- 169.53.17.27 0.0% 1 35.9 35.9 35.9 35.9 0.0 10.|-- 169.53.17.35 0.0% 1 39.6 39.6 39.6 39.6 0.0 11.|-- 163.66.118.133 0.0% 1 35.5 35.5 35.5 35.5 0.0 12.|-- 163.66.118.209 0.0% 1 32.6 32.6 32.6 32.6 0.0 13.|-- 158.85.87.71 0.0% 1 34.1 34.1 34.1 34.1 0.0

Your loop has to keep going after number 8 in this list is NOT an IP address.

Rob





On 2025-02-07 11:24, rob [ at ] echlin [ dot ] ca via linux wrote:
The mtr on Ubuntu 22.04 doesn't show any geolocation information, as far as I can tell, looking at the fields listed.

On 2025-02-07 08:52, Richard Guy Briggs via linux wrote:
On 2025-02-07 08:46, James via linux wrote:
Is there a command that will look up the geolocation of every ip in the
traceroute for me?

mtr -t namespro.ca

	slainte mhath, RGB

To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org

To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org