Border Gateway Protocol: Determining the Best Routes

We left the last lesson off at the question: how do routers pick a path to reach a specific destination out of a given number of paths?

Terminology

Before addressing this question, we need to familiarize ourselves with some more BGP jargon.

  1. BGP Attributes: certain attributes are sent along with path advertisement. Two of the more important ones are as follows:
    1. AS-PATH: When a BGP router advertises a route towards a prefix, it announces the IP prefix and the path used to reach this prefix. In BGP, each domain is identified by a unique Autonomous System (AS) number. The AS-Path is just a list of AS numbers that you need to go through to get to a prefix. AS-PAThs are also used to avoid loops by domains rejecting advertisements that already contain the domain's AS number.
    2. NEXT-HOP: the next hop is the IP address of the relevant interface of the router that starts a certain AS-PATH.

BGP routes are written as a combination of many things out of which we will consider three:

  1. NEXT-HOP
  2. AS-PATH
  3. Destination Prefix

Get hands-on with 1200+ tech skills courses.