RE: BGP IBGP vs EBGP path

From: Scott Morris (swm@emanon.com)
Date: Sun Apr 23 2006 - 18:24:28 GMT-3


Per my experience, that document is actually correct. You have other issues
though! BGP paths (at step 7) are chosen in numerical order of origin code
(0 = internal (IGP), 1 = external (EGP), 2 = Incomplete/Unknown) (Step 5
occurs first, which would indicate eBGP neighbor)

Now, bear in mind that you say the route was redistributed... In the Cisco
world, that will set the origin code as incomplete. This is irregardless of
the iBGP or eBGP relationship (as this type code doesn't change in updates).

The preference you are seeing is likely due to other information such as the
router-id of the advertising neighbor being lower. Looking through the RFC,
the spec lays this out as one of the tie-breaking mechanisms. On the other
hand, I'd probably think the decision would take place even before that
based on AS-path length! If your PE's are the same AS, then that's a damn
short AS path. :) If you learn it from the CE, then your path would be
longer, and this is done in step 4!!!

So you aren't making it to step 7 in preferring your internal path to the
other PE!
 
HTH,

 
Scott Morris, CCIE4 (R&S/ISP-Dial/Security/Service Provider) #4713, JNCIE
#153, CISSP, et al.
CCSI/JNCI
IPExpert CCIE Program Manager
IPExpert Sr. Technical Instructor
smorris@ipexpert.com
http://www.ipexpert.com
 

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
gscisco@xs4all.nl Cisco
Sent: Sunday, April 23, 2006 5:00 PM
To: ccielab@groupstudy.com
Subject: BGP IBGP vs EBGP path

Hi,

I hope you guys can help me understand this as IBGP and EBGP routes behave
different than I have always understood them.

From what I read in cisco's "BGP Best Path Selection Algorithm" -
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431
.shtml#background

7 - Prefer eBGP over iBGP paths.

However it is not the behavior I'm seeing myself

I have the following setup

CE1 === default route -> / <- static redistributed in BGP === PE 1

CE2 ====== running BGP ====================================== PE 2

PE1 and PE2 are within the same AS and run iBGP between them.

I have a network 157.161.77.0/24 which PE1 has a static route for which it
redistributes into BGP. PE2 gets this same network from CE2 via (e)BGP. It
however does not take this as the best BGP path as keeps prefering the
internally learned one via iBGP

PE3#sh ip b 157.161.77.0
BGP routing table entry for 157.161.77.0/24, version 5
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  161.239.99.2
  Local
    172.16.1.3 (metric 11) from 172.16.1.3 (213.239.99.3)
      Origin incomplete, metric 10, localpref 100, valid, internal, best
<<<<< iBGP learned path
    65000
    161.239.99.2 from 161.239.99.2 (161.239.99.2)
      Origin IGP, localpref 100, valid, external <<<<<<<<<< eBGP learned
path

Am I misinterpreting cisco's path algorithm ? Furthermore I also see that it
should have taken the the latter path as it's Origin is better as well (IGP
goes before "incomplete") ?

Can anyone shine a light on this for me as I'm quite confused.

Thanks in advance,

Vincent



This archive was generated by hypermail 2.1.4 : Mon May 01 2006 - 11:41:59 GMT-3