Router using RIP routes instead of BGP

Answered Question
Dec 7th, 2009

I have a 2811 router connected to a BGP cloud, it is connected on the inside to a RIP cloud. The router is recieving both RIP and BGP updates. The problem I have is that the router is preferencing the RIP routes over the BGP routes. The RIP routes have an AD of 120, whilst the BGP routes have an AD of 20. My understanding is that the BGP routes should be used in preference to the RIP routes. If I do an IP ROUTE CLEAR for a particular subnet the rip route is cleared and the BGP is used again. This will stay like this until something happens in the cloud and the BGP path dissapears, when it does the RIP is installed again and will not clear when the BGP route comes back.

Any ideas on how to get around this ?



Here are the show ip route outputs for two networks at the same location, I have done a clear ip route to get the BGP re-installed for this subnet, the second will stay with the RIP route until I clear it

show ip route
Routing entry for
  Known via "rip", distance 120, metric 5
  Redistributing via rip, bgp 64534
  Advertised by bgp 64534
  Last update from on FastEthernet0/0/0, 00:00:19 ago
  Routing Descriptor Blocks:
  *, from, 00:00:19 ago, via FastEthernet0/0/0
      Route metric is 5, traffic share count is 1

show ip route
Routing entry for
  Known via "bgp 64534", distance 20, metric 0
  Tag 64516, type external
  Redistributing via rip
  Advertised by rip metric transparent
  Last update from 14:44:33 ago
  Routing Descriptor Blocks:
  *, from, 14:44:33 ago
      Route metric is 0, traffic share count is 1
      AS Hops 4
      Route tag 64516

Correct Answer by Edison Ortiz about 7 years 2 months ago

The distance command must be implemented in the blue router, here is the command guideline

Give it a try and see if it works after a failure.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Edison Ortiz Mon, 12/07/2009 - 16:56

Very hard to troubleshoot without viewing the entire network topology.

First, we need to identify where these networks are coming from.

I noticed you are redistributing RIP into BGP, what if this router is the one doing the advertising instead of the receiving - then you will see the RIP route in the routing table, not the BGP route. For BGP troubleshooting, don't look in the RIB - you must look in the BGP table 'show ip bgp'. This will tell you what router is doing the advertising and why it is not installing this route in the RIB.


Edison. Mon, 12/07/2009 - 17:05

I have attached a WAN layout, the router I am having the current problem with is the Blue one at site 3, the routes are back to Site 4.

I don't really understand why when I do a clear ip route the RIP route is replaced immediately with the BGP route, doesn't this say they are both in the routing table, but the RIP is getting preference ?


Here is the show ip bgp for those networks

  Network          Next Hop            Metric LocPrf Weight Path
*>           5         32768 ?
*>           5         32768 ?
*>           5         32768 ?
*>           5         32768 ?
*>           5         32768 ?
*>                  1         32768 ?
*>                         0 64516 65530 64517 64533 ?
*>           3         32768 ?
*>           4         32768 ?
*>           5         32768 ?
*>           3         32768 ?
*>           1         32768 ?
*>                         0 64516 65530 64515 64531 ?

Edison Ortiz Mon, 12/07/2009 - 17:38

*>                         0 64516 65530 64517 64533 ?
*>                         0 64516 65530 64515 64531 ?

These routes are the only ones that qualify as eBGP routes (AD 20).

The rest are iBGP routes (AD 200) and RIP will be preferred based on AD.

On these routes, as I mentioned - if the Blue router has the best path in the BGP domain, it becomes the router doing the advertising towards the green router.

The reason the behavior changes when you clear the routing table is that you stop the Blue router from doing the advertising momentarily and the green keeps that route from the left side (other green router). Then the BGP Best Path algorithm dictates the oldest route in the BGP table will be considered as best step 10.

To prevent this from happening, do not redistribute these subnets into BGP on the blue router (use a route-map for controlled redistrbution).

The Green router will be the only router advertising these subnets on BGP and once the BGP receives them, it will consider the BGP route to be better than its local RIP route (provided this BGP route is eBGP and not iBGP).



Please make sure to rate helpful posts, thanks ! Mon, 12/07/2009 - 17:48

Hi Edison,

Thanks for that. Unfortunately I need to redistribute these subnets into the BGP cloud as other sites may need to access site 4 via this site if there is a failure somewhere (this network is meant to have a minimum of two paths between any two sites).

Would you see any problem if I configured the purple router to send the rip routes with an AD of 220, giving the BGP routes preference over them ? This way the network at site 4 could be accessed via site 3 then site 2 then satellite to site 4 in the event the BGP router at site 4 goes down ? (I know this is convoluted but I inherited this network recently).




This Discussion

Related Content