Jump to content


Cracking the BGP ORIGIN codes


  • Please log in to reply
8 replies to this topic

#1 YapChinHoong

YapChinHoong

    Advanced Member

  • Members
  • PipPipPip
  • 281 posts
  • Gender:Male

Posted 21 May 2010 - 11:56 PM

I tried my best to get an 'e' in the BGP ORIGIN attribute, but failed. Seems like hitting an IOS bug. Unfortunately I can't get much IOS to test this out as EGP is no longer support since 12.3. :) I will head to the bug toolkit after I posted this. Wish me luck to crack this code. :lol:

RT3#sh ip route egp
E    192.168.20.0/24 [140/1] via 36.36.36.6, 00:00:41, Ethernet0/1
RT3#
RT3#sh ip bgp
BGP table version is 5, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.10.0     1.1.1.1                  0             0 65001 i
*> 192.168.20.0     36.36.36.6               1         32768 i
*                   1.1.1.1                                0 65001 65002 i
RT3#
RT3#sh ver | in IOS
IOS (tm) 3600 Software (C3620-I-M), Version 12.2(46a), RELEASE SOFTWARE (fc1)
RT3#

  • 0

#2 YapChinHoong

YapChinHoong

    Advanced Member

  • Members
  • PipPipPip
  • 281 posts
  • Gender:Male

Posted 22 May 2010 - 12:18 AM

No luck on the Cisco Bug Toolkit and another version of "more recent" IOS. :)
sign off and head towards the next path attribute - AS_PATH. ^_^

RT3#sh ver | in IOS|Compiled
IOS (tm) 7200 Software (C7200-P-M), Version 12.0(33)S6, RELEASE SOFTWARE (fc1)
Compiled Wed 16-Dec-09 12:02 by kellythw
RT3#
RT3#sh ip route egp
E    192.168.20.0/24 [140/1] via 36.36.36.6, 00:00:52, FastEthernet0/1
RT3#
RT3#sh ip bgp
BGP table version is 5, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.10.0     1.1.1.1                  0             0 65001 i
*> 192.168.20.0     36.36.36.6               1         32768 i
*                   1.1.1.1                                0 65001 65002 i
RT3#

  • 0

#3 chrcel

chrcel

    Cisco Voice and Apps Expert

  • Veterans
  • PipPipPipPipPip
  • 2121 posts
  • Gender:Male

Posted 22 May 2010 - 05:21 AM

EGP does not for external BGP but it stand for the EGP protocol itself. now when no router supports EGP the only way to set it is by setting it via route map

hth
  • 0

#4 Scales

Scales

    Routing and Switching Expert

  • Members
  • PipPipPip
  • 255 posts
  • Gender:Male

Posted 24 May 2010 - 11:02 AM

Im pretty sure you can use a route-map to set the origin code to whatever you want.
  • 0

#5 IssamFayad

IssamFayad

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 24 March 2014 - 08:08 PM

  Cracking the BGP ORIGIN Codes

 
network+setup.PNG

The network above is setup to investigate how BGP generates the BGP ORIGIN codes.
RT2 advertises the route to 192.168.20.0/24 to RT1 with an origin of IGP, as the BGP route is originated within the AS – RT5 redistributes the static route into OSPF and advertises it to RT2.
RT3 advertises the route to 192.168.20.0/24 to RT1 with an origin of EGP, as the EGP route learned from AS 65005 is redistributed into BGP.
RT4 advertises the route to 192.168.20.0/24 to RT1 with an origin of incomplete, as the static route is actually being redistributed into BGP.

RT1#sh ip bgp summary
--- output omitted ---

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4 65002       9       9        3    0    0 00:04:10        1
3.3.3.3         4 65003       9      10        3    0    0 00:04:02        1
4.4.4.4         4 65004       9      10        3    0    0 00:04:07        1 
RT1#
RT1#sh ip route 192.168.0.0 255.255.0.0 longer-prefixes

Gateway of last resort is not set

