Router using RIP routes instead of BGP

Answered Question

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 xxx.xxx.xxx.xxx 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 ?

Thanks

EDIT:

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

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

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

I have this problem too.
0 votes
Correct Answer by Edison Ortiz about 7 years 3 days ago

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

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_pi1.html#wp1011754

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

Regards

Edison.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
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.

Regards

Edison.

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 192.168.72.0 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 ?

Thanks

Here is the show ip bgp for those networks

  Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.9.0      192.168.56.250           5         32768 ?
*> 192.168.18.0     192.168.56.250           5         32768 ?
*> 192.168.20.0     192.168.56.250           5         32768 ?
*> 192.168.32.0     192.168.56.250           5         32768 ?
*> 192.168.50.0     192.168.56.250           5         32768 ?
*> 192.168.56.0     0.0.0.0                  1         32768 ?
*> 192.168.57.0     192.168.87.234                         0 64516 65530 64517 64533 ?
*> 192.168.58.0     192.168.56.250           3         32768 ?
*> 192.168.59.0     192.168.56.250           4         32768 ?
*> 192.168.69.0     192.168.56.250           5         32768 ?
*> 192.168.70.0     192.168.56.250           3         32768 ?
*> 192.168.71.0     192.168.56.250           1         32768 ?
*> 192.168.72.0     192.168.87.234                         0 64516 65530 64515 64531 ?

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

*> 192.168.57.0     192.168.87.234                         0 64516 65530 64517 64533 ?
*> 192.168.72.0     192.168.87.234                         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 http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml 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).

Regards

Edison.

Please make sure to rate helpful posts, thanks !

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 192.168.72.0 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).

Cheers

Graeme

Actions

This Discussion

Related Content