BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

How BGP works

Want to summarize with AI?

Log in

Overview

Explains core BGP operations, covering route advertisement, decision processes, and mechanisms influencing inter-domain routing behavior.

BGP is a protocol that enables routers to exchange routing information across different autonomous systems using TCP connections. It is fundamental for inter-domain routing and policy enforcement in large-scale networks.

  • BGP operates between peer routers to share network reachability and routing information.

  • Keepalive packets are used to maintain connection integrity between BGP peers.

Summary

The key components involved in BGP operation include:

  • BGP: A protocol that uses TCP as its transport protocol to exchange routing information between routers.

  • Peer routers (BGP peers/neighbors): Two routers that establish a TCP connection to exchange BGP routing information.

  • BGP routing table: A table that contains the routing information exchanged between peers.

  • Keepalive packets: Packets that are periodically exchanged between peers to verify that the connection is still active.

BGP operates by establishing a TCP connection between routers (peers) to exchange network reachability information, which includes paths represented by Autonomous System Numbers (ASNs). This information is used to construct a loop-free routing graph, enabling efficient routing and policy enforcement. Once connected, peers exchange complete routing tables initially, followed by incremental updates for changes such as new routes, modifications, or withdrawals. To maintain the connection, periodic keepalive packets are exchanged, and notification packets are sent for errors or special conditions, ensuring reliable inter-domain routing.

Workflow

These stages describe how BGP works.

  1. Establishing a TCP connection between BGP routers initiates the process. Two routers, known as BGP peers or neighbors, set up a TCP session to begin exchanging routing information.
    • Two BGP routers, referred to as BGP peers or neighbors, establish a TCP connection.
    • These routers exchange messages to open the connection and confirm the connection parameters.
  2. Exchanging network reachability information occurs after the TCP connection is established. BGP routers share details about reachable networks and the paths to those networks.
    • After the connection is established, BGP routers exchange network reachability information.
    • This information includes the complete paths represented by BGP autonomous system numbers (ASNs) that a route should take to reach a destination network.
    • The exchanged information helps construct a graph of autonomous systems. This graph shows loop-free paths and identifies where routing policies can be applied to enforce restrictions on routing behavior.
  3. Constructing a loop-free routing graph uses the exchanged reachability information. BGP builds a graph of autonomous systems to ensure efficient, policy-driven routing without loops.
    • BGP uses the exchanged network reachability information to construct a graph.
    • This graph identifies loop-free autonomous systems and highlights where routing policies can be applied to enforce restrictions on routing behavior.
  4. Exchanging routing tables happens once the connection is established. Peers share their complete BGP routing tables to synchronize network information.
    • When the BGP connection is established, the peers exchange their complete BGP routing tables.
  5. Sending incremental updates follows the initial exchange. BGP routers send updates only when changes occur, such as new routes, modifications, or withdrawals.
    • After the initial exchange, BGP routers send only incremental updates as changes occur in the routing table. These updates may include new routes, modified routes, or route withdrawals.
  6. Tracking routing table versioning ensures consistency across peers. BGP maintains a version number for the routing table, updating it whenever changes are made.
    • BGP keeps a version number for the routing table. This version number is identical across all BGP peers and is updated whenever changes are made to the table due to routing information updates.
  7. Maintaining the connection involves periodic keepalive packets and notification packets for errors or special conditions. This ensures the connection remains active and reliable.
    • BGP routers send periodic keepalive packets between peers to ensure that the connection remains active.
    • BGP routers send notification packets when errors or special conditions occur.

Result

This process ensures that BGP operates efficiently, maintains reliable communication, and adapts to changes in routing information dynamically.