explaingit

baidu/nettools

Analysis updated 2026-05-18

52Go
This is a quick first-pass explanation. The richer sections — use-cases, tech stack, setup, prompts — are still being generated.

TLDR

nettools is a collection of Go-based network diagnostic tools developed by Baidu's physical network monitoring team.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

In plain English

nettools is a collection of Go-based network diagnostic tools developed by Baidu's physical network monitoring team. It is designed for large-scale data center environments where you need to measure link quality, find where packet loss is happening, and detect bit-flip errors, cases where packets arrive with some bytes changed. The main tool is bitflip. It runs as a client and server pair: the client sends a high volume of UDP packets per second to the server, which echoes them back unchanged. Both sides independently track loss and bit corruption. By comparing what each side sees, you can tell whether a loss happened on the forward path (client to server) or the return path (server to client). Each packet carries a known salt pattern so both sides can verify whether any bytes were altered in transit. The server auto-registers unknown clients on their first packet, so no pre-configuration is needed on the server side. bitflip6 is the same tool adapted for IPv6 networks. baize is a long-running monitoring version of the same concept. Instead of being configured via command-line flags for a one-time test, it reads a JSON config file and can run both client and server roles in a single process, making it easier to deploy continuously. It includes built-in log rotation, a profiling endpoint, and graceful shutdown handling. Baidu's internal version also supports pulling config from a database and streaming results to Kafka, but the open-source release uses config files and local logs. lidar is a TCP SYN probing tool for checking whether network paths are reachable. It works without deploying anything on the target server, making it useful for quick reachability checks. The toolkit is used at Baidu for inter-cluster monitoring, checking network quality during hardware migrations, testing dedicated carrier lines, and verifying failback paths after network changes. It is released under the MIT license.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.