LOCAL_PREF
Cheat sheet · https://pcornel.dk/topic.php?topic=1139
Answer
LOCAL_PREF tells routers inside your AS which exit to prefer for a destination; the highest value wins (default 100). It is shared with iBGP peers but never sent to eBGP peers, making it the main tool for outbound traffic engineering.
Remember
Higher wins, default 100, compared right after Weight and before AS_PATH. It travels only over iBGP and never reaches a neighbouring AS, so it steers outbound traffic only. Set it inbound on the eBGP session where the route enters the AS.
First checks
show ip bgp <prefix> → localpref on each path. show route-map → the clause that sets it and its match counters. After a policy change: clear ip bgp <ip> soft in, then read the prefix again.
Commands
show route-map- Shows route-map sequences, match/set clauses and counters.
show ip bgp <prefix>clear ip bgp <neighbour> soft inclear ip bgp <neighbor> soft inshow ip bgp
Verify in this order
route enters the AS over eBGP → inbound route-map sets LOCAL_PREF → value carried to all iBGP peers → highest LOCAL_PREF wins (after Weight) → RIB → outbound traffic leaves via that exit
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
LOCAL_PREF · routing reference
| Property | LOCAL_PREF |
|---|---|
| Scope | Inside local AS |
| Preference | Higher wins |
| Common default | 100 |
| Typical use | Outbound exit policy |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1139