C    192.168.10.0/24 is directly connected, Ethernet0/0
B    192.168.20.0/24 [20/20] via 2.2.2.2, 00:04:00
RT1#
RT1#sh ip bgp
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.10.0     0.0.0.0                  0         32768 i
*  192.168.20.0     3.3.3.3                  1             0 65003 65005 e
*                   4.4.4.4                  0             0 65004 ?
*>                  2.2.2.2                 20             0 65002 i
RT1# 

RT3 managed to advertise the EGP received from RT6 to RT1 with the BGP ORIGIN code of e.

RT3#sh ip route 192.168.0.0 255.255.0.0 longer-prefixes

Gateway of last resort is not set

B    192.168.10.0/24 [200/0] via 1.1.1.1, 00:04:39
E    192.168.20.0/24 [140/1] via 36.36.36.6, 00:00:39, Ethernet0/1
RT3#
RT3#sh ip egp
Local autonomous system is 65003

 EGP Neighbor     FAS/LAS  State    SndSeq RcvSeq Hello  Poll j/k Flags
*36.36.36.6      65005/65003 UP     0      1      0    60   180   3 Perm, Act 
RT3#
RT3#sh ip bgp
BGP table version is 4, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.10.0     1.1.1.1                  0             0 65001 i
*> 192.168.20.0     36.36.36.6               1         32768 65005 e
*                   1.1.1.1                                0 65001 65002 i
RT3# 
RT3#sh ip bgp neighbors 1.1.1.1 advertised-routes
BGP table version is 4, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.20.0     36.36.36.6               1         32768 65005 e
RT3#

Below verifies that the network is operational through an extended ping on RT1.
 

RT1#ping 192.168.20.1 source 192.168.10.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.10.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/111/144 ms
RT1#

 

 

Imparted,,,,,

 

Issam


Edited by IssamFayad, 24 March 2014 - 08:21 PM.

  • 0

#6 eXPlosionas

eXPlosionas

    Member

  • Members
  • PipPip
  • 104 posts
  • Location:Lithuania

Posted 27 March 2014 - 02:42 AM

So it seems like Origin is routers perspective on how it's neighboor (that sent route to my router) got that route (from E, I or incomplete).


  • 0

#7 sonu_s

sonu_s

    Member

  • Members
  • PipPip
  • 68 posts

Posted 29 March 2014 - 04:58 AM

So it seems like Origin is routers perspective on how it's neighboor (that sent route to my router) got that route (from E, I or incomplete).

 

Not really the neighbor but rather the Origin Router where route made it to the BGP

 

Route made it to BGP via EGP - e

Route made it to BGP via redistribution from IGP - i

Route made it to BGP via redistribution of static route - ?

 

Here in above example, if the three routes are sent further 10 BGP hops away from RT1, they would continue to retain their origin code of e, i, ? respectively.


  • 0

#8 eXPlosionas

eXPlosionas

    Member

  • Members
  • PipPip
  • 104 posts
  • Location:Lithuania

Posted 20 April 2014 - 11:48 PM

 

Not really the neighbor but rather the Origin Router where route made it to the BGP

 

Route made it to BGP via EGP - e

Route made it to BGP via redistribution from IGP - i

Route made it to BGP via redistribution of static route - ?

 

Here in above example, if the three routes are sent further 10 BGP hops away from RT1, they would continue to retain their origin code of e, i, ? respectively.

 

What about this case: RT2 advertises the route to 192.168.20.0/24 to RT1 with an origin of IGP, as the BGP route is originated within the AS – RT5 redistributes the static route into OSPF and advertises it to RT2.

Static route is redistributed into OSPF (IGP), and BGP works on top of that, so it's i? But doesn't the route originated on router RT6?


  • 0

#9 Gökhan

Gökhan

    Member

  • Members
  • PipPip
  • 78 posts

Posted 31 August 2016 - 11:16 PM

Hi,

 

For BGP Origin Path, you can check also here...

 

http://ipcisco.com/b...ributes-origin/

 

best regards,


  • 0





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users