Every BGP route says how it first entered BGP. That small note, ORIGIN, usually sits unnoticed in the output until it breaks a tie.
Advanced · 9 min read
You'll learn to name the three ORIGIN codes, say which command sets each, and explain when ORIGIN decides a best path.
What ORIGIN records
ORIGIN is a well-known mandatory attribute. It records how the route first entered BGP. The router that originates the route sets it, and every other router passes it on unchanged.
One UPDATE: path attributes plus the prefixes they describe
On small screens, swipe sideways or focus the diagram and use the arrow keys.
A teaching view, not a byte-accurate capture. The attributes travel once and apply to every prefix listed beside them.
The three ORIGIN codes
On small screens, swipe sideways or focus the diagram and use the arrow keys.
IGP is preferred over EGP, and EGP over incomplete.
Which command sets which code
The network command gives IGP, because you are telling BGP to advertise a prefix that exists in the routing table. Redistribution gives incomplete, because BGP only knows the route came from another source. aggregate-address gives IGP.
The network line creates an IGP-origin route. The redistribute line creates incomplete-origin routes for whatever the route map permits.
Where ORIGIN decides
ORIGIN is step 5 of best-path selection on Cisco IOS XE, after AS path length and before MED. It only matters when weight, local preference, locally originated status and AS path length all tie, so it breaks ties between a route that was originated with network and the same prefix learned as redistributed.
How a Cisco router chooses one best path
On small screens, swipe sideways or focus the diagram and use the arrow keys.
The comparison stops at the first step where the paths differ. Later steps are never reached for that prefix.
In practice the most common cause of an unexpected incomplete origin is redistribution that leaks into the path. Replace it with the network command, or set the origin explicitly.
Redistributes a static route and marks it IGP, so it competes on equal terms with network-originated routes.
Reading ORIGIN
Illustrative Cisco IOS XE output written for this lesson, not a router capture
R1#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 198.51.100.0/24 0.0.0.0 0 32768 i
*> 203.0.113.0/24 192.0.2.1 0 0 64501 i
*> 192.0.2.128/25 0.0.0.0 0 32768 ?
The code is the last character on each line. 198.51.100.0/24 came from the network command (i). 203.0.113.0/24 originated as IGP in AS 64501. 192.0.2.128/25 was redistributed here, so it shows a question mark.
Check your understanding
Predict · scenario 1
A route shows ? at the end of its line in show ip bgp. What does that mean?
Predict · scenario 2
Which origin does the network command set?
Predict · scenario 3
Two paths tie on weight, local preference and AS path length. One is IGP and one is incomplete. Which wins?
FAQ
Why is there an EGP origin?
EGP was an older exterior protocol that BGP replaced. The code remains in the specification, but you will almost never see it on modern routers.
Is the incomplete origin a problem?
Not by itself. It means the route was redistributed, so BGP cannot say how it originated. It is simply the least preferred of the three when other things tie.
Can I change ORIGIN?
Yes, with set origin in a route map, though it is rarely needed. The usual fix for an unwanted incomplete origin is to use the network command instead of redistribution.