BGP

Border Gateway Protocol or BGP is an Internet Engineering Task Force or IETF standard, and is by far and away the most scalable of all routing protocols found anywhere today. BGP is the routing protocol driving the global Internet, as well as most if not all Service Provider private MPLS networks.


Features

  • Runs on TCP over port 179
  • Path Vector
  • Autonomous Systems: AS
  • Timers Hello: 60 Seconds
  • Authentication: MD5
  • Address Families: IPv4, IPv6
  • eBGP: AD = 20
  • iBGP: AD = 200
  • RFC – 4271
  • Control Plane FIB
  • Data Plane RIB

Communities


The community attribute is a way of grouping destinations in a certain community and applying routing decisions according to those communities. The routing decisions are accept, prefer, and redistribute, among others.

  • RFC – 1997
  • RFC – 4360 – Extended Communities
  • Communities are 32-bit values
  • Pre-defined: NO_EXPORT
  • Pre-defined: NO_ADVERTISE
  • Pre-defined: NO_EXPORT_SUBCONFED
  • Pre-defined: NOPEER

Speakers

A single iBGP Router can speak on behalf of the entire Autonomous System reducing the overall peering. However this does require that the entire Autonomous System be fully meshed.

Routing Information Base or RIB

  • Adj RIB: Ininformation received from peers used locally after applying policy
  • Local RIB: Stored results from processed inbound RIB used locally after policy
  • Adj RIB Out: Information stored locally advertised to BGP peers only best routes

Confederations

The implementation of BGP confederation reduces the overall iBGP mesh inside a large Autonomous System. The key is to divide a single AS into smaller multiple ASs by grouping them together.

Route Reflectors

A Route Reflector or RR is an alternative or optional approach to reducing the overall iBGP mesh. BGP specifies that a BGP speaker cannot advertise routes to an iBGP neighbor if the speaker learned the route from a different IBGP neighbor. The routes are reflected among iBGP routers that are not meshed.

Flapping

With over 400,000 prefixs on the Internet or even in large MPLS deployments flapping  interfaces can cause major performance issues. BGP has the ability to dampen or suppress unstable routes.

NLRI

The RIB table holds the Network Layer Reachable Information or NLRI that’s exchanged between BGP neighbors using update messages. The Network Layer Reachable Information message is made up of Length and Prefix. The Length or Mask is in the CIDR format or slash notation /, and Prefix is the address of the Subnet.

There is no way you can spend any decent amount of time talking about BGP without covering the Attributes. Some of the BGP Attributes are Mandatory and are required as part of every routing update and decision, while others are optional.

Mandatory Well Known Attributes

  • Origin –   interior –  e  exterior –   unknown
  • AS_Path – Routers will prepend the AS to each Autonomous system
  • Next_Hop

Discretionary Well Known Attributes

  • Local-Preference: Used for consistent routing policy
  • Atomic Aggregate: Informs Neighbors the originating Router aggregated the route

Optional Attributes

  • Transitive
  • Nontransitive
  • Multi-exit discriminator or MED

Path Attributes

  1. Next-Hop – Mandatory Well Known
  2. Weight – Cisco proprietary 
  3. Local preference – Discretionary Well Known
  4. Multi Exit Discriminator or MED – Optional
  5. Origin – Mandatory Well Known
  6. AS Path – Mandatory Well Known
  7. Next-Hop – Mandatory Well Known
  8. Community

Best Path Selection

  1. Weight – Higher is more preferred
  2. LOCAL PREF – Highest is better
  3. Originated – Locally
  4. AS PATH -Short is better
  5. Origin Type – IGP is lower than EGP and EGP is lower than incomplete
  6. MED – Lower is better
  7. Paths – External > Internal
  8. RID – Router ID lower is better

iBGP vs. eBGP

A BGP session between two peers in different autonomous systems or AS is considered to be an external or eBGP session. A BGP session between two BGP peers in the same autonomous system is considered to be an internal or iBGP if the BGP peers are in the same autonomous systems.

Cisco Training Videos

Routing Switching Voice Firewall Wireless