Skip to main content

Command Palette

Search for a command to run...

How to Build Your Own ISP

Updated
6 min read

Autonomous System

The internet isn't a single, monolithic cloud. It’s a massive, interconnected patchwork of thousands of independent networks, and the most fundamental building block of this global structure is the Autonomous System (AS).

Think of an AS as a digital country 🗺️. It has its own borders, makes its own rules for how traffic moves internally (its routing policy), and is managed by a single entity—be it an ISP like WorldLink, a tech giant like Google, or a university.

For one of these digital countries to participate in global traffic exchange, it needs two critical identifiers:

  • ASN (Autonomous System Number): This is the country's official, unique code on the world map (e.g., AS17501 for WorldLink). It’s the nameplate used by the internet's global GPS—the Border Gateway Protocol (BGP)—to identify the network.

  • IP Prefixes: These are the street addresses within that country (e.g., 103.23.140.0/22). They represent the blocks of "digital real estate" that the AS owns and manages.

Without an ASN, a network has no identity on the world stage. Without IP prefixes, it has no territory to announce. An AS needs both to be a recognized and functioning part of the global internet.


Who Assigns ASNs and IPs?

The distribution of these resources follows a strict hierarchy:

  1. IANA (Internet Assigned Numbers Authority): Maintains the global pool of IP space and ASN ranges.

  2. RIRs (Regional Internet Registries): Allocate resources to organizations within their regions. Nepal and the Asia-Pacific region fall under APNIC.

  3. ISPs and LIRs (Local Internet Registries): Request and manage ASNs and IP addresses from their RIR.

This structure ensures uniqueness and prevents conflicts across the global internet.

Real-World ASN Examples and Their IP Prefixes

OrganizationIPv4 CountLINK
WorldLink Communications(AS17501)75,008https://ipinfo.io/AS17501
eSewa Private Limited(AS133190)256https://ipinfo.io/AS133190
Khalti Private Limited(AS151207)512https://ipinfo.io/AS151207

Internet Hierarchy

The internet has an informal structure based on a network's scale and how it connects to the world.

Traditional ISP Tiers

  • Tier 1: The global backbones of the internet. Their networks are so extensive they don't pay for access, instead peering freely with all other Tier 1s. They're like major international airlines with routes to every continent.

  • Tier 2: Large national or regional providers. They peer extensively to save costs but must still buy IP Transit from a Tier 1 to ensure their customers have full global reach. They are the national airlines that partner with global ones for overseas flights.

  • Tier 3: Smaller, "last-mile" providers that deliver internet directly to homes and businesses. They almost exclusively purchase transit from larger ISPs. They're the local taxi service that takes you to the main airport.

Hyperscalers

Hyperscalers are large technology companies operating massive private networks, often larger than traditional Tier 1 ISPs. Unlike the tiered ISP model, their networks are built to support global cloud platforms, large-scale content delivery, and online services.

Key characteristics:

  • Operate their own global backbones interconnecting data centers worldwide.

  • Peer directly with thousands of ISPs to deliver services efficiently.

  • Minimize dependence on transit providers.

Examples of hyperscalers include:

  • Google (AS15169): Operates Google Cloud, YouTube, and Gmail.

  • Amazon (AS16509): Runs Amazon Web Services (AWS).

  • Microsoft (AS8075): Runs Azure and Microsoft 365.

  • Meta (AS32934): Operates Facebook, Instagram, and WhatsApp.

  • Netflix (AS2906): Operates a global content delivery network for video streaming.

  • Cloudflare (AS13335): Provides CDN, security, and edge computing services.

These companies invest heavily in infrastructure and connect directly to ISPs and IXPs worldwide to improve performance and reduce costs. You can go to https://ipinfo.io/. And check the IP blocks they control and other details.


Connections Between Networks

