Routing Protocol: BGP Basics Overview

Today I will going to discuss on the basics of one of the most important exterior gateway routing protocol and the name is " BGP- Border Gateway Routing Protocol ". This is only one protocol used to connect two different Autonomous Systems having two different AS numbers. BGP is one of the interesting protocol to study and design and is named as EGP protocol.

Most of the service providers connect with each other by using BGP protocol (eBGP) to connect with each other. Lets talk about the basics of BGP- Border Gateway Routing Protocol

Why and when to use BGP protocol
  • If you have multiple connectivity to the different Autonomous Systems.
  • If you have multiple routes to send via different Autonomous Systems.
  • Multiple connections exist to external Autonomous Systems through the one service provider, but connect via a separate different routing policies.
Fig 1-1- Basic BGP Topology

Basics about BGP- Border Gateway Routing Protocol
  • BGP is generally used to connect different Autonomous Systems.
  • BGP is a Path vector protocol.
  • BGP AS number is ranging from 1-65535; where 64512-65535 range for Private AS numbers.
  • BGP uses TCP protocol for handshaking Process.
  • BGP uses source port number 179 on TCP to establish connection.
  • There are two versions of BGP, one is iBGP (Internal BGP) and other is eBGP (external BGP).
  • The Administration distance or so called AD of BGP for Cisco routers are (iBGP=200; eBGP=20); Route Preference-Juniper ( BGP=170)Route Preference-HP and Huawei (iBGP=255; eBGP=255).
  • BGP peer messages are Open, Keepalive, Update and Notification
  • BGP States have 6 states and these states are Idle, Connect, Active, Open-sent, Open-Confirm, Established.
  • BGP Path Selection Criteria I- Weight (Cisco); Local Preference; Locally Originate; AS-Path; Origin-code; MED; BGP Route-type; BGP Route-Age. (Either you remember with the way-1 or with the way-II as shown below).
  • BGP Path Selection Criteria II- Well-known Mandatory, Well-known Discretionary, Optional Transitive, Optional Non-Transitive.
  • BGP Communities are No-Export, No-Advertised, Local-AS and Internet.
  • BGP TimersKeepalive Timer is 30 Seconds; Hold-Timer is 90 seconds
  • BGP Synchronisation RuleBGP waits until IGP propagates the route within the AS and then advertises it to external peers. A BGP router with synchronisation enabled does not install iBGP learned routes into its routing table if it is not able to validate those routes in its IGP.
  • BGP Route DampeningRoute dampening “suppresses” routes that are flapping, minimising unnecessary convergence and updates. If a route flaps (goes up and down), it is assigned a penalty (default is 1000). All routes start with a penalty of 0, and the local router maintains a history of routes that have flapped.
  • BGP Backdoor Concept- The BGP Backdoor workaround is to use the BGP network backdoor command, which adjusts the AD for a specific eBGP route (by default, from 20 to 200) and resulting in the IGP route being preferred.
  • BGP AS-Path Prepend- The concept of AS-Path prepending is a way to manipulate the AS-Path attribute of a BGP route. It allows prepending multiple entries of AS to a BGP route. This can come as a workaround if a specific path is required to be followed, and other means like Multi-Exit Discriminator (MED) is not supported.
  • iBGP Full Mesh remedy- BGP Route-Reflector Concept; BGP Confederation Concept.
  • BGP Route-Reflector(RR)- A route reflector is BGP router that is allowed to break the iBGP loop avoidance rule. Route reflectors can advertise updates received from an iBGP peer to another iBGP peer under specific conditions.
  • BGP Confederation Rule- BGP confederation is a method to use Border Gateway Protocol (BGP) to subdivide a single autonomous system (AS) into multiple internal sub-AS's, yet still advertise as a single AS to external peers.
We will talk many more concepts in the details in another article and will explain with the configuration part of all the topics which i explain in short as above.