Introduction to BGP Origin Attribute and its Types

Google ADs

BGP Origin Attribute is the crucial factor when BGP is employing algorithm to determine the best path to a destination network. This attribute is important in resolving conflicts between various alternative paths available in the network. This attribute comes under mandatory attribute hence receives significant attention in our updates. In our previous blogs, we have discussed BGP local reference attribute, in this article, we will discuss the BGP originate attribute.

What is BGP Origin Attribute?

BGP Origin Attribute is a well-known mandatory attribute used in BGP routing to indicate how a particular route was originated into BGP. The purpose of the origin attribute in BGP is to keep track of the source of a prefix. This attribute can have one of three values: IGP, EGP, or Incomplete.

Origin Attribute Types

  • i (IGP) – Originated from an interior gateway protocol (such as EIGRP, RIP etc.).This indicates the route was injected into BGP via the network command under the BGP process.
  • e (EGP) – Originated from an external gateway protocol.
  • ? (incomplete) – Unknown origin. This usually indicates the route was redistributed into BGP (from either connected, static, or IGP routes). An origin code of “?” is the least preferred.

From amongst the above 3 origin codes, “i” is the most preferred while “?” is the least preferred.

Google ADs

Origin CodeTypeDescription
0IGP (i)The route was learned from an Interior Gateway Protocol (e.g., OSPF, EIGRP) and then injected into BGP using a network statement. Considered Most preferred
1EGP (e)The route was learned via the Exterior Gateway Protocol (EGP)—the predecessor of BGP. Rarely seen now
2Incomplete (?)The route was redistributed into BGP from another routing protocol (like static routes or connected routes). Considered Least Preferred
BGP ATTRIBUTE TYPES

Related- iBGP vs eBGP

Scenario Example

Below is the scenario where 3 Routers R1, R2 and R3 are connected in serial. With each in different Autonomous system no i.e. 1, 2 and 3 respectively.

origin attribute in bgp configuration scenario

In the BGP routing table of R2, the BGP origin code is listed at the end of each line in the table:

bgp-origin-attribute

The “i” at the end of the first routing entry indicates the 1.1.1.0/24 network was originated via an IGP, via the BGP network command. The 3.3.3.0/24 network was redistributed into BGP in AS 3, since it shows “?” at the end of that routing entry.

Continue Reading

BGP Community Attribute

BGP Confederation

Are you Preparing for your Next Job Interview?

If you want to learn more about Linux, then check our e-book on BGP Interview Questions in easy to understand PDF Format explained with relevant Diagrams (where required) for better ease of understanding.

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart