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.
Mnemonic | First Letter | BGP Path Attribute |
We | W | Weight |
Love | L | Local_pref |
Oranges | O | Originate |
As | A | AS_path |
Oranges | O | Origin type |
Mean | M | MED (Multiple Exit Discriminator) |
Pure | P | Paths |
Refreshment | R | Router-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
LOCAL PREFERENCE (Local_pref)
This parameter often gets used for route manipulation.
- Default value of 100
- Preference: highest local_pref
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.
ORIGIN TYPE
- Preference: lowest origin type
- IGP
- EGP
- ? Incomplete
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
PATHS (eBGP vs iBGP)
- Preference: eBGP over iBGP
eBGP | iBGP |
Administrative distance: 20 | Administrative distance: 200 |
ROUTER-ID
- Preference: route from the lowest router ID
Summary of the Attributes
Mnemonic | First Letter | BGP Path Attribute | Preference |
We | W | Weight | Higher |
Love | L | Local_pref | Higher |
Oranges | O | Originate | Local vs Aggregate |
As | A | AS_path | Lower |
Oranges | O | Origin type | IGP vs EGP vs ? |
Mean | M | MED | Lower |
Pure | P | Paths | eBGP vs oBGP |
Refreshment | R | Router-ID | Lower |
BGP Route Manipulation
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 ?