BGP Origin Attribute Explained
Origin is one of the Mandatory attributes of BGP Path Attributes, The origin code tells how BGP learned about the specific route,
The origin attribute informs all autonomous systems how the prefix introduced into BGP
• Three values: IGP, EGP, incomplete:
– i, IGP generated by BGP network statement
– e, EGP generated by EGP
– ?, Incomplete redistributed from another routing protocol
BGP prefers the lowest Origin:
Prefer first ‘i’ IGP (network command) then EGP then ‘?’ incomplete (redistributed routes)
Example of Origin attribute on Cisco router CLI:
In this example, routes were learned via network command ‘i’.
R1#show ip bgp BGP table version is 3, local router ID is 220.127.116.11 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 18.104.22.168/32 0.0.0.0 0 32768 i * 22.214.171.124/32 172.16.30.2 0 65001 65001 65003 65005 i *> 172.16.20.2 0 65002 65004 65005 i
Origin informs on how BGP has learned the route, not on how the receiver router learned the BGP route ( Example: route received via EBGP showing as “i” because the route was originated first by a network statement then propagated through EBGP.)
In simple words, ORIGIN tels on how the route was first learned, not how the current router learned it.