Loading…

BGP features

This post is not finished yet; I will add other features/options.

The topics below are alphabetically ordered.


BGP Routing Information Base (RIB)

First of all, BGP speakers exchange NLRI (Network Layer Reachability Information) that we usually simplify calling it routes or prefixes. NLRI is a set of network address and length tuples: 200.0.0.0/24, where 200.0.0 is the address, and 24 is the length.

The RIB of a BGP speaker router comprises:

  • Adj-RIB-In: The NLRI received by a router as it was sent by the neighbor
  • Loc-RIB: This is the resulting NLRI table after applying all the configured input policies to the Adj-RIB-In
  • Adj-RIB-Out: This is the NLRI table the router sends to its neighbors. It may differ from the Loc-RIB because there may be output policies in use

See that the Adj-RIB-Out of a router is the Adj-RIB-In of a neighbor.

The following image illustrates BGP RIP and decision process:

BGP RIB
By Luca Ghio (Own work Xournal source file) [CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)], via Wikimedia Commons

Graceful Restart

A BGP speaker router with Graceful Restart enabled can keep the forwarding information during a session restart. When a session opens, both peers send each other the Graceful Restart capability information.

It works this way: router A restarts the session, so router B (called ‘helper’) marks routes to router A as stale but keeps forwarding packets to A for a given time. Router A forwards packets based on the routing table state before the restart. When router A goes up, router B receives A’s prefixes and resumes normal operation. Graceful restart avoids unnecessary route flapping and topology changes.

Nonstop Routing (NSR) and Forwarding (NSF)

These are not BGP exclusive features; they are used by others routing protocols.

The Nonstop Forwarding feature, in Cisco devices enabled by Cisco Express Forwarding (CEF), keeps devices’ FIB during a switchover making the packets being forwarded during a protocol session restart. This feature enables a router with Graceful Restart, for example.

While Graceful Restart requires both neighbors supporting NSF, NSR doesn’t. In a switchover event of a peer with no support to NSF, NSR enabled router keeps the BGP state for the session.

Soft-reconfiguration

This feature enables the router to perform a session soft reset. Without soft-reconfiguration or route refresh capabilities, the router needs a hard reset, what resets the BGP/TCP session, when it needs to reapply policies after a change. In production networks, a hard reset causes a short traffic interruption during the session goes down, and up, and reestablish. The resetting router may also be punished when dampening is in use.

Soft-reconfiguration is set by neighbor or peer-group:

With the soft-reconfiguration inbound feature enabled, the router stores a different NLRI table with information received from every neighbor (in other words, it keeps the Adj-RIB-In of every neighbor even after applying the policies). When a policy changes and the administrator performs the soft reset, the router then applies the policies against the stored table of the neighbor. BGP/TCP session won’t reset. It is a great resource when the routers aren’t route refresh capable, although it causes memory overhead.

The command to perform a soft reset follows:

After activating soft-reconfiguration, you can see two sets of NLRI from every neighbor: 1) only the routes in use from a given neighbor, and 2) all routes received from a given neighbor.

Route Refresh

Defined by RFC 2918, route refresh enables the router to perform a soft reset by asking the neighbor to resend its NLRI without resetting the BGP/TCP session. It is preferred rather than soft reconfiguration because the routers don’t keep an NLRI (Adj-RIB-In) table for every neighbor, so it doesn’t cause memory overhead. This feature requires both neighbors to be route refresh capable and both must advertise it each other during session negotiation.

You know whether your neighbor is route refresh capable issuing the command show ip bgp <neighbor RID>. See the line 8 in the example below:

The command to perform a soft reset using route refresh is the same of soft-reconfiguration:

References

Leave a Reply