TTR Networks

What is ORIGIN?

Origin attribute

ORIGIN is a mandatory BGP path attribute recording how a route entered BGP: IGP (i), EGP (e) or incomplete (?).

It is a well-known mandatory attribute, so every BGP route carries it, and it is set by the router that originates the route and normally passed on unchanged. It has three values:

  • IGP (i, value 0): the route was injected deliberately, typically with a network statement.
  • EGP (e, value 1): learnt from the obsolete Exterior Gateway Protocol of the 1980s. You will practically never see it on a real route today.
  • INCOMPLETE (?, value 2): the origin is unknown to BGP, usually because the route was redistributed from static, connected or an IGP.

In best-path selection, lower is better (i beats e beats ?). The comparison comes after LOCAL_PREF and AS_PATH length, so it only breaks ties between paths that are otherwise equal on those.

The name causes the most confusion. i does not mean the route was learnt from an IGP, nor does it mean "internal"; it means it was configured into BGP on purpose. A route redistributed from OSPF shows ?, not i. Seeing ? on your own prefixes is a hint that someone used redistribution where a network statement would have been tidier, and it can make your routes lose ties against an otherwise identical path. Because the attribute can be rewritten with a route-map (set origin), some operators use it as a subtle traffic-engineering knob, although LOCAL_PREF, MED and prepending are the usual tools. Origin codes appear in most BGP table views next to each route's AS_PATH. The BGP Fundamentals lesson places ORIGIN among the other attributes and in the best-path algorithm.

Lessons that use ORIGIN

  • BGP FundamentalsTeaches this term · Intermediate · 75 min

    How the Border Gateway Protocol glues the internet together: autonomous systems, sessions, path attributes, best-path selection, iBGP scaling and a hands-on eBGP lab with real FRR configuration.

Related terms