One reason the Internet is so robust is that authority is decentralized: every network is run independently. Each network operator (whether a major cable or mobile company or community WISP (wireless ISP)) decides who they will connect to. As those networks connect, they tell each other what IP addresses they know how to reach.
In a system as large and complex and ever-changing as the Internet, this can’t be done manually. Instead, routers (specialized devices that figure out the best way to get somewhere on the Internet) tell each other about what IP addresses they know how to reach. They do this using BGP, Border Gateway Protocol. This protocol, like all protocols, defines how they communicate with each other: what kinds of things can be communicated, and how they can be communicated.
A router speaking BGP to another will “announce” or “advertise” what IP addresses it knows how to reach. This is what is meant by what routes are advertised or prefixes are being announced, and so on. That router’s “neighbor” routers will listen to those route announcements, then compare them to routes it already knows. Based on a well-known set of rules (an algorithm), it selects the best path or best route (same thing) to addresses in that network. It then shares that information with its own neighbor routers.
If the neighbor routers are controlled by different organizations they are in different autonomous systems. A simplified route announcement might look like:
192.0.2.0/24 172.18.14.1 65536 65525
In this example, the first section is the prefix: the IP address block being announced. In this case, it’s a /24 network. The second section is the “next hop,” the address of the next router in the path. The last section has two numbers: those are ASNs. ASNs appear in the order your data will cross them. The last number (65525) is always the ASN that “originated the route.” It’s the last ASN in the path, because it’s where the devices with those IP addresses are.
The same ASN can also originate IPv6 addresses:
2001:db8:12: :/36 2001:db8: :1 6536. 65525
This route is only different from the previous example in using IPv6 addresses instead of IPv4.
How much does an ASN cost?
The Regional Internet Registries (RIRs) have unallocated ASNs available for a nominal fee. For various reasons, some people prefer shorter numbers (maybe they’re easier to remember). IPv4.Global has ASNs for sale on our online marketplace. As with IP address sales, we list the price of ASN transactions made through the marketplace.