Pcornel
Networking · Routing › BGP › BGP Path Selection

Origin

Cheat sheet · https://pcornel.dk/topic.php?topic=1142

Back to the Topic

Answer

ORIGIN shows how a route entered BGP: i (IGP, via a network statement), e (EGP, historic) or ? (incomplete, usually redistribution). In best-path selection IGP is preferred over EGP over incomplete.

Remember

IGP (i, injected with network) beats EGP (e, historic) beats incomplete (?, redistributed). The code tells how the prefix entered BGP; i does not mean iBGP. It is set by the originating router and carried unchanged unless a route-map sets it.

First checks

show ip bgp → origin code after the AS_PATH on each line. show ip bgp <prefix> → Origin IGP or Origin incomplete per path. On the originating router: is the prefix injected with network or with redistribute?

Commands

show ip bgp
show ip bgp <prefix>

Verify in this order

prefix injected into BGP (network = IGP, redistribute = incomplete) → ORIGIN carried unchanged across ASes → Weight, LOCAL_PREF, local origin and AS_PATH length equal? → lowest ORIGIN wins (IGP < EGP < incomplete) → best path

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

Origin · routing reference

CodeMeaningPreference
iIGP origin codeBest
eLegacy EGP originMiddle
?IncompleteLowest

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1142

Confirmation

Confirm action

Continue?