Border Gateway Protocol (BGP) is the routing protocol that networks use to tell each other which blocks of IP addresses they can reach. The internet connects autonomous systems, each identified by an autonomous system number (ASN) and run by internet service providers (ISPs), cloud providers, content networks and some enterprises. BGP is how those systems exchange routes and decide which path traffic should take between them. Organizations without their own ASN connect through their provider’s autonomous system. For businesses, BGP shows up when connecting to more than one internet provider, setting up private connections to cloud providers, and protecting the addresses they own.
At a glance
- BGP exchanges reachability information between networks, called autonomous systems, and is the protocol that holds the internet’s routing together.
- It is policy-based: each network chooses which routes to accept, prefer and pass on, not only the shortest path.
- Enterprises use it for multihoming with several ISPs, for private cloud connections and with some SD-WAN and data center designs.
- It trusts what neighbors announce, so filtering, RPKI validation and monitoring are needed to limit leaks and hijacks.
- Failover speed depends on timers and configuration; it is not instant by default.
What problem it solves
The internet is made up of tens of thousands of independently run networks. No single organization has a map of all of them, yet traffic needs to find its way from any one to any other. BGP lets each network announce the address ranges, or prefixes, it can deliver to, and pass along what it has learned from others, so every network can build its own view of how to reach everything else.
For a business, BGP solves more practical problems. It lets you announce your own public IP addresses through two or more providers, so customers and remote staff can still reach your services if one provider fails. It is the standard way cloud providers exchange routes over private connections. And it gives you control over which links your traffic uses.
How it works
Sessions. Two routers, called neighbors or peers, open a BGP session and exchange routes. Sessions between different autonomous systems are external BGP (eBGP); sessions inside one network are internal BGP (iBGP).
Announcements. Each network advertises the prefixes it originates or can reach. A route carries attributes, including the AS path, the list of networks the route has passed through, which helps prevent loops.
Path selection. When a router learns several routes to the same destination, it picks one using a defined order of attributes, such as local preference set by the network itself, AS path length and others. Operators shape that choice with policies, for example preferring a cheaper peering link over paid IP transit, or making one provider primary and the other backup.
Updates. When a link fails or a route changes, routers send updates and withdraw routes, and the change ripples outward. How long that takes depends on timers and network size.
Scale. The global IPv4 routing table now holds around a million routes, plus a large and growing IPv6 table, which is why receiving a “full table” needs routers with enough memory.
When it matters for buyers
- When you need inbound resilience. If you host VPNs, phone systems or applications that must stay reachable through a provider outage, BGP multihoming with your own addresses is the usual approach, combined with carrier diversity.
- When connecting privately to cloud providers. Dedicated cloud connections generally use BGP to exchange routes; your team or provider must configure it.
- When buying internet access. Ask whether the provider supports BGP sessions, which route options it offers and whether it filters what customers announce.
- When protecting your addresses. Publishing RPKI records for addresses you hold helps other networks reject false announcements of them.
- When DDoS mitigation is needed. Some scrubbing services use BGP to divert attack traffic through their networks.
Questions to ask vendors
- Do you support BGP on this service, with a public or private ASN, and is there an extra charge?
- Will you send a default route, a full table or partial routes?
- Can we announce our own IP addresses, and what paperwork, such as a letter of authorization, do you need?
- Do you filter customer and peer announcements and validate routes with RPKI?
- Which BGP communities do you support for controlling how our routes are announced?
- What failover times can we expect, and do you support Bidirectional Forwarding Detection?
- Who configures and monitors our BGP sessions if the service is managed?
How it differs from Open Shortest Path First (OSPF)
BGP routes between networks run by different organizations. Open Shortest Path First (OSPF) is an interior gateway protocol that routes within one organization’s network. OSPF knows the full map of links inside your network and finds the lowest-cost path quickly, which suits a campus or data center. BGP exchanges policy-driven routes with outside networks and scales to the whole internet, but usually converges more slowly. Many enterprises run both: OSPF or a similar protocol inside, and BGP at the edge toward ISPs, cloud providers and WAN carriers. Our IP transit and cloud connect pages cover services where BGP is part of the setup.
Problems this helps with
- Want two internet providers that fail over without changing our IP addresses
- Cloud provider says our private connection needs a BGP session
- Our traffic took a strange path or our addresses were announced by someone else
- Not sure whether we need our own ASN and IP space





