Introduction of BGP Origin Attribute

Introduction of BGP Origin Attribute

BGP is used to exchange routing information between multiple autonomous systems (AS) on the Internet. An autonomous system is a group of networks that share a common administrative area. 

BGP is used to route traffic across multiple independent systems and is the protocol used by Internet Service Providers (ISPs) to communicate routing information with one another.

⭐Related : BGP Cheat Sheet for Network Engineers
⭐Related : 51 facts about BGP routing Protocol for Network Engineers 

BGP Origin Attribute

The origin is a mandatory attribute that defines the origin of the path information in a BGP network. You will see one of the three values when talk about the BGP origin attribute and these are below 

  • i (IGP) NLRI – Originated from an inside gateway protocol (like RIP, EIGRP, etc.).This shows that the route was added to BGP using the network command while the BGP process was running.
  • e (EGP) NLRI – learned via exterior gateway protocol (EGP). An e in the BGP table indicates EGP.
  • ? (incomplete) NLRI – 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.
Let's see one scenario to understand more on the  BGP Origin Attribute

We will talk about the Router R1, R3 and R4 and also only talk about the configuration related to these connected routers.

BGP Origin Attribute
Fig 1.1- BGP Origin Attribute

Configuration on Router R1 as below 

R1> enable
R1# Config t
R1(config)# router bgp 100 
R1(config-router)# neighbor remote−as 100
R1(config-router)# neighbor remote−as 200
R1(config-router)# network 
R1(config-router)# redistribute static 
R1(config-router)# exit
R1(config)# ip route null0 
R1(config)# exit
Configuration on Router R3 as below 

R3> enable
R3# Config t
R3(config)# router bgp 100 
R3(config-router)# neighbor remote−as 100
R3(config-router)# network 
R3(config-router)# exit
R3(config)# exit
Configuration on Router R4 as below 

R4> enable
R4# Config t
R4(config)# router bgp 100 
R4(config-router)# remote−as 100
R4(config-router)# network
R4(config-router)# exit
R4(config)# exit
Summary of what we see with the above configurations on the router.

Router R1 reaches via 200 i. The "200 i" means that the next AS path is 200 and the origin of the route is IGP. Router R1 also reaches via i. This "i" means that the entry is in the same AS and the origin is IGP. 

Router R4 reaches via 100 i. The "100 i" means that the next AS is 100 and the origin is IGP. Router R4 also reaches via 100 ?. The "100 ?" means that the next AS is 100 and that the origin is incomplete and comes from a static route.