8.2 Basic BGP Operation
8.2.1 BGP routing updates
BGP has been most recently defined in RFC 1772. BGP's job is to exchange routing information between autonomous systems while guaranteeing loop-free path selection. BGP4 is the first version of BGP that supports CIDR and route aggregation. Unlike common IGPs (such as RIP, OSPF, and EIGRP), BGP does not use technical metrics. Instead, BGP makes routing decisions based on network policies, or rules.

This section offers a brief overview of how BGP works and is followed by a more detailed examination of the various types of BGP packets and relationship states.

BGP updates are carried using TCP on port 179. In contrast, RIP updates use UDP port 520, while OSPF does not use a Layer 4 protocol. Because BGP requires TCP, IP connectivity must exist between BGP peers, and TCP connections must be negotiated between them before updates can be exchanged. Thus, BGP inherits TCP's reliable, connection-oriented properties.

To guarantee loop-free path selection, BGP constructs a graph of autonomous systems based on the information exchanged between BGP neighbors. As far as BGP is concerned, the whole internetwork is a graph, or tree, of autonomous systems. The connection between any two systems forms a path, and the collection of path information is expressed as a sequence of AS numbers (called the AS Path). This sequence forms a route to reach a specific destination, as shown in the figure.