CCNP-Studies
Routing
4-BGP
19 Path Selection and Path Attributes

Path Selection & Path Attributes RFC 4271 section 5 (opens in a new tab)

BGP Best Path Selection Algorithm

Introduction

  • Understanding the BGP Best Path Selection Algorithm is crucial for network administrators as it determines how BGP routers select the best path for Network Layer Reachability Information (NLRI).

Definitive Cisco Document

BGP Path Attributes (PA)

  • BGP Path Attributes, often referred to as PAs, are an essential part of BGP routing. They provide information that helps BGP routers select the best path to reach a destination.

Well-Known Mandatory PAs

  • Well-Known Mandatory PAs are attributes that ALL BGP speakers MUST recognize and propagate in BGP UPDATE messages. They include:
    • AS_PATH
    • ORIGIN
    • NEXT_HOP

Well-Known Discretionary PAs

  • Well-Known Discretionary PAs are attributes that must be recognized by ALL BGP speakers but do not need to appear in every BGP UPDATE message. They include:
    • LOCAL_PREF
    • Atomic Aggregate

Optional Transitive PAs

  • Optional Transitive PAs are attributes that BGP speakers may or may not recognize or understand. If the "Transitive Bit" is set, BGP routers will pass these attributes along and mark them as "partial." They include:
    • COMMUNITY
    • AGGREGATOR

Optional Non-Transitive PAs

  • Optional Non-Transitive PAs are attributes that, if the Transitive Bit is NOT set, will be ignored and NOT passed along to other BGP speakers. They include:
    • MED
    • ORIGINATOR_ID
    • CLUSTER_LIST

BGP Path Attribute (PA) Type Format

Image by: IpCisco.com (opens in a new tab)

Image by: CCIEmarathon.com (opens in a new tab)

  • BGP Path Attributes use a format that includes three bits to indicate their characteristics:
    • First Bit (Bit 0) determines whether the attribute is Well-Known (0) or Optional (1).
    • Second Bit (Bit 1) indicates whether the attribute is Non-transitive (0) or Transitive (1).
    • Third Bit (Bit 2) specifies whether the attribute is Complete (0) or Partial (1).

WEIGHT

  • WEIGHT is not a BGP Path Attribute (PA) but a Cisco proprietary attribute.
  • It is locally significant and used for Cisco routers to influence route preference.
  • The default value for WEIGHT is 32768, and it has limited applications in route selection.