Re: RIP is preferred over eBGP!

From: Gregory Gombas (ggombas@gmail.com)
Date: Fri Sep 28 2007 - 07:33:51 ART


Great work Ben! Thanks for confirming this phenomena.

On 9/27/07, Ben <bmunyao@gmail.com> wrote:
>
> Gregory,
>
> Here is what I got after labbing your scenario up.
>
> (Lo0)R1(f0/0)---------------------------(f0/0)R2
> 1.1.1.1 10.1.0.1 10.1.0.2
>
> Initially I did not redistribute RIP to BGP on R2:
>
> Rack1R1(config-router)#do sh ip int bri | e unass
> Interface IP-Address OK? Method Status
> Protocol
> FastEthernet0/0 10.1.0.1 YES manual up
> up
> Loopback0 1.1.1.1 YES manual up
> up
> Rack1R1(config-router)#
>
> Rack1R1(config-router)#do sh run | s rip
> router rip
> version 2
> network 1.0.0.0
> network 10.0.0.0
> no auto-summary
> Rack1R1(config-router)#
>
> Rack1R1(config-router)#do sh run | s bgp
> router bgp 1
> no synchronization
> bgp log-neighbor-changes
> network 1.1.1.1 mask 255.255.255.255
> neighbor 10.1.0.2 remote-as 2
> no auto-summary
> Rack1R1(config-router)#
>
>
> Rack1R2(config-router)#do sh run | s rip
> router rip
> version 2
> network 10.0.0.0
> no auto-summary
> redistribute rip
> Rack1R2(config-router)#
>
> Rack1R2(config-router)#do sh run | s bgp
> router bgp 2
> no synchronization
> bgp log-neighbor-changes
> neighbor 10.1.0.1 remote-as 1
> no auto-summary
> Rack1R2(config-router)#
>
> Rack1R2(config-router)#do sh ip route
> Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
> D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
> N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
> E1 - OSPF external type 1, E2 - OSPF external type 2
> i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
> ia - IS-IS inter area, * - candidate default, U - per-user static
> route
> o - ODR, P - periodic downloaded static route
>
> Gateway of last resort is not set
>
> 1.0.0.0/32 is subnetted, 1 subnets
> B 1.1.1.1 [20/0] via 10.1.0.1, 00:00:01
> 10.0.0.0/24 is subnetted, 1 subnets
> C 10.1.0.0 is directly connected, FastEthernet0/0
>
>
> After that I redistributed RIP on R2 to BGP. There was no change in routing
> table, since R2 did not have the RIP route, as shown above.
>
>
> Rack1R2(config-router)#router bgp 2
> Rack1R2(config-router)#red rip
>
> Rack1R2(config-router)#do sh ip route
> Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
> D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
> N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
> E1 - OSPF external type 1, E2 - OSPF external type 2
> i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
> ia - IS-IS inter area, * - candidate default, U - per-user static
> route
> o - ODR, P - periodic downloaded static route
>
> Gateway of last resort is not set
>
> 1.0.0.0/32 is subnetted, 1 subnets
> B 1.1.1.1 [20/0] via 10.1.0.1, 00:01:03
> 10.0.0.0/24 is subnetted, 1 subnets
> C 10.1.0.0 is directly connected, FastEthernet0/0
>
>
> I then shut down the BGP peering between R1-R2 and waited until the RIP
> route had appeared on R2, before unshutting BGP.
>
>
> Rack1R2(config-router)#nei 10.1.0.1 shutdown
> Rack1R2(config-router)#
> *Mar 1 01:24:34.275: %BGP-5-ADJCHANGE: neighbor 10.1.0.1 Down Admin.
> shutdown
>
> Rack1R2(config-router)#do sh ip route
> Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
> D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
> N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
> E1 - OSPF external type 1, E2 - OSPF external type 2
> i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
> ia - IS-IS inter area, * - candidate default, U - per-user static
> route
> o - ODR, P - periodic downloaded static route
>
> Gateway of last resort is not set
>
> 1.0.0.0/32 is subnetted, 1 subnets
> R 1.1.1.1 [120/1] via 10.1.0.1, 00:00:01, FastEthernet0/0
> 10.0.0.0/24 is subnetted, 1 subnets
> C 10.1.0.0 is directly connected, FastEthernet0/0
>
> Rack1R2(config-router)#no nei 10.1.0.1 shutdown
> Rack1R2(config-router)#
> *Mar 1 01:24:58.851 : %BGP-5-ADJCHANGE: neighbor 10.1.0.1 Up
>
> Rack1R2(config-router)#do sh ip bgp
> BGP table version is 5, local router ID is 10.1.0.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
> * 1.1.1.1/32 10.1.0.1 0 0 1 i
> *> 10.1.0.1 1 32768 ?
> *> 10.1.0.0/24 0.0.0.0 0 32768 ?
> Rack1R2(config-router)#
>
>
> This time R2 found a RIP entry in RIB and redistributed it to BGP. This
> locally originated route was selected by the BGP decision process, and did
> not make it to the RIB, due to a higher AD than RIP.
>
> You will note that order of operation for this scenario will determine which
> route (RIP vs eBGP) makes it to the RIB.
>
> HTH
>
> Ben
>
>
>
>
>
>
> On 9/27/07, Gregory Gombas <ggombas@gmail.com> wrote:
> > Ben - I think Step 1 is correct but not step 2. As Cecil said ebgp has AD
> of 20.
> >
> > Now since it prefers the locally originated route it ignores the BGP
> route.
> >
> > Step 2 would be to look where that locally originated route came from,
> > in this case RIP, and then use the rip route.
> >
> > So only the RIP route makes it to the routing table. I guess BGP is
> > smart enough to say that I'm not sending the locally originated BGP
> > route to the route table because it should already be in the route
> > table by some other source (protocol,connected,static, etc...)
> >
> > Hopefully some CCIE's will put their 2 cents here...
> >
> > On 9/27/07, Cecil Wilson <Cecil.Wilson@flextronics.com > wrote:
> > > Seems a little confusing
> > > 1. locally origin routes will be select oover ebgp however in terms
> > > of AD
> > > EBGP 20
> > > IBGP 200
> > > RIP 120
> > >
> > > So in terms of AD external BGP routes should be selected over IBGP?
> > >
> > > Im I looking at it wrong?
> > >
> > >
> > > Cecil G. Wilson
> > > IT Network Services
> > > Office: (901) 215-2710
> > > Cell: (901) 601-6201
> > > cecil.wilson@flextronics.com
> > >
> > >
> > > -----Original Message-----
> > > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com ] On Behalf Of
> > > Ben
> > > Sent: Thursday, September 27, 2007 10:23 AM
> > > To: Gregory Gombas
> > > Cc: Cisco certification
> > > Subject: Re: RIP is preferred over eBGP!
> > >
> > > Gregory,
> > >
> > > Step 1: Router B is faced with two BGP sources, ebgp and locally
> > > originated (redistributed from RIP).
> > >
> > > BGP decision process will pick the locally originated over the ebgp
> > > route (Wendel Odom)
> > >
> > > W - weight
> > > L - local preference
> > > L - locally originated
> > > A - AS path
> > >
> > > O - Origin
> > > M - MED
> > > N - Neighbor Type
> > > I - cannot remember :)
> > >
> > >
> > > Step 2: BGP administrative distance for locally originated is 200, for
> > > RIP 120. RIP therefore wins.
> > >
> > > In case I've got the sequence figured out wrongly, comments are welcome.
> > >
> > > Ben
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 9/26/07, Gregory Gombas <ggombas@gmail.com> wrote:
> > > >
> > > > I'm seeing the following quirk in a production network:
> > > >
> > > > BGP-->
> > > > RIP-->
> > > > RTRA----------RTRB
> > > >
> > > > Router A is directly connected to router B and is sending the same
> > > > routes via RIP and eBGP.
> > > > Router B is also redistributing the RIP routes into BGP (but filtered
> > > > from sending back to A)
> > > >
> > > > When you look at the route table on RouterB, it shows the routes as
> > > > RIP routes!
> > > > You would think the eBGP learned routes would be preferred because of
> > > > lower AD.
> > > > But when I look at BGP table it shows the route originated locally and
> > >
> > > > thus preferred over eBGP learned route.
> > > > When I clear ip route the route is then shown as a eBGP route in the
> > > > routing table and BGP route table does not show the locally originated
> > >
> > > > route!
> > > >
> > > > Just wondering if anyone else has seen this...
> > > >
> > > >
> ______________________________________________________________________
> > > > _ Subscription information may be found at:
> > > > http://www.groupstudy.com/list/CCIELab.html
> > >
> > >
> _______________________________________________________________________
> > > Subscription information may be found at:
> > > http://www.groupstudy.com/list/CCIELab.html
> > >
> > > Legal Disclaimer:
> > > The information contained in this message may be privileged and
> confidential. It is intended to be read only by the individual or entity to
> whom it is addressed or by their designee. If the reader of this message is
> not the intended recipient, you are on notice that any distribution of this
> message, in any form, is strictly prohibited. If you have received this
> message in error, please immediately notify the sender and delete or destroy
> any copy of this message



This archive was generated by hypermail 2.1.4 : Sat Oct 06 2007 - 12:01:16 ART