Operations 9 min read

Master NextTrace: A Lightweight Go‑Based Visual Traceroute Tool for Linux

This guide introduces NextTrace, a lightweight open‑source Go traceroute utility, explains how to install it on Linux, macOS and via GHPROXY, details its extensive command‑line options, and demonstrates advanced features such as TCP/UDP tracing, TTL control, parallel requests, map and table outputs.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Master NextTrace: A Lightweight Go‑Based Visual Traceroute Tool for Linux

What is NextTrace?

NextTrace is an open‑source, Go‑written command‑line traceroute tool that visualizes routing paths in a clear, map‑based HTML page (MapTrace URL). It builds on traditional traceroute utilities (traceroute, tracepath) and adds automatic map generation for both 2D and 3D views.

Installation

For Linux you can use a one‑click script:

# Linux one‑click install script
bash <(curl -Ls https://raw.githubusercontent.com/sjlleo/nexttrace/main/nt_install.sh)

Alternative installation methods:

# GHPROXY (useful in China)
bash <(curl -Ls https://ghproxy.com/https://raw.githubusercontent.com/sjlleo/nexttrace/main/nt_install.sh)
# macOS via Homebrew
brew tap xgadget-lab/nexttrace && brew install nexttrace

Basic Usage

Running nexttrace without parameters performs an ICMP trace for both IPv4 and IPv6.

# IPv4 ICMP trace
nexttrace 8.8.8.8

# IPv6 ICMP trace
nexttrace 2606:4700:4700::1111

Command‑Line Options

-h: display help information

-T: use TCP SYN (default port 80)

-U: use UDP (default port 53)

-F: fast ISP trace

-p <port>: set destination port

-q <int>: probes per hop (default 3)

--parallel-requests <int>: parallel request count (default 18)

-m <int>: max TTL hops (default 30)

-d <provider>: choose IP‑geolocation provider (default LeoMoeAPI)

-n: disable reverse DNS lookup

-a: always resolve IP to hostname

-P: output traceroute path with ASN and location

-r: report mode output

--dn42: enable DN42 mode

-o <file>: write results to file

-t / --table: display results as a table

-c: classic output format

-f <int>: start probing from this TTL

-M: suppress map output

-v: show version and exit

-s <src>: set source IP address

-D <iface>: bind to a specific network interface

-R: show routing table

-z <ms>: interval between packets (default 100 ms)

-i <ms>: TTL‑based interval (default 500 ms)

--dot-server <service>: DNS resolution via selected DOT service (dnssb, aliyun, dnspod, google, cloudflare)

-g <en|cn>: set output language

Advanced Features & Examples

Fast ISP testing:

# Fast ISP trace (default IPv4/IPv6 ICMP)
nexttrace -F

TCP SYN trace on a custom port:

# TCP trace on port 443
nexttrace -T --port 443 1.1.1.1

UDP trace on a custom port:

# UDP trace on port 5353
nexttrace -U --port 5353 1.0.0.1

Control probes per hop and parallelism:

# Send 10 probes per hop
nexttrace -q 10 https://api.leo.moe/

# Disable parallel requests (send one probe at a time)
nexttrace --parallel-requests 1 https://api.leo.moe/

TTL range control:

# Probe from TTL 10 to TTL 20
nexttrace -f 10 -m 20 https://api.leo.moe/

Select source IP or interface:

# Use specific source IP
nexttrace --source 192.168.0.5 114.114.114.114

# Bind to interface ens32
nexttrace -D ens32 1.1.1.1

Map output (Route‑Path diagram):

# Generate MapTrace URL
nexttrace -P https://api.leo.moe/

Table output (real‑time display):

# Show results as a table
nexttrace --table 202.108.23.50

Custom IP Geolocation Databases

NextTrace allows you to choose among several IP‑geolocation providers such as IP.SB, IPInfo, IPInsight, IP‑API.com, Ip2region, IPInfoLocal, and CHUNZHEN, adapting the tool to different environments.

MapTrace Visualization

The generated MapTrace URL can be opened in a browser to view a clear 2D map or a 3D representation of the route, with options to zoom, hide the route table, or generate a QR code for mobile viewing.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

GotracerouteLinuxvisualizationNetwork Diagnostics
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.