Lesson 2 of 3
BGP: how networks connect
2 min
The internet is tens of thousands of independent networks, each called an Autonomous System (AS) with its own number (ASN). BGP is how they tell each other which addresses they can reach.
What BGP announces
A network announces its prefixes: "AS64500 can deliver traffic for 198.51.100.0/24." Neighbours pass that on, adding their own ASN to the AS path. A route might arrive as:
198.51.100.0/24 path: 64510 64505 64500How a path is chosen
BGP doesn't pick the fastest path; it picks by policy. In order, it usually prefers:
- Routes with higher local preference, set by the network's own business rules (for example, customers before paid transit)
- Shorter AS paths
- Several tie-breakers after that
Why it matters to you
- Your hosting provider's upstream connections decide how fast it reaches your visitors in Egypt and the Gulf.
- With your own ASN and IP block, you can multi-home: connect to two providers, so one can fail without taking you offline.
BGP trusts what neighbours announce. RPKI lets networks sign their prefixes so others can reject hijacked routes. Ask whether your provider validates it.