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 the network command. 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 example redistribute connected or from an IGP).
  • An i typically indicates the route was originated cleanly with the network command.

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 e Origin 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

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

Q3 — What does an Origin code of ? (Incomplete) usually indicate?

A) The route was originated with the network command
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

Q4 — The e Origin code refers to:

A) External BGP (eBGP) peering
B) The obsolete legacy EGP protocol
C) An error condition
D) An IPv6-only route