Every Autonomous System (AS) must connect with others to exchange traffic, since no single AS can reach the entire internet on its own. These connections typically fall into two main business relationships:

  • Transit:
    Transit is a paid service where one AS (the provider) agrees to carry all of another AS’s traffic to the rest of the internet. In practice, this gives the customer network full global reachability. Smaller ISPs, enterprises, or payment platforms often buy transit from larger providers. Pricing is usually based on bandwidth capacity (e.g., per Mbps or Gbps). Transit agreements create a hierarchical internet structure, with smaller ASes “upstream” of larger ones.

  • Peering:
    Peering is a mutual agreement where two ASes exchange traffic only between their respective customers, without payment. The main motivation is efficiency—peering reduces latency and avoids transit costs. However, peering is not guaranteed; networks peer only when both sides see mutual benefit, such as high traffic volume between them or geographic proximity.


Internet Exchange Points (IXPs)

Most peering relationships are established at Internet Exchange Points (IXPs). An IXP is a physical infrastructure (typically a high-capacity Ethernet switch) where multiple networks interconnect through a shared fabric. Instead of setting up dozens or hundreds of private links, each participant only needs one connection to the IXP, and from there they can peer with many others.

Benefits of IXPs include:

  • Reduced Cost: One port at the IXP replaces many separate links, lowering operational and bandwidth expenses.

  • Lower Latency: Traffic between local or regional networks can be exchanged directly, avoiding long detours through upstream providers.

  • Scalability: Networks can easily add or remove peers without reconfiguring complex topologies.

  • Ecosystem Growth: IXPs often act as hubs, attracting CDNs (like Cloudflare, Akamai), hyperscalers (Google, AWS, Microsoft), financial platforms, and local ISPs, which further strengthens local internet resilience.

Well-known IXPs include LINX (London Internet Exchange), DE-CIX (Germany), and AMS-IX (Amsterdam). In Nepal, NPIX (Nepal Internet Exchange) plays this role by connecting local ISPs and service providers, keeping domestic traffic within the country.


ISP Startup Checklist ✅

Building an ISP involves both regulatory approval and technical infrastructure. The core steps are:

  1. Legal Setup

    • Register a company.

    • Obtain an ISP license from the national regulator (in Nepal: NTA).

  2. Identity (ASN and IPs)

    • Apply to your RIR-APNIC(Asia Pacific Network Information Centre) for an ASN and IP address blocks.

    • Expect primarily IPv6 allocations, as IPv4 is scarce.

  3. Point of Presence (PoP)

    • Lease rack space in a carrier-neutral data center.

    • Deploy:

      • Carrier-grade routers capable of BGP and handling large routing tables.

      • Switches for internal aggregation.

      • Servers for DNS, RADIUS (authentication), and monitoring.

    • Ensure redundancy in power, cooling, and connectivity.

  4. Transit Connectivity

    • Sign a contract with an upstream provider.

    • Establish cross-connects to their equipment in the same facility.

    • Configure external BGP sessions for global reachability.

  5. Peering

    • Join the regional IXP (in Nepal: NPIX).

    • Establish peering sessions with local ISPs, content networks, and hyperscalers present at the exchange.

    • Reduce transit costs and improve latency for local traffic.

  6. Operations

    • Deploy monitoring and logging systems.

    • Establish network security policies.

    • Set up customer support and provisioning systems.


Next Steps

Now that we’ve covered the foundation of ASNs, IP prefixes, transit, peering, and IXPs, the next critical topic is BGP (Border Gateway Protocol).

BGP acts as the duct tape of the internet, holding together the complex web of networks and enabling global connectivity. It allows networks to announce their prefixes, learn routes from other ASes, and make intelligent decisions about the best paths for traffic.

In the next blog, we’ll explore:

  • How BGP sessions are established.

  • The difference between internal (iBGP) and external (eBGP) sessions.

  • Visualization of BGP works.

  • Real-world examples of major outages caused by BGP hijacking or misconfigurations, demonstrating why careful BGP management is critical for network stability.

This will give a practical understanding of how the internet’s routing backbone works and why even small mistakes can have wide-reaching effects.

The Internet

Part 2 of 3

A three-part series exploring how the internet works — from packet flow in local networks to ISP operations and the global routing system (BGP). Real-world cases reveal both the resilience and fragility of the internet.

Up next

Local Network and Their Networks

Before we can explore how data crosses continents and bounces between hyperscale data centers, we need to start with the smallest piece of the puzzle: your local network. Every device on the internet is part of a smaller network first — your phone co...