ASN and Internet Peering: How Networks Connect Globally

Understand how the internet really works. Learn about Autonomous System Numbers (ASN), BGP routing, how networks exchange traffic through peering and transit agreements, and why this matters for your connection speed and reliability. Essential knowledge for understanding your ISP's network.

Quick Overview

Autonomous System (AS)

A collection of IP networks under a single organization's control with a unified routing policy.

  • Each AS has a unique ASN (number)
  • ISPs, cloud providers, enterprises
  • Uses BGP to exchange routes
  • Controls routing decisions

Internet Peering

Direct interconnection between networks to exchange traffic without paying transit fees.

  • Lower latency, faster routes
  • Reduced transit costs
  • Better network reliability
  • Improved traffic control

What is an ASN?

An Autonomous System Number (ASN) is a globally unique identifier assigned to an autonomous system (AS). Think of it as a "phone number" for networks on the internet. Every major ISP, cloud provider, and large organization has at least one ASN.

ASN Format Examples

AS15169
Google LLC
AS7922
Comcast Cable
AS16509
Amazon AWS
AS13335
Cloudflare

ASN Ranges

  • 16-bit ASNs: 1 to 65535 (original format)
  • 32-bit ASNs: 65536 to 4294967295 (newer)
  • Private ASNs: 64512-65534, 4200000000-4294967294
  • Reserved: AS0, AS23456, and others

Who Needs an ASN?

  • ISPs: All internet service providers
  • Cloud providers: AWS, Google Cloud, Azure
  • CDNs: Content delivery networks
  • Large enterprises: Multi-homed organizations

BGP: The Internet's Routing Protocol

Border Gateway Protocol (BGP) is how autonomous systems communicate routing information. It's the protocol that makes the internet work by allowing networks to advertise which IP addresses they can reach.

How BGP Routes Traffic

Your ISP
AS7922
BGP
Transit
AS3356
BGP
Destination
AS15169
Route Advertisement: Each AS announces its IP prefixes to neighbors. BGP selects the best path based on AS path length, policies, and preferences.

BGP Key Concepts

  • Prefix: Block of IP addresses (e.g., 8.8.8.0/24)
  • AS Path: List of ASes a route traverses
  • Next Hop: Next router in the path
  • Local Pref: Internal route preference

Route Selection

BGP chooses routes based on:

  1. 1.Highest local preference
  2. 2.Shortest AS path
  3. 3.Lowest origin type
  4. 4.Lowest MED (metric)

Peering vs Transit

Networks connect to each other in two primary ways: peering and transit. Understanding the difference is crucial to how the internet operates economically.

🤝Peering (Settlement-Free)

Direct connection where networks exchange traffic for free, typically between networks of similar size.

Benefits
  • • No transit fees
  • • Lower latency
  • • Better performance
  • • More control
Requirements
  • • Similar traffic volumes
  • • Mutual benefit
  • • Technical capability
  • • Physical proximity

💰Transit (Paid Service)

Paid service where a larger network provides full internet connectivity to a smaller network.

Benefits
  • • Full internet access
  • • Simplified setup
  • • SLA guarantees
  • • Support included
Costs
  • • Monthly fees per Mbps
  • • Commit contracts
  • • Overage charges
  • • Setup fees

Network Tiers

T1
Tier 1 Networks
Can reach the entire internet via peering alone, without paying transit. Examples: Level3, Cogent, NTT, Telia. Only ~15 true Tier 1 networks exist.
T2
Tier 2 Networks
Peer with some networks but also purchase transit. Most large ISPs and regional carriers. Balance of peering and paid transit.
T3
Tier 3 Networks
Rely entirely on purchased transit. Small ISPs, local providers, enterprise networks. Connect through upstream providers.

Internet Exchange Points (IXPs)

Internet Exchange Points are physical locations where multiple networks connect to exchange traffic. IXPs enable efficient, low-cost peering and are critical infrastructure for the internet.

How an IXP Works

IXP Switch Fabric
AS1234
ISP A
AS5678
CDN B
AS9012
ISP C
AS3456
Cloud D
All networks connect to the same switch. They can peer with each other directly at the IXP, avoiding expensive transit and reducing latency.

Major IXPs Worldwide

  • DE-CIX Frankfurt: Largest by traffic
  • AMS-IX Amsterdam: One of the oldest
  • LINX London: Major European hub
  • Equinix IXs: Global presence
  • JPNAP Tokyo: Asia-Pacific major

Benefits of IXPs

  • Reduced latency for local traffic
  • Lower bandwidth costs
  • Improved network redundancy
  • Better traffic control
  • Easier peering setup

Types of Peering

Public Peering

Networks peer at an IXP by connecting to a shared switch fabric. Many peers can be established through a single physical connection.

Advantages
  • • Lower setup costs
  • • Multiple peers via one port
  • • Quick provisioning
  • • Easy to add new peers
Disadvantages
  • • Shared infrastructure
  • • Less control
  • • Potential congestion
  • • Limited to IXP capacity

Private Peering (PNI)

Direct connection between two networks, often a dedicated fiber link or cross-connect. Used for high-volume peering relationships.

Advantages
  • • Dedicated bandwidth
  • • Better performance
  • • Full control
  • • Lower latency
Disadvantages
  • • Higher setup costs
  • • Requires negotiation
  • • Geographic limitations
  • • One peer per connection

Remote Peering

Connect to an IXP remotely through a layer-2 extension service, without physical presence at the IXP. Enables peering without colocation costs, but adds latency.

How Peering Affects Your Connection

The peering relationships your ISP has directly impact your internet experience. Good peering means better performance and lower latency.

Good Peering Scenario

Your ISP peers directly with major content providers at a local IXP

You → Your ISP (1 hop) → Netflix/YouTube (1 hop) = 2 hops, ~10ms
  • Low latency
  • High bandwidth
  • Better streaming quality

Poor Peering Scenario

Your ISP has no direct peering, traffic goes through expensive transit

You → Your ISP → Transit 1 → Transit 2 → Destination = 5+ hops, ~80ms
  • High latency
  • Potential congestion
  • More expensive for ISP

Checking Your ASN and Route

You can check your ISP's ASN and routing information to understand your network path.

Tools to Check ASN

Your Connection
Route Analysis
  • • BGP looking glass servers
  • • AS path visualization
  • • Peering database lookup
Understanding AS Path
The AS path shows which networks your traffic traverses. Shorter paths generally mean better performance. Look for paths with 2-4 ASes for optimal routing.

Common Peering Issues

Peering Disputes

Sometimes networks disagree on peering terms and disconnect, causing traffic to take longer routes and affecting performance for end users.

Famous Example: Netflix vs Comcast peering dispute in 2014 caused streaming degradation until a paid interconnection agreement was reached.

Congested Peering Links

Even with peering, if the connection becomes saturated, you'll experience slowdowns and packet loss. Networks must constantly upgrade peering capacity.

Asymmetric Routing

Traffic to a destination might take one path, while return traffic takes another. This can complicate troubleshooting and affect performance metrics.

Related Topics