Skip to content
ipaddress.no
Routing1 min read

What is BGP routing?

The protocol that ties networks together: prefixes, AS paths, how traffic finds its way, and why RPKI makes the internet safer.

By ipaddress.no

BGP (Border Gateway Protocol) is how the networks of the internet tell each other which addresses they can deliver traffic to. Without it, a customer of one provider couldn’t reach a server in another provider’s network.

Prefixes and AS paths

Every autonomous system announces the address blocks (prefixes) it originates. Sikt, which runs Norway’s research and education network, announces for example 158.36.0.0/14. Neighbours pass the announcement on and add their own AS number to the AS path. A router elsewhere might see:

158.36.0.0/14   via   AS1299 AS2603 AS224

That is: go via Arelion (AS1299) and NORDUnet (AS2603) to Sikt (AS224), the origin.

How a path is chosen

A router chooses among possible paths by rules and policy: first the most specific route (a /24 beats a /16), then local preference (customers before peers before transit), shortest AS path and several tie-breakers. There is no central control; every network decides for itself.

When it goes wrong

BGP trusts what neighbours say by default, which leads to two well-known problems:

  • Route leaks: a network passes on routes it shouldn’t, and traffic takes a detour.
  • Route hijacks: someone announces a prefix that isn’t theirs, or a more specific prefix inside it, and draws the traffic.

RPKI: route origin validation

With RPKI, the holder of an address block can publish a signed ROA: “AS224 may originate 158.36.0.0/14”. Networks that validate drop routes that contradict it. Among Norwegian networks, the large majority of announced routes are covered by a valid ROA — see Norway’s internet in numbers.

Explore it yourself