IP InfoNetworkingASNBGPGeolocation

Understanding IP Addresses, ASN, BGP Routing, and Geolocation

A comprehensive guide to IPv4 vs IPv6, Autonomous System Numbers (ASN), BGP internet routing, and how IP geolocation databases work.

PingXD Team4 min read

Every connected device on the internet—from web servers and routers to smartphones and IoT sensors—relies on an IP address to send and receive packets. But behind every simple numerical address lies a sophisticated hierarchy of Autonomous Systems (ASNs), Border Gateway Protocol (BGP) routing tables, and global geolocation mapping databases.

Understanding how IP addressing and internet routing work is critical for diagnosing routing anomalies, securing infrastructure, and troubleshooting regional content delivery issues.

This guide breaks down IPv4 vs. IPv6, Autonomous System Numbers (ASNs), BGP routing, and how to inspect any IP using the PingXD IP Info lookup.

1. IPv4 vs. IPv6: The evolving address space

IPv4 (Internet Protocol version 4)

IPv4 addresses are 32-bit numbers formatted as four decimal octets separated by dots (e.g., 198.51.100.1). With a theoretical maximum of ~4.29 billion unique addresses, the global IPv4 pool managed by IANA (Internet Assigned Numbers Authority) was officially exhausted in 2011.

To cope with exhaustion, techniques like NAT (Network Address Translation) and CGNAT (Carrier-Grade NAT) share single public IPs among thousands of users.

IPv6 (Internet Protocol version 6)

IPv6 uses 128-bit addresses formatted as eight groups of four hexadecimal digits (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334, compressible to 2001:db8:85a3::8a2e:370:7334).

IPv6 provides 340 undecillion unique addresses (over $3.4 \times 10^{38}$), eliminating the need for NAT, simplifying router packet processing headers, and enabling true end-to-end connectivity.

You can verify whether your domain has both IPv4 (A record) and IPv6 (AAAA record) configured with the PingXD DNS Lookup tool.

2. What is an Autonomous System Number (ASN)?

The internet is not a single monolithic network; it is a network of networks. Each independent network operated by an Internet Service Provider (ISP), cloud provider (AWS, Google Cloud, Azure), CDN (Cloudflare, Fastly), or enterprise is called an Autonomous System (AS).

Each Autonomous System is assigned a globally unique Autonomous System Number (ASN) by regional internet registries (RIRs like ARIN, RIPE NCC, APNIC, LACNIC, and AFRINIC).

Common Notable ASNs:

ASNOrganizationNetwork Scope
AS13335Cloudflare, Inc.Global Anycast CDN & Security
AS16509Amazon.com / AWSGlobal Cloud Infrastructure
AS15169Google LLCSearch, Cloud & YouTube Infrastructure
AS8075Microsoft CorporationAzure & Office 365 Cloud
AS7018AT&T Services, Inc.Tier 1 Backbone Transit Provider

When you look up an IP address using IP Info, the ASN identifies the legal network entity responsible for routing that IP range across the internet.

3. How Border Gateway Protocol (BGP) connects the world

BGP (Border Gateway Protocol) is the routing protocol of the internet. It acts as the global postal system, determining the most efficient path for packets to travel across autonomous systems.

Routers use BGP to broadcast: "AS 13335 can reach IP prefix 104.16.0.0/12 through the following AS path: AS 7018 -> AS 13335".

Unicast vs. Anycast routing:

  • Unicast Routing: A specific IP address exists on exactly one physical server in one location. All packets worldwide travel to that single destination.
  • Anycast Routing: Multiple data centers worldwide advertise the exact same IP address via BGP. BGP automatically routes each user to the topologically closest data center. This provides automatic DDoS absorption and ultra-low latency.

4. How IP Geolocation actually works

When you look up an IP on an IP Geolocation tool, how does the system know the country, region, city, or coordinates?

Contrary to common belief, IP packets do not carry GPS coordinates. IP geolocation is calculated by synthesizing multiple data sources:

  1. RIR Whois Records: Regional registries publish the country and registered organization for allocated IP subnets.
  2. ISP Infrastructure & Reverse DNS (rDNS): Hostnames often encode airport codes or city identifiers (e.g., sjo-cr1.isp.net for San Jose, fra-edge01.net for Frankfurt).
  3. BGP Peering & Latency Triangulation: Network probes measure round-trip times to the IP from multiple worldwide nodes. If latency to an IP is 1ms from Singapore and 200ms from London, the IP is physically in or near Singapore.
  4. Wi-Fi & Cellular Mapping Databases: Client devices with GPS report nearby Wi-Fi BSSIDs and cell towers to mapping databases (Google Location Services, Apple, MaxMind).

Inspecting IPs with PingXD

  1. Open the PingXD IP Info Tool.
  2. Look up your current public IP address or enter any external IPv4 / IPv6 address or domain name.
  3. Inspect the resolved country, city, ISP name, Autonomous System Number (ASN), and hostname.
  4. Use the accompanying Traceroute Test to view each ASN hop along the network transit route.