8.2 Basic BGP Operation
8.2.2 BGP neighbors
When two routers establish a TCP-enabled BGP connection, they are called neighbors or peers. Each router running BGP is called a BGP speaker. Peer routers exchange multiple messages to open and confirm the connection parameters, such as the version of BGP to be used. If there are any disagreements between the peers, notification errors are sent and the connection fails.

When BGP neighbors first establish a connection (Figure ), they exchange all candidate BGP routes (Figure ). After this initial exchange, incremental updates are sent as network information changes. As discussed in earlier chapters, incremental updates are more efficient than complete table updates. This is especially true with BGP routers, which may contain the complete Internet routing table.

Peers advertise destinations that are reachable through them by using update messages. These messages contain, among other things, route prefix, AS path, and path attributes such as the degree of preference for a particular route.

If network reachability information changes, such as when a route becomes unreachable or a better path become available, BGP informs its neighbors by withdrawing the invalid routes and injecting the new routing information. Withdrawn routes are part of the update message. BGP routers keep a table version number that tracks the version of the BGP routing table received from each peer. If the table changes, BGP increments the table version number. A rapidly incrementing table version is usually an indication of instabilities in the network, or a misconfiguration.

If there are no routing changes to transmit to a peer, a BGP speaker will periodically send keepalive messages to maintain the connection. These 19-byte keepalive packets are sent every 60 seconds by default, and they present a negligible drain on bandwidth and a router's CPU time.