Protocol ExplorerGuidesPricing

BGP Routing: How Autonomous Systems Exchange Routes

Border Gateway Protocol (BGP) exchanges reachability information between autonomous systems. A route advertises a path and attributes that operators evaluate under local policy.

Updated · Editorial approach and simulation limits

BGP peers and autonomous systems

A BGP speaker establishes a peer relationship with another speaker and exchanges information about reachable network-layer prefixes. Each autonomous system has a number that identifies the routing domain in the path. External BGP exchanges routes between autonomous systems; internal BGP distributes BGP information within one autonomous system.

BGP uses a long-lived TCP connection for peer communication. The session is the control channel; the advertised prefixes describe possible forwarding destinations, not the actual packets that later use those routes. A stable session can therefore coexist with a forwarding problem elsewhere in the network.

UPDATE messages carry reachability and path attributes

BGP UPDATE messages can announce new network-layer reachability, withdraw previously advertised prefixes, and attach path attributes such as AS_PATH, NEXT_HOP and LOCAL_PREF. These fields let a router describe the route and apply policy to it. An UPDATE is not simply a claim that one path is objectively fastest.

AS_PATH records autonomous systems a route has traversed and can help prevent loops. LOCAL_PREF is a local policy signal used within an autonomous system and is not generally advertised to external peers. Operators compare attributes in a decision process whose details and policy are local to the network.

Read a BGP incident as control plane plus forwarding

For an incident, check whether the peer session is Established, then look for the relevant UPDATE or withdrawal, inspect its prefix and attributes, and compare the selected route with the forwarding table. A route can be received but rejected by import policy, or selected but not installed for a separate reason.

A missing route, a changed next hop and a broken data path are different symptoms. Confirm the observation point, address family and direction. The BGP animation simplifies the exchange; use router logs, route policy and the cited specification to diagnose a live network.

Explore BGP interactively

Follow the matching exchange packet by packet. The animation is a scripted teaching model with illustrative timing, not a capture of your network.

Open the BGP animation · Compare Free and Pro

Specification and source

For exact protocol requirements, consult the primary document: RFC 4271: A Border Gateway Protocol 4 (BGP-4). This page summarizes selected behavior and is not a substitute for the specification.

Related protocol lessons

Browse all network protocols · Compare transport behavior beneath application traffic