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?
We'll cover the following
Terminology
Before addressing this question, we need to familiarize ourselves with some more BGP jargon.
- BGP Attributes: certain attributes are sent along with path advertisement. Two of the more important ones are as follows:
- 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.
- 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:
- NEXT-HOP
- AS-PATH
- Destination Prefix
Get hands-on with 1400+ tech skills courses.