Skip to main content

Peering Workbench — consolidated ASN, WHOIS, PeeringDB, RPKI, IRR, DNS, and Looking Glass desktop tool for network engineers

Project description

⚡ pwb — Peering Workbench

A consolidated desktop tool for network engineers who are tired of juggling browser tabs between PeeringDB, WHOIS, looking glass sites, and RPKI validators. One app, one search bar, every lookup you need.

Built with PyQt6. All APIs are free and require no keys.

PyPI Python License

Peering Workbench


Install

pip install pwb

For Team Cymru IP→ASN lookups and the DNS Lookup tab (recommended):

pip install pwb[cymru]

Launch

python -m pwb

Or if installed via pip:

peering-workbench

Features

⚡ Quick Lookup Bar

The toolbar input auto-detects what you type and routes to the right tab:

Input Detected as Tab
15169 or AS15169 ASN ASN Lookup
8.8.8.8 IPv4 address IP Lookup
2607:f8b0:4001::1 IPv6 address IP Lookup
1.0.0.0/24 or 2620:129::/44 Prefix (v4/v6) Prefix / LG
cloudflare.com Hostname DNS Lookup

One search bar for everything. No mode switching, no tab hunting.

🏷 ASN Lookup

Enter any ASN — pulls PeeringDB, RIPEstat, and RDAP simultaneously in background threads. Sub-tabs for each data source plus raw JSON. One-click "Open in HE" jumps to the HE BGP Toolkit for that ASN.

  • IX presence with port speeds
  • Facility list with cities
  • Peering policy, NOC/policy email contacts
  • Announced prefixes, upstream/downstream neighbors with power scores
  • WHOIS registration, abuse contacts

ASN / PeeringDB Lookup

🌍 IP Lookup

Full context for any IPv4 or IPv6 address in a single view:

  • Team Cymru DNS-based IP→ASN mapping with resolved network name (IPv4 and IPv6)
  • RDAP network allocation and CIDR blocks
  • RIPEstat geolocation, abuse contacts, prefix info
  • RPKI validation — automatically derives the covering prefix and origin ASN, then checks ROA validity inline
  • One-click prefix drill-down — click the "Full Prefix Lookup" link to jump to the Prefix tab with the covering prefix pre-filled

IP Lookup

📡 Prefix / Looking Glass

Query any IPv4 or IPv6 prefix for routing status, origin AS, related/covering prefixes, and RIPEstat looking glass data from 25+ RIPE RRC route collectors worldwide — with resolved AS-path names.

Every ASN in every AS path is automatically resolved via PeeringDB and cached to disk. First lookup resolves names in the background; subsequent lookups render instantly from cache.

RPKI Validation

Each origin ASN is checked against the RPKI via RIPEstat's Routinator-backed validator. Results are color-coded:

  • 🟢 Valid — a ROA exists and matches the prefix/origin/maxLength
  • 🟡 Not Found — no ROA covers this prefix (RPKI-unknown)
  • 🔴 Invalid — a ROA exists but the origin or prefix length doesn't match

Matching ROAs are displayed with their origin, prefix, and maxLength so you can immediately spot maxLength mismatches — the most common "everything looks right but traffic is dropping" RPKI issue.

IRR Route Object Consistency

Shows whether route/route6 objects exist in the IRR for the prefix, which registries they're in, and whether they match what's actually announced in BGP:

  • BGP + IRR ✓ — announced and registered (healthy)
  • BGP only — no IRR ✗ — announced but no route object (peers filtering on IRR will drop it)
  • IRR only — not announced — registered but not in the BGP table (stale object)

Prefix / Looking Glass with RPKI and IRR

🗺 AS-Path Visualization

Trace the BGP-level path between any two IP addresses. Enter a source and destination IP, and the tool builds an interactive directed graph showing how traffic flows between the two networks.

  • Forward paths (burgundy, left→right) — how traffic reaches the destination from the source's perspective
  • Reverse paths (teal, right→left) — how return traffic flows back, exposing BGP asymmetry
  • Power-weighted edges — line thickness reflects the neighbour power score from RIPEstat, showing which transit links dominate the routing table
  • Path selection — click any path in the sidebar to highlight it; toggle forward/reverse visibility independently
  • Zoom and pan — scroll to zoom, drag to pan, "Fit" to auto-frame

