• Best Path Selection:
    • Default chooses single best path.
    • Best path installed in RIB/FIB
    • Advertised to other BGP peers.
    • Decision process
      • RFC 4271
  • Prerequisites:
    • Next hop must be in routing table
      • prevents route recursion failure.
    • Synchronization rule must be met or disabled.
    • AS-Path must not contain local-AS
      • Standard EBGP Loop prevention
      • Can be disabled with ‘allow-as in’
    • First ASN in path must be neighbor’s ASN
      • bgp enforce-first-as’ command.
  • Path Selection Order
    • Weight
      • Cisco proprietary
      • Locally significant
      • Higher value is preferred
    • Local Preference
      • Higher value is preferred
      • Not advertised to EBGP peers.
      • Carried through confederation EBGP.
    • Locally Originated
      • Locally originated gets weight of 32768
    • AS-Path
      • Smaller length is preferred
    • Origin
      • IGP over EBGP over Incomplete
        • IGP origination is from network statement.
        • Incomplete is from redistribution.
          • Network statement preferred over redistribution.
    • MED
      • Smaller value preferred.
      • Only compared for peerings to same provider by default.
        • Typically only used for comparing the same route from the same provider over multiple links.

Tie Breakers:

  • EBGP over iBGP
    • If learned from EBGP, it’s not your prefix.
    • EBGP always preferred.
  • IGP Metric to Next-Hop
    • Can use multi-path if all equal after this step.
    • Hidden command to allow multipath if AS_Path is not the same (has to be same length)
      • ‘bgp bestpath as-path multipath-relax’
  • Additional Tie Breakers:
    • Oldest
    • Lowest RID
    • Shortest cluster list
    • Lowest Neighbor Address
  • Exceptions:
    • ‘bgp bestpath as-path ignore’
    • ‘bgp always-compare-med’
      • Compares MED for routes locally originated in Confederation.
    • ‘bgp bestpath med missing-as-worst’
      • Assign 4,294,967,294 to NULL MED
    • ‘bgp deterministic med’
      • Compare MED against all possible paths.
    • IGP Metric
      • ‘bgp bestpath igp-metric ignore’
        • IOS-XE 3.4S
    • Router-ID
      • ‘no bgp bestpath compare-router-id’

Manipulating Best Path Selection

  • Outbound routing policy affects inbound traffic
  • Inbound routing policy affects outbound traffic
  • Longest match routing is above all
    • Affects both directions.
  • Attributes for influencing outbound path selection:
    • Weight and Local Pref
      • Set inbound
      • Affects outbound traffic
  • Attributes for influencing inbound path selection:
    • AS-Path and MED
      • Set outbound
      • Affects inbound traffic
  • Multipath Load Balancing
    • MP load balancing for external links with unequal bandwidth
      • Enabled for IPv4, IPv6, VPNv4, VRF AF
      • For iBGP, eBGP, eiBGP
    • Still only one best path advertised to peers.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s