BGP
Local preference
A BGP value an AS sets on routes it receives to choose its own way out, checked before the AS path.
Higher wins, and the default is 100. A route-map applied in on one neighbour sets it (set local-preference 200), so every route through that neighbour wins, however long its AS path. It stays inside the AS (iBGP carries it,
eBGP does not), so it decides how your traffic leaves, never how others send traffic to you. The best-path order in
short: weight, local preference, AS path length, origin, MED, eBGP over iBGP, IGP cost, router ID.
Read next
- BGP The protocol between autonomous systems: how the networks of the internet find each other.
- AS path The list of autonomous systems a BGP route crossed: used to choose paths and to prevent loops.
- MED (multi-exit discriminator) A BGP value a neighbour attaches to ask which of several links into it you should use.
- BGP community A tag that travels with a BGP route, written AS:value, which does nothing until a policy reads it.