← Back
BGP

BGP Operational Stages, Peering, FSM & Configuration

1. The Three Operational Stages of BGP

BGP operates through three main stages:

  1. Neighbor Table Establishment: Routers establish a TCP connection using port 179 and form a BGP peering session.

  2. BGP Table Building: BGP peers exchange UPDATE messages containing NLRI and path attributes. The router stores the learned routes in its BGP table.

  3. IP Routing Table Selection: BGP evaluates available paths, selects its best path, and attempts to install the selected route into the IP routing table for packet forwarding.

2. eBGP vs. iBGP

Screenshot 2026-10-22 082514.png


Note: TTL defaults can vary by vendor and platform. Cisco administrative distance values shown above are Cisco defaults, not universal BGP values.

3. BGP Finite State Machine (FSM)

BGP uses six states to establish a peering session:

  1. Idle: Waits for a start event.

  2. Connect: Attempts to establish a TCP connection.

  3. Active: Attempts to establish or re-establish the TCP connection.

  4. OpenSent: Sends an OPEN message and waits for the peer's response.

  5. OpenConfirm: Waits for a KEEPALIVE message to confirm the session.

  6. Established: The session is operational, and peers can exchange routing updates.

4. Basic BGP Configuration

Example Cisco IOS configuration for eBGP:

Router(config)# router bgp 65001 Router(config-router)# neighbor 192.0.2.2 remote-as 65002 Router(config-router)# network 10.10.10.0 mask 255.255.255.0

The network command normally requires the specified prefix to exist in the local routing table before BGP can advertise it.

Useful verification commands:

show ip bgp summary show ip bgp show ip route bgp show ip bgp neighbors

Comments (0)

Discussion

No comments yet. Start the discussion.