The data pipeline chains Team Cymru (IP→ASN resolution with RIPEstat/RDAP fallback), RIPEstat looking glass (real AS paths from 20+ RRC vantage points), and asn-neighbours (upstream relationships and power scores). All ASN names are resolved via the shared name cache.

Note: This is a model based on observed BGP control-plane data, not confirmed data-plane forwarding. Factors like Local Preference, BGP communities, MED, ECMP, and private peering are invisible externally. The visualization shows which routes exist and how strongly they're represented — valuable for peering analysis, but not a guarantee of actual traffic paths. See the built-in help (?) for a full discussion of limitations.

AS-Path Visualization

Link Details

Click any edge in the graph to open a detail dialog querying PeeringDB for the two adjacent ASNs:

  • Peering policies — Open / Selective / Restrictive, with policy URL and contact email
  • Shared Internet Exchanges — every IX where both networks are present, with port speeds per side
  • Shared Facilities — every datacenter where both networks are colocated

This answers the key peering question: when you see a transit link in the graph, where could these two networks be exchanging traffic?

Link Detail — Shared IXes

Link Detail — Facilities

🔎 DNS Lookup

General-purpose DNS record lookup powered by dnspython. Enter any hostname to query all record types at once, or select a specific type from the dropdown:

  • A / AAAA — IPv4 and IPv6 addresses
  • CNAME — canonical name aliases
  • MX — mail exchangers with preference values
  • NS — authoritative nameservers
  • TXT — SPF, DKIM, verification records
  • SOA — zone authority (serial, refresh, retry, expire)
  • PTR — reverse DNS (auto-detected when you enter an IP instead of a hostname)
  • CAA — certificate authority authorization

Enter an IP address and it automatically performs a reverse PTR lookup instead. Useful for identifying router hostnames from traceroute output.

❓ Built-in Help

Both the main workbench and the AS-Path Visualization include a ? button that opens context-sensitive help covering every feature, API source, and how to interpret results. The path visualization help includes a detailed discussion of what the data can and cannot tell you.

Help System

💾 ASN Name Cache

Persistent disk cache at ~/.peering_workbench/asn_cache.json. Grows automatically as you use the tool — after a few prefix lookups you'll have the entire tier-1/tier-2 transit universe cached. The file is portable: back it up, sync across machines, or seed it from other sources.

🔑 PeeringDB API Key (optional)

PeeringDB throttles anonymous API requests. If you hit 429 Too Many Requests errors during heavy use, register for a free API key at peeringdb.com and configure it one of two ways:

# Environment variable
export PEERINGDB_API_KEY=your-key-here

# Or save to config file
echo "your-key-here" > ~/.peering_workbench/peeringdb_api_key

Authenticated requests get significantly higher rate limits. The tool will also automatically retry on 429 responses with backoff, but an API key avoids the delays in the first place.


APIs Used

All free, no API keys required.

Source What it provides
PeeringDB Network info, IX connections, facilities, peering policy, contacts
RIPEstat ASN overview, announced prefixes, neighbors, looking glass (RRCs), RPKI validation, IRR routing consistency
RDAP Structured WHOIS replacement (auto-routes to ARIN/RIPE/APNIC)
Team Cymru DNS-based IP→ASN mapping for IPv4 and IPv6 (requires dnspython)

Requirements

  • Python 3.10+
  • PyQt6
  • requests
  • dnspython (optional but recommended — enables Team Cymru lookups and the DNS Lookup tab)

Development

git clone https://github.com/scottpeterman/pwb.git
cd pwb
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,cymru]"
python -m pwb

Publishing

python -m build
twine upload dist/*

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pwb-0.2.0.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pwb-0.2.0-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file pwb-0.2.0.tar.gz.

File metadata

  • Download URL: pwb-0.2.0.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pwb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 47375b0cdac6db318bc4bcf366eb66d054200b8ca22126353f5bfa0c95a90b66
MD5 b536daa4cd1bcc99e873f1e9796c5672
BLAKE2b-256 280b879a87cfc0736f72dbd76f9f8cce088547625dbfcbca997243b262f5615a

See more details on using hashes here.

File details

Details for the file pwb-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pwb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pwb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cca016a0fd2ed844fb5b16b010daf948010394f25e82b18424944c499a60b7b
MD5 6e32a87e8b6809002abe6ee99a0ca006
BLAKE2b-256 37d22a37d47f77089fc0f7e839b909c51f3f21afb8bba77c55dfda958e864798

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page