From: Timothy Chin (Tim@1c-solutions.com)
Date: Sat Mar 08 2008 - 18:08:29 ARST
I've set up a scenario in which this question arises from IEWB II Lab 7.
Here are the results concerning the BGP route selection:
Rack1R2#sh ip bgp regexp 54(_[0-9]+)+$
BGP table version is 76, local router ID is 150.1.2.2
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
*>i112.0.0.0 204.12.1.6 0 200 0 54 50 60 i
* 204.12.1.254 0 54 50 60 i
*>i113.0.0.0 204.12.1.6 0 200 0 54 50 60 i
* 204.12.1.254 0 54 50 60 i
The IP address 204.12.1.6 is IP of Router6 which is an IBGP peer. IP
address 204.12.1.254 is BB3's IP address. BB3 is an EBGP peer. On
Router6 the BGP Next-Hop-Self command is configured. Rack1R2 selects
Router6 as it's next hop even though it is also peering with BB3
directly via EBGP because of the Local Preference attribute. If the BGP
Next-Hop-Self command was not configured then BB3's IP would be selected
as the next hop because the NEXT_HOP attribute is BB3's IP address. This
is sent along with the LOCAL_PREF attribute of 200 from Router6. Router6
propagates this information to its IBGP peer (Rack1R2). When an IBGP
peer propagates External AS information to another IBGP peer it sends
the EBGP peer's IP address in the NEXT_HOP attribute unless the
Next-Hop-Self command is configured. Then it would show up as the EBGP
peer being the preferred route:
Rack1R2#sh ip bgp regexp 54(_[0-9]+)+$
BGP table version is 86, local router ID is 150.1.2.2
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
*>i112.0.0.0 204.12.1.254 0 200 0 54 50 60 i
* 204.12.1.254 0 54 50 60 i
*>i113.0.0.0 204.12.1.254 0 200 0 54 50 60 i
* 204.12.1.254 0 54 50 60 i
Tim
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
dave dave
Sent: Saturday, March 08, 2008 7:05 AM
To: Hash Aminu
Cc: ccielab@groupstudy.com
Subject: Re: Confusion on BGP route selection
Hi All,
I am agree that EBGP will get selected the confusion was why ?
That has been already clear to me by "Pandi"
"If you set the local preference at R1 for the routes learned from its
ebgp
peer to 50, then R1 will choose the IBGP route as the best path because
of
the highest local preference (100). "
The above line is clearly proved on router after changing LOF as said
above
that i am learning the route from EBGP (AD=20) & same route from IBGP
(AD=200), still IBGP will get prefrance on LOF basis.
Regards,
Dave
On Sat, Mar 8, 2008 at 4:14 PM, Hash Aminu <hashng@gmail.com> wrote:
> Gary you are right...BGP will prefer an EBGP over IBGP route due to
> the AD ...no complications here...
> The philosophy is that ....I will prefer to use IGP instead of IBGP to
> route within my AS (thats why IBGP AD is higher than any IGP out
> there) but will prefer EBGP over IBGP or IGP to get to networks
> outside my AS(thats why EBGP AD is lower than IGP or IBGP).
> HTH
>
> Hash
>
> On 3/8/08, Gary Duncanson <gary.duncanson@googlemail.com> wrote:
> > Reza,
> >
> > I also think the ebgp route wins here. Ebgp has a lower AD than
ibgp.
> As
> > for Local Pref I think the router would prefer the higher value as
it is
> in
> > the AS but will not get that far in the route selection process.
> >
> > Regards
> > Gary
> >
> > ----- Original Message -----
> > From: "Sharifi, Reza" <Reza.Sharifi@gdit.com>
> > To: "PANDI MOORTHY" <moorthypandi@gmail.com>;
<subodh.rawat@wipro.com>
> > Cc: <funccie@gmail.com>; <ccielab@groupstudy.com>
> > Sent: Friday, March 07, 2008 9:39 PM
> > Subject: RE: Confusion on BGP route selection
> >
> >
> > > Pandi,
> > >
> > > As you can tell by the name, local-preference is only "local" to
your
> > > AS. Other AS numbers will never see your local-preference. Also,
the
> > > reason that EBGP is preferred over IBGP is because EBGP offers
better
> > > loop detection and prevention than what is available in IBGP.
> > >
> > > HTH
> > > Reza
> > >
> > > -----Original Message-----
> > > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On
Behalf
> Of
> > > PANDI MOORTHY
> > > Sent: Friday, March 07, 2008 1:28 PM
> > > To: subodh.rawat@wipro.com
> > > Cc: funccie@gmail.com; ccielab@groupstudy.com
> > > Subject: Re: Confusion on BGP route selection
> > >
> > > Hi
> > >
> > > My understanding is BGP path selection works as in the URL
> > >
> > >
> > >
> > >
>
http://www.cisco.com/en/US/docs/ios/12_2/ip/configuration/guide/1cfbgp.h
> > > tml#wp1000898
> > >
> > >
> > >
> > > If you set the local preference at R1 for the routes learned from
its
> > > ebgp
> > > peer to 50, then R1 will choose the IBGP route as the best path
> because
> > > of
> > > the highest local preference (100)
> > >
> > >
> > >
> > >
> > >
> > > Router will choose the (eBGP) path over the iBGP path only when
the
> > > steps
> > > 2-8 are skipped
> > >
> > >
> > >
> > > *1. *If the next hop is inaccessible, do not consider it.
> > >
> > > This decision is why it is important to have an IGP route to the
next
> > > hop.
> > >
> > > *2. *If the path is internal, synchronization is enabled, and the
> route
> > > is
> > > not in the IGP, do not consider the route.
> > >
> > > *3. *Prefer the path with the largest weight (weight is a Cisco
> > > proprietary
> > > parameter).
> > >
> > > *4. *If the routes have the same weight, prefer the route with the
> > > largest
> > > local preference.
> > >
> > > *5. *If the routes have the same local preference, prefer the
route
> that
> > > was
> > > originated by the local router.
> > >
> > > For example, a route might be originated by the local router using
the
> > > *network
> > > bgp* router configuration command, or through redistribution from
an
> > > IGP.
> > >
> > > *6. *If the local preference is the same, or if no route was
> originated
> > > by
> > > the local router, prefer the route with the shortest autonomous
system
> > > path.
> > >
> > >
> > > *7. *If the autonomous system path length is the same, prefer the
> route
> > > with
> > > the lowest origin code (IGP < EGP < INCOMPLETE).
> > >
> > > *8. *If the origin codes are the same, prefer the route with the
> lowest
> > > MED
> > > metric attribute.
> > >
> > > This comparison is only made if the neighboring autonomous system
is
> the
> > > same for all routes considered, unless the *bgp
always-compare-med*
> > > router
> > > configuration command is enabled.
> > > ------------------------------
> > >
> > > *9. *Prefer the external BGP (eBGP) path over the iBGP path.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > I assume that R1 has route to both next-hops
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Regards
> > >
> > > Pandi
> > >
> > >
> > > On 3/4/08, subodh.rawat@wipro.com <subodh.rawat@wipro.com> wrote:
> > >>
> > >> Dave,
> > >>
> > >> eBGP will be prferred over iBGP.
> > >>
> > >> Thanks
> > >> subodh
> > >>
> > >> -----Original Message-----
> > >> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On
Behalf
> > > Of
> > >> dave dave
> > >> Sent: Tuesday, March 04, 2008 2:09 PM
> > >> To: Cisco certification
> > >> Subject: Confusion on BGP route selection
> > >>
> > >> Hi Expert,
> > >> As in below example i am running only BGP, the route 155.1.5.0/24
> > >> learning from AS-1 EBGP peer as well as IBGP peer, but my router
> > >> selecting EBGP learn route as best route over the IBGP.
> > >>
> > >> As per my understandig IBGP shpuld be BEST route for 155.1.5.0/24
> > >> because of highest LOF of IBGP is 100 (heigest prefer) preferable
> over
> > >> EBGP.
> > >>
> > >> #R1 (belong to AS 2)
> > >> Network Next-Hop Metric LocPrf
Weight
> > >> Path
> > >> * i155.1.5.0/24 155.1.13.3 0 100
0
> > >> 1 i
> > >> *> 155.1.146.4
> > >> 0 1 i
> > >>
> > >> Please clear my confusion on above.
> > >>
> > >> Regards
> > >> Dave
> > >>
> > >>
> > >
>
This archive was generated by hypermail 2.1.4 : Tue Apr 01 2008 - 07:53:52 ART