Origin
Cheat sheet · https://pcornel.dk/topic.php?topic=1142
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 bgpshow 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
| Code | Meaning | Preference |
|---|---|---|
| i | IGP origin code | Best |
| e | Legacy EGP origin | Middle |
| ? | Incomplete | Lowest |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1142