Latest

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 120.10.10.1 remote−as 100
R1(config-router)# neighbor 21.10.10.2 remote−as 200
R1(config-router)# network 50.10.0.0 
R1(config-router)# redistribute static 
R1(config-router)# exit
R1(config)# ip route 120.10.0.0 255.255.0.0 null0 
R1(config)# exit
R1#
Configuration on Router R3 as below 

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

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

Router R1 reaches 70.10.0.0 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 120.10.10.0 via i. This "i" means that the entry is in the same AS and the origin is IGP. 

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