15 Origin
Origin is a well-known mandatory attribute that indicates how a prefix was first introduced into BGP. It is one of the later tiebreakers in the best-path algorithm.
What Origin indicates
Origin records where a prefix originated. There are three possible values, shown as single-letter codes in the BGP table:
- IGP (
i): the prefix was injected into BGP by an internal source, typically thenetworkcommand. This is the cleanest origin. - EGP (
e): the prefix was learned via the legacy EGP protocol. EGP is obsolete and no longer used, so this code is rare in practice; it remains for historical reasons. - Incomplete (
?): the origin is unknown. This typically means the prefix entered BGP through redistribution (for example from an IGP or from connected routes).
Preference order in best-path
When Origin is reached in best-path selection, the preference is:
IGP (i) is preferred over EGP (e), which is preferred over Incomplete (?).
A useful way to read it: “lower is better,” where i beats e and e beats ?.
Reading Origin in the table
The Origin code is the final letter at the end of the path field in show ip bgp. Combined with the next-hop, it helps reveal how a route entered BGP:
- A
?often indicates the route was redistributed (for exampleredistribute connectedor from an IGP). - An
itypically indicates the route was originated cleanly with thenetworkcommand.
This is why the presence of a route in the table does not by itself reveal how it was originated; the Origin code and next-hop must be read together.
EGP the protocol vs eBGP
The
eOrigin code refers to the historical EGP protocol, which is obsolete. Do not confuse it with eBGP (external BGP), which is a peer relationship, not an Origin value.
Self-check
Q1 — What does the Origin attribute indicate?
A) The next-hop of the route
B) How a prefix was first introduced into BGP
C) The AS-PATH length
D) The Local Preference value
Respuesta
B is correct. Origin records how a prefix originated: via an IGP source, the legacy EGP, or incompletely (unknown, usually redistribution).
- A) False — the next-hop is a separate attribute.
- C) False — AS-PATH length is unrelated to Origin.
- D) False — Local Preference is a different attribute.
Q2 — What is the Origin preference order in best-path?
A) Incomplete > EGP > IGP
B) IGP > EGP > Incomplete
C) EGP > IGP > Incomplete
D) They are all equal
Respuesta
B is correct. IGP (
i) is preferred over EGP (e), which is preferred over Incomplete (?); “lower is better.”
- A) False — that reverses the correct order.
- C) False — IGP, not EGP, is the most preferred.
- D) False — they are ranked, not equal.
Q3 — What does an Origin code of
?(Incomplete) usually indicate?A) The route was originated with the
networkcommand
B) The route was redistributed into BGP (for example from an IGP or connected)
C) The route was learned over eBGP
D) The route is invalid
Respuesta
B is correct.
?(Incomplete) typically means the prefix entered BGP through redistribution, so its true origin is unknown.
- A) False — the
networkcommand produces ani(IGP) origin.- C) False — eBGP is a peer type, not an Origin value.
- D) False — Incomplete is a valid origin, not an invalid route.
Q4 — The
eOrigin code refers to:A) External BGP (eBGP) peering
B) The obsolete legacy EGP protocol
C) An error condition
D) An IPv6-only route
Respuesta
B is correct. The
ecode refers to the historical EGP protocol, now obsolete. It is not the same as eBGP.
- A) False — eBGP is a peer relationship, not an Origin value.
- C) False —
eis not an error indicator.- D) False — Origin has nothing to do with address family.