Sign in to follow this  
Followers 0
YapChinHoong

Cracking the BGP ORIGIN codes

9 posts in this topic

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

 

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0