Why I applied for my own autonomous system number
Going from customer to network operator: what it actually involves, what it changes about latency, what it costs, and why the paperwork is worth it.
When you host game servers, latency is not a comfort detail: it is the product. A few dozen milliseconds too many and the experience is ruined, however good the machines are. For a long time I assumed the problem was hardware. It was not.
This article is about why I ended up applying for my own autonomous system number — AS198402 — what it actually changes, and what it involves when you are not a national carrier.
The path matters more than the machine
A server is two separate things: the machine, and the path to reach it.
You control the machine. You pick the processor, the memory, the type of disk. If it is too slow, you replace it. That is a problem solved with a budget and an afternoon.
You do not control the path when you are merely a customer. When you rent a server from a hosting provider, your packets travel across that provider's network, then across its transit providers, then possibly two or three intermediate networks before reaching your visitor. You choose none of it. You cannot even see it, short of running traceroute and trying to interpret the output.
That is where the milliseconds go.
A concrete example
Take two machines, both in French-speaking Switzerland, and a visitor in Lausanne.
- In the first case, the provider has a direct interconnection with the visitor's operator. The packet travels a few dozen kilometres, crosses two networks, and comes back. Call it 2 to 5 ms.
- In the second case, the provider has no direct arrangement. The packet heads for Frankfurt or Paris, because that is where the two networks actually meet, and then comes back. Call it 20 to 40 ms, for two machines fifteen kilometres apart.
Nothing is broken in the second case. No equipment is faulty. That is simply the path the topology imposes. It is sometimes called tromboning: traffic travels a long way out in order to come back to where it started.
Changing the machine does nothing about it. Changing the path does.
Becoming an operator, concretely
To choose your own paths, you have to speak the language networks use to announce themselves to one another. That language is BGP — the Border Gateway Protocol — and speaking it requires two things.
An autonomous system number (ASN). This is your network's identifier at global scale. An autonomous system is a set of routes administered by a single entity under a coherent routing policy. The number itself is just a label: AS198402, in my case. In Europe the RIPE NCC assigns them, through a member or a sponsor.
Your own IP addresses. Not addresses lent to you by a hosting provider: a prefix assigned to you, that you announce yourself, and that remains yours if you change providers. That is the difference between renting an address and being responsible for one.
With those two things you are no longer a customer at the end of a pipe. You are one network among others, negotiating your own interconnections.
What that means in terms of responsibility
It is worth being honest about the other half of the picture: from that point on, the mistakes are yours, and they are public.
If you announce a prefix that is not yours, you hijack someone else's traffic — a prefix hijack, and it is visible worldwide immediately. If you announce badly, your own services become unreachable from parts of the Internet, and you are often the last to notice, because from where you are sitting everything works.
Hence the guard rails, and they are not optional:
- IRR objects publicly declare which routes you are allowed to announce. Your peers use them to build their filters automatically.
- RPKI cryptographically signs the association between a prefix and the ASN authorised to announce it. A network validating RPKI will reject an invalid announcement.
- Outbound filtering, on your side, stops a configuration mistake from propagating past your own router.
None of that is optional if you intend to be a decent neighbour.
Internet exchange points
An Internet exchange point (IXP) is a place — concretely, a network switch in a data centre — where many networks connect in order to exchange traffic directly, without paying an intermediary.
The principle is simple: rather than buying transit from an operator who resells you access to the rest of the world, you plug into the same switch as other networks and agree to exchange your mutual traffic. It is often free between the parties, each paying for its own connection.
Three benefits, in order of importance:
- The path gets shorter. Two networks at the same IXP exchange traffic in a single hop. That is the end of tromboning.
- The cost drops. Traffic exchanged through peering is not transit billed per megabit.
- Control increases. You can see your paths, choose them, and change them.
AS198402 is present at SwissIX, DE-CIX Frankfurt, Free-IX and Lillix, with interconnection at Crissier and Paris, and an open peering policy. Current details are public on PeeringDB — which is the right habit anyway: you do not publish network figures in an article, where they rot, you point at the source of truth.
Why "open policy"
An open peering policy means you will exchange traffic with more or less any network that asks and behaves correctly. Very large networks often have selective policies, with volume or geographic criteria. For a network my size, being open is simply the rational position: every new peer is one more shorter path.
What it actually costs
The cost is not where you would expect. The registry's annual fees and the cost of connecting to an exchange point are known, predictable and ultimately modest amounts. That is not the hard part.
The hard part is:
- Time. Registration procedures, objects to maintain, sessions to configure, conversations with every peer.
- Rigour. A BGP configuration does not forgive approximation. What happens on your router is visible from outside, immediately.
- Attention. A peer changing policy, a prefix moving, a session dropping overnight: noticing is your job.
It is a standing operational commitment, not a project you finish.
Was it worth it?
Yes, but for a reason I had not anticipated.
The latency gain is real and measurable, and it was the original goal. But the real benefit is elsewhere: I now understand what happens between my servers and my visitors. Before, when somebody reported slowness, I could check the machine and that was it. The rest was a black box I had neither visibility into nor leverage over.
Today I can look at the path, see where it goes, notice that a peer's session is degraded, and act. The difference between "I don't know" and "I know, and here is what I am doing about it" is the difference between enduring an infrastructure and operating one.
It also changed how I build sites and applications: once you have seen up close what a network round trip costs, you stop wasting them.
Transit, peering, and the difference people miss
There are two ways to reach the rest of the Internet, and they complement each other.
Transit is a paid service. You buy access to the entirety of the Internet from an operator: it undertakes to carry your traffic to any destination, and to announce your prefixes to the world. It is simple, complete, and billed — usually per megabit per second, on a 95th-percentile basis.
Peering is an exchange, most often free. Two networks agree to exchange their mutual traffic — yours to them, theirs to you — and nothing else. A peer does not carry you to the rest of the Internet.
That last sentence is the point everyone gets wrong at first. Peering does not replace transit: it relieves it. You will always need at least one transit provider to reach networks you have no direct arrangement with — which is the vast majority.
The 95th percentile, because it surprises people
Transit billing generally discards the busiest 5% of intervals in the month. Concretely: an hour-long spike costs nothing, while sustained load costs full price.
The practical consequence is counter-intuitive: moving steady traffic to peering reduces the bill, moving spikes changes nothing. It is constant traffic that costs, not peaks.
Reading a traceroute without fooling yourself
It is the most used network diagnostic tool, and the most misread. Three traps come up constantly.
High latency at an intermediate hop means nothing. Routers forward packets in hardware but generate ICMP replies in software, at low priority. A busy router will answer you slowly while forwarding real traffic perfectly. Only the latency of the last hop — the destination — measures what your application experiences.
Forward and return paths can differ. Traceroute only shows the way out. If the problem is on the return path, you will not see it from where you are. You need a traceroute from the far end, or a public looking glass.
Asterisks do not mean an outage. Plenty of equipment simply does not answer ICMP, as a matter of policy. A hop showing nothing whose successor answers normally is working fine.
# The outbound path, with the AS numbers traversed
mtr --aslookup --report-cycles 20 example.com
# The return path: from a public looking glass, back towards you
# (most large networks expose one)
What I would do differently
With hindsight, three things.
Deploy RPKI on day one. I added it afterwards, and declaring your prefixes when sessions are already running takes more care than doing it on an empty network.
Document every session as you establish it. Who the contact is, what policy was agreed, which prefixes are expected. Six months later you will not remember, and that is exactly when you need it.
Monitor BGP sessions the way you monitor a service. A session dropping causes no visible outage — traffic falls back to transit, more expensive and slower. Everything works, merely worse, and nobody notices. That is the kind of silent degradation you have to instrument deliberately.
Going further
If the subject interests you and you want to dig before jumping in:
- Browse PeeringDB: it is the global peering directory, and reading the records of networks in your region is instructive.
- Read your regional registry's documentation (the RIPE NCC in Europe) on ASN and prefix assignment.
- Learn to read a
tracerouteproperly, including its limits — ICMP replies are deprioritised by a lot of equipment, and a hop showing high latency is not necessarily the culprit. - Deploy RPKI on day one, not after the first incident.
And if you are hesitating: you do not need your own ASN to build good websites. It is useful when the network is part of the product. In my case, it was.
Tags
- Hosting
- Networking
- Data centre