Use it to read the i, e or ? at the end of each show ip bgp line, or to explain the choice between two paths that are equal on Weight, LOCAL_PREF, local origination and AS_PATH length.
Origin
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.
1. Values: i (IGP, network statement) < e (EGP) < ? (incomplete, redistribution).
2. Lower origin wins after AS_PATH length.
3. show ip bgp — last character of the Path column.
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
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip bgpVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 First 30 seconds Verify boundary
Immediate answer: Inspect ORIGIN only after confirming earlier best-path factors tie, and distinguish IGP/incomplete origin code from route reachability.
Verification chain: candidate paths → earlier attributes → ORIGIN code → MED/later factors → best path → RIB
Stop condition: A preferred ORIGIN code is only one best-path attribute, but it does not show the prefix came from a healthy IGP path or will forward.
Step 2 Operational verification and known-good state Verify boundary
show ip bgp
show ip bgp 203.0.113.0 255.255.255.0
show running-config | section router bgp
In the table, the last character of each line is the origin code. The detailed view spells it out per path. On the originating router, the configuration shows whether the prefix comes from a network statement or from redistribution.
Known-good: each path's origin matches how the prefix is injected, and where two paths tie on AS_PATH length the one with the lower origin is best.
Step 3 Verification and output interpretation Verify boundary
Inspect the ORIGIN code for competing paths and confirm whether it is actually the decisive difference in the best-path reason. If a route unexpectedly changes from i to ?, trace the origination mechanism or redistribution boundary. Then continue to RIB/CEF to verify the selected BGP path produces the intended forwarding state.
Step 4 Verification & troubleshooting Narrow the fault
1. show ip bgp <prefix> → Origin IGP or Origin incomplete on each path.
2. Are Weight, LOCAL_PREF, local origination and AS_PATH length all equal? Only then does ORIGIN decide.
3. On the originating router: is the prefix injected with network or with redistribute?
4. To advertise i, use a network statement, or set origin igp in the route-map on the redistribute command.
Step 5 Failure signatures and troubleshooting branches Narrow the fault
- At equal AS_PATH length the
?path loses to theipath. Expected. - Your own prefixes show
?at your neighbours. They are redistributed; usenetworkstatements or set the origin. - Someone reads the trailing
ias iBGP. It is the origin code; the iBGP marker is at the start of the line. - Two sites announce the same prefix with different origins. An unintended tie-breaker; make them consistent.
- ORIGIN is expected to beat a shorter AS_PATH. It is compared later and cannot.
Step 6 When the problem is really fixed Narrow the fault
- Each path shows the origin that matches the originating configuration.
- You can name the step that decides between the paths.
- Prefixes you originate carry the origin you intend at your neighbours.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
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.
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?
ReferenceWhat it is2 sections · depth on demand
BGP scope — internal and external paths
ORIGIN accompanies internal and external BGP routes and is distinct from AS_PATH and ORIGINATOR_ID. Its IGP, EGP and incomplete codes describe origin classification; they do not identify the underlay routing protocol. IOS network origination commonly produces IGP origin, whereas redistribution commonly produces incomplete. In ordered best-path selection, IGP is preferred to EGP and EGP to incomplete when earlier comparisons tie. Reflection normally retains this route attribute.
What it is
ORIGIN records how a prefix was first put into BGP: with a network statement (IGP, shown as i), learned from the long-obsolete EGP protocol (e), or by redistribution (incomplete, shown as ?). The originating router sets it once and it normally stays unchanged all the way.
ReferenceWhy it matters1 section · depth on demand
Why it matters
ORIGIN rarely decides anything, but it is printed on every line of show ip bgp, and misreading it is common — the trailing i does not mean iBGP. It does decide between two paths that are equal on everything before it, including AS_PATH length. And it tells you something about the originating network: a ? shows the prefix was redistributed, which is sometimes the fingerprint of a misconfiguration.
ReferenceImportant terms & boundaries6 sections · depth on demand
Key points
- Three values, lowest wins: IGP (
i) before EGP (e) before incomplete (?). networkgivesi;redistributegives?;eis practically never seen today.- Compared after AS_PATH length and before MED.
- Present in every update and normally unchanged across autonomous systems.
- Can be rewritten with
set origin igpin a route-map; some networks normalise it on receipt. - In
show ip bgpthe code at the end of the line is the origin; aniin the status column at the start means the route was learned over iBGP.
In depth
Origin records how a route entered BGP
Origin is step 5 in Cisco's best path order. The Cisco document gives the preference as IGP over EGP over INCOMPLETE.
| Code | Origin | How it arises on Cisco |
|---|---|---|
i | IGP | network command, or aggregate-address |
e | EGP | The historic EGP protocol; practically unused |
? | INCOMPLETE | Redistribution into BGP (redistribute static, redistribute ospf, …) |
R1# show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 198.51.100.0/24 0.0.0.0 0 32768 i
*> 198.51.100.128/25 0.0.0.0 0 32768 ?
R1(config)# route-map SET-ORIGIN permit 10
R1(config-route-map)# set origin igp
R1(config)# router bgp 64500
R1(config-router)# redistribute static route-map SET-ORIGIN
The route originated with network shows i. The redistributed one shows ?, until the route map sets the origin to IGP.
Practical meaning
| Situation | Consequence |
|---|---|
The same prefix advertised by two of your routers, one with network and one via redistribution | Remote routers prefer the i path, all else being equal |
| A provider compares paths to you | Origin rarely decides, since AS_PATH and LOCAL_PREF come earlier |
| Using origin as a deliberate tool | Possible with set origin, but less predictable than MED or prepending |
Recommendation
Advertise your own prefixes with network statements matched to an exact route in the RIB, not with broad redistribution. That gives origin IGP, predictable advertisements, and less risk of leaking internal routes.
Troubleshooting
If a path loses unexpectedly and weight, LOCAL_PREF and AS_PATH are equal, compare the origin codes. A ? on one path and i on the other decides at step 5.
Documented example, not captured output.
Quick reference
ORIGIN records how a prefix entered BGP: i (IGP) from a network statement or aggregation, e (EGP) historically, and ? (incomplete) usually from redistribution. Lower origin is preferred: IGP before EGP before incomplete.
show bgp ipv4 unicast | include 203.0.113
! *> 203.0.113.0/24 198.51.100.1 0 0 64500 i
route-map SET-ORIGIN permit 10
set origin igp
Documented example, not captured output.
ORIGIN is compared after AS_PATH length, so it rarely decides path selection on its own.
Mechanics and state ownership
The value is chosen by the router that first puts the prefix into BGP. A network statement means the router found exactly that prefix in its routing table and was told to announce it, so the origin is IGP. With redistribution BGP only knows the route came from somewhere else, which is what "incomplete" expresses.
After that the attribute is carried in every update, unchanged from AS to AS, unless a route-map rewrites it. In best-path selection it is a simple three-way comparison placed after AS_PATH length.
Because it is compared before MED, a neighbour can use it as a quiet traffic-engineering knob — advertising ? on one link and i on another to bias your choice. That is the reason some networks reset ORIGIN to a fixed value on everything they receive.
State model and selection mechanics
The ORIGIN attribute uses three values: IGP (i), EGP (e) and incomplete (?). In modern networks, IGP generally indicates origination through a BGP network statement or equivalent local origination mechanism, EGP is a legacy value, and incomplete commonly appears when routes are redistributed into BGP. ORIGIN participates in best-path selection after stronger attributes such as Weight, LOCAL_PREF and AS_PATH length.
Limits and common misconceptions
BGP ORIGIN is not the same thing as “this prefix comes from an IGP” in the current network. The i code is historical BGP terminology and does not show OSPF/EIGRP owns the route. Likewise, incomplete is not an error state; it usually means the route entered BGP through redistribution or another mechanism that does not set a more specific origin code.
ReferenceConfiguration & state1 section · depth on demand
Policy and configuration model
Do not manipulate ORIGIN casually just to win path selection. If redistribution creates incomplete routes, that value documents how the NLRI entered BGP and can be useful context. Prefer explicit higher-level policy such as LOCAL_PREF or communities when the design intent is business path control rather than attempting to disguise route provenance.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Lab addressing; local AS 65000; the static routes are meant to be advertised.
route-map STATIC-TO-BGP permit 10
set origin igp
!
router bgp 65000
address-family ipv4 unicast
redistribute static route-map STATIC-TO-BGPExpected output
show ip bgp 203.0.113.0 255.255.255.0Expected state: Two paths equal on Weight, LOCAL_PREF and AS_PATH length; the path with Origin IGP is best.
BGP routing table entry for 203.0.113.0/24
Paths: (2 available, best #1, table default)
65010
192.0.2.2 from 192.0.2.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, external, best
65020
192.0.2.6 from 192.0.2.6 (3.3.3.3)
Origin incomplete, metric 0, localpref 100, valid, external
! Illustrative output, not captured Evidence.Both AS_PATHs contain one AS and LOCAL_PREF is equal, so ORIGIN is the first difference: IGP beats incomplete. In the summary table the same paths end in `i` and `?`.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Routing → BGP → eBGP → Origin. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%Quick lookup tables
Origin · routing reference
Compact path-selection and evidence boundaries for fast lookup.
| Code | Meaning | Preference |
|---|---|---|
| i | IGP origin code | Best |
| e | Legacy EGP origin | Middle |
| ? | Incomplete | Lowest |
Origin operational reference
Topic-specific bounded interpretation: known-good BGP state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for Origin | Suspicious signature | Next proof |
|---|---|---|---|
| Session/input | Correct peer, AF and prefix context | Transport, FSM or prefix eligibility disagrees | Peer detail and exact prefix |
| Attribute/policy | the BGP ORIGIN attribute and its IGP, EGP and incomplete codes, including how route origination method influences the attribute without describing the underlying IGP protocol itself matches intended policy | an unexpected question-mark/incomplete origin after redistribution, operators interpreting IGP origin as proof that OSPF or EIGRP owns the route, a preferred Origin losing because an earlier attribute decided first, a network statement failing to originate because the exact supporting RIB route is missing, or policy changes altering origin semantics unintentionally | Compare candidate paths and policy |
| Route/forwarding | Expected best path reaches RIB/FIB | BGP state exists but installed path disagrees | RIB/FIB/CEF and next-hop proof |
| Closure | Original test passes for explained reason | Symptom moved, was bypassed or state was forced | Regression/failover test |