Skip to main content
BGP & Routing

BGP Looking Glass

Query global BGP routing sessions by CIDR prefix. See route announcements, AS paths, communities and peer locations worldwide.

Advertisement · Anuncio

Query Parameters

IPv4 or IPv6 CIDR notation

Invert Filter Exclude this ASN from results
About BGP Looking Glass

What is a BGP Looking Glass?

A BGP (Border Gateway Protocol) Looking Glass is a diagnostic tool that allows network engineers and security researchers to observe live BGP routing sessions from multiple vantage points. BGP is the protocol that governs how packets are routed across the internet between autonomous systems (AS).

How to Use This Tool

Enter a CIDR prefix (e.g., 8.8.8.0/24) to see all BGP sessions announcing that prefix. Optionally filter by ASN to include or exclude a specific autonomous system. Results include the AS path, origin type, BGP communities, and collector location.

Key Concepts

  • CIDR Prefix: A network address with subnet mask (e.g., 192.168.0.0/16).
  • ASN: A unique identifier assigned to each network participating in BGP routing.
  • AS Path: The list of ASNs a route traverses — shorter paths are generally preferred.
  • BGP Communities: Tags attached to routes to control routing policy and traffic engineering.
  • Origin types: IGP (internal), EGP (external legacy), or Incomplete (redistributed).

BGP Looking Glass: Understanding Border Gateway Protocol Routing

Border Gateway Protocol (BGP, RFC 4271) is the inter-domain routing protocol that forms the backbone of the internet, connecting thousands of Autonomous Systems (AS) and enabling IP routing between them. A BGP Looking Glass server is a publicly accessible router that lets engineers query BGP routing tables from the perspective of a specific network location — without direct access to that router.

Each internet-connected organization is assigned an Autonomous System Number (ASN) by a Regional Internet Registry (RIR) such as ARIN, RIPE NCC, APNIC, LACNIC, or AFRINIC. BGP routers exchange routing information in BGP UPDATE messages containing prefixes and path attributes. The AS_PATH attribute lists the sequence of ASNs a route has traversed — allowing BGP to detect routing loops and select optimal paths. Other key attributes include LOCAL_PREF, MED, NEXT_HOP, and COMMUNITY.

BGP route selection evaluates: weight, local preference, AS path length, origin type (IGP > EGP > Incomplete), MED, eBGP vs iBGP preference, IGP metric to next-hop, and router-ID as tiebreaker. Route leaks and BGP hijacks are major security concerns. RPKI (Resource Public Key Infrastructure) provides modern protection by verifying that an ASN is authorized to announce a given prefix via Route Origin Authorizations (ROAs).

CLI BGP Analysis

macOS / Linux

traceroute -A 8.8.8.8
whois -h whois.cymru.com " -v 8.8.8.8"
curl "https://stat.ripe.net/data/bgp-state/data.json?resource=AS15169"
curl "https://stat.ripe.net/data/announced-prefixes/data.json?resource=AS15169"

Windows PowerShell

Invoke-RestMethod "https://stat.ripe.net/data/bgp-state/data.json?resource=AS15169" | ConvertTo-Json
tracert 8.8.8.8

Looking glass servers support commands like show bgp ipv4 unicast <prefix> and show bgp summary. These are invaluable for verifying your AS is announcing the correct prefixes and diagnosing BGP convergence issues after network changes.