IP2Location™ Traceroute Application
IP2Location™ Traceroute Application is an open-source command line application that performs traceroute with geolocation information to detect country, region, city, latitude, longitude, ZIP code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, and usage type. It is using IP2Location BIN database for quick local lookup without external API. It supports Linux and MacOS.
Two languages are supported, which is C and Python.
Traceroute Application For C
Installation - For C
- Unzip the archive master.zip.
- Navigate to working directory.
cd ip2location-traceroute-master
-
Run the following make commands:
make make install
- Run the traceroute application
ip2trace -p 1.2.3.4 -d /usr/share/ip2location/DB10.BIN
Usage - For C
Syntax
ip2trace -p [IP Address/Hostname] -d [Path to IP2Location BIN Database] [options]
Options
- -d, --database Specify the path of IP2Location BIN database file.
- -h, -?, --help Display help guide.
- -p, --ip Specify an IP address or hostname.
- -t, --ttl Set the max number of hops. (Default: 30)
- -v, --version Print the version.
Example
%> ip2trace -p 8.8.8.8 -d /usr/share/ip2location/DB24.BIN -t 20 IP2Location Geolocation Traceroute (ip2trace) Version 8.0.0 Copyright (c) 2021 IP2Location.com [MIT License] https://www.ip2location.com/free/traceroute-application 1. 50.97.82.1 0.6350 ms ["US","United States of America","Texas","Dallas","32.939491","-96.838730","75244","SoftLayer Technologies Inc.","softlayer.com","-06:00","T1","1","214/469/972","USTX0327","Dallas","-","-","-","129.0","DCH"] 2. 173.192.118.142 0.5120 ms ["US","United States of America","Texas","Dallas","32.939491","-96.838730","75244","SoftLayer Technologies Inc.","softlayer.com","-06:00","T1","1","214/469/972","USTX0327","Dallas","-","-","-","129.0","DCH"] 3. 50.97.18.194 1.1260 ms ["US","United States of America","Texas","Dallas","32.939491","-96.838730","75244","SoftLayer Technologies Inc.","softlayer.com","-06:00","T1","1","214/469/972","USTX0327","Dallas","-","-","-","129.0","DCH"] 4. 72.14.203.120 27.7610 ms ["US","United States of America","California","Mountain View","37.405991","-122.078514","94043","Google LLC","google.com","-08:00","T1","1","650","USCA0746","Mountain View","-","-","-","32.0","DCH"] 5. 108.170.252.161 2.2220 ms ["US","United States of America","California","Mountain View","37.405991","-122.078514","94043","Google LLC","google.com","-08:00","T1","1","650","USCA0746","Mountain View","-","-","-","32.0","DCH"] 6. 108.170.230.115 1.2490 ms ["US","United States of America","California","Mountain View","37.405991","-122.078514","94043","Google LLC","google.com","-08:00","T1","1","650","USCA0746","Mountain View","-","-","-","32.0","DCH"] 7. 8.8.8.8 1.0820 ms ["US","United States of America","California","Mountain View","37.405991","-122.078514","94043","Google LLC","google.com","-08:00","T1","1","650","USCA0746","Mountain View","-","-","-","32.0","DCH"]
Sample IP2Location Databases (BIN)