Educational Network Diagnostic Workbench & Topology Visualizer
NetScope is an open-source, dual-mode (CLI and self-hosted web dashboard) network engineering utility for students, educators, and systems engineers. It provides diagnostic capabilities across local subnet discovery, multi-layer binary packet dissection, recursive DNS resolution benchmarking, and interactive topological graph mapping.
The project is structured into modular, decoupled domain packages:
netscope/
├── scanner/ # Host discovery, ARP tables, NIC enumeration, port inspection
│ ├── interfaces.py # System NIC address & routing introspection (psutil/socket)
│ ├── discovery.py # Subnet host discovery sweep & hardware OUI resolution
│ └── ports.py # TCP connection probing & service detection
├── protocols/ # Protocol parsing & network capture processing
│ ├── dissector.py # Multi-layer packet dissector (L2 through L7, IPv4 & IPv6)
│ ├── pcap.py # Libpcap 2.4 reader/writer & synthetic educational generator
│ └── dns.py # RFC 1035 query builder & multi-resolver benchmark engine
├── analyzer/ # Telemetry, traffic statistics & topological graph generation
│ ├── latency.py # High-resolution RTT statistics & RFC 3550 jitter calculation
│ ├── traffic.py # Conversation aggregation & protocol distribution
│ └── topology.py # Hierarchical graph generator (WAN -> Gateway -> Hosts)
├── cli/ # Command-line interface with table and JSON formatting
│ └── main.py # Subcommands: interfaces, scan, ports, dns, ping, trace, pcap, topology, serve
└── dashboard/ # Self-hosted web dashboard
├── server.py # FastAPI / Uvicorn REST backend and static file server
└── static/ # Zero-telemetry frontend (Jost typography, SVG topology, inspector)
- Generates live SVG node-link graph mapping upstream WAN routes, local gateway, primary host, and discovered subnet endpoints.
- Interactive Node Inspector displaying physical MAC, vendor heuristics, round-trip time, and on-demand port auditing.
- Dissects raw frame bytes or PCAP capture files down to bitwise fields:
- Layer 2 (Data Link): Ethernet II framing with 48-bit physical MAC addresses and EtherType decoding.
- Layer 3 (Network): IPv4 (IHL, DSCP, TTL origin heuristics, protocol ID), IPv6, ARP (Request/Reply), ICMP (Echo Request/Reply, Time Exceeded).
- Layer 4 (Transport): TCP (SYN/ACK/FIN flags, sequence and acknowledgment numbers, window sizing), UDP datagrams.
- Layer 7 (Application): DNS query and response records, HTTP/1.1 request/response headers, TLS Client Hello SNI detection.
- Includes a synchronized split-view with formatted hexadecimal offset dumps and RFC educational callouts.
- Live concurrent latency comparison across public and local resolvers: Cloudflare (
1.1.1.1), Google (8.8.8.8), Quad9 (9.9.9.9), and OpenDNS (208.67.222.222). - Comprehensive query support for
A,AAAA,MX,TXT,NS,CNAME, and reversePTRlookups with exact TTL timings.
- Computes packet transmission variance (interarrival jitter), minimum, maximum, mean, and standard deviation RTT.
- Hop-by-hop route tracing identifying intermediate routing nodes and latency hops.
- Scans user-specified CIDR blocks (e.g.
192.168.1.0/24) combining ARP tables and multi-threaded socket probing. - Automatic IEEE OUI manufacturer resolution (Apple, Intel, Raspberry Pi, Cisco, Dell, Espressif, Ubiquiti, etc.).
- Deep inspection of host interfaces: status, IPv4/IPv6, MAC, MTU, operational link speed, and default routing table entries.
- Python 3.9+ (Python 3.14 compatible)
- Standard network interface with read permissions
git clone https://github.com/NeaCol/netscope.git
cd netscope
# Install dependencies or install in editable mode
pip install -e .NetScope provides a modular command-line suite supporting both human-readable ASCII tables and structured --json outputs for scripting:
netscope interfacesnetscope scan --subnet 192.168.1.0/24 --threads 40netscope ports 192.168.1.1 -p 80,443,22,53netscope dns cloudflare.com --benchmarknetscope dns github.com --type AAAA
netscope dns google.com --type MXnetscope ping 1.1.1.1 --count 5netscope trace 8.8.8.8 --max-hops 15# Generate and dissect educational sample capture
netscope pcap --sample
# Dissect an existing capture file
netscope pcap capture.pcap --limit 10netscope topology --jsonnetscope serve --host 127.0.0.1 --port 8080 --openVisit http://127.0.0.1:8080 in any modern browser.
The test suite covers unit and integration tests (54 tests):
pytest tests -vOutput:
============================= test session starts =============================
collected 54 items
tests/test_analyzer.py ........ [ 14%]
tests/test_cli.py ........ [ 29%]
tests/test_dashboard_api.py ............ [ 51%]
tests/test_protocols.py .................. [ 85%]
tests/test_scanner.py ........ [100%]
======================= 54 passed, 1 warning in 3.52s =========================
NetScope is designed exclusively for educational demonstration, diagnostic network administration, and authorized infrastructure auditing. Do not execute subnet discovery sweeps or connection probes against networks where you lack explicit administrative authorization.
This project is licensed under the MIT License.