BGP Path Attributes
BGP uses various path attributes to determine the best path to a destination. These attributes are categorized as well-known mandatory, well-known discretionary, and optional transitive/nontransitive.
Common Path Attributes:
- AS_PATH: List of AS numbers through which the route has passed. Shorter AS_PATH is preferred.
- NEXT_HOP: IP address of the next-hop router to reach the destination.
- LOCAL_PREF: Indicates the preferred exit point from the local AS. Higher LOCAL_PREF is preferred.
- MED (Multi-Exit Discriminator): Suggests to external AS how to enter the local AS. Lower MED is preferred.
- ORIGIN: Indicates how the route was learned (IGP, EGP, Incomplete).