Skip to main content

BGP Path Attributes

BGP Path Attributes

BGP (Border Gateway protocol is a path vector routing protocol, meaning it uses path attributes to determine the best routing path. There are eight (8) attributes that BGP uses in the determination of that best path.

MnemonicFirst LetterBGP Path Attribute
WeWWeight
LoveLLocal_pref
OrangesOOriginate
AsAAS_path
OrangesOOrigin type
MeanMMED (Multiple Exit Discriminator)
PurePPaths
RefreshmentRRouter-ID

This is not inclusive of all 13 path attributes but this covers the majority of them. particularly those that we often see used in practice. 

WEIGHT
  • Cisco specific parameter
  • Local to the router
  • Preference: highest weight

image.png

LOCAL PREFERENCE (Local_pref)

This parameter often gets used for route manipulation.

  • Default value of 100
  • Preference: highest local_pref

image.png

ORIGINATE
  • How a path was sourced
  • Preference: local paths from network or redistribute commands are preferred versus local aggregates via aggregate-address command
AUTONOMOUS SYSTEM PATH (AS_path)
  • The number of autonomous systems in the path
  • Preference: shortest AS_path
  • It is the number of autonomous systems in the path NOT the number of routers in the path.

image.png

ORIGIN TYPE
  • Preference: lowest origin type
  1. IGP
  2. EGP
  3. ? Incomplete

image.png

MED (Multi-exit Discriminator)
  • Optional non-transitive attribute
  • A hint to external neighbors about the preferred path into an autonomous system (AS) that has multiple entry points
  • Preference: lowest MED

image.png

PATHS (eBGP vs iBGP)
  • Preference: eBGP over iBGP
eBGPiBGP
Administrative distance: 20Administrative distance: 200
ROUTER-ID
  • Preference: route from the lowest router ID

 

Summary of the Attributes

MnemonicFirst LetterBGP Path AttributePreference
WeWWeightHigher
LoveLLocal_prefHigher
OrangesOOriginateLocal vs Aggregate
AsAAS_pathLower
OrangesOOrigin typeIGP vs EGP vs ?
MeanMMEDLower
PurePPathseBGP vs oBGP
RefreshmentRRouter-IDLower

BGP Route Manipulation

image.png

Scenario: Make the preferred path for the 20.0.0.0 network go through another router

R4(config)#ip prefix-list PREF20 permit 20.0.0.0/24
R4(config)#route-map MAP20 permit 10
R4(config-route-map)#match ip address prefix-list PREF20
R4(config-route-map)#set ?