Showing results for 
Search instead for 
Did you mean: 

RIPv2/BGP redistribution & Default Routes


The problem that I'm having here is that I have multiple sites. Here's the details.

- The sites are distributed across multiple PE routers.

- Site A & B have its own local internet feed.

- Both Site A & B originate a default route, so that failover may occur if one of the internet feeds goes down.

- Site A has the larger internet feed so it takes precedence. This is done by using an offset list in RIP to increase the hopcount of its default route so it becomes a floating route. Working fine.

- In the MPLS design...customers run RIP and distribute them into iBGP which is used between the PE routers, then customer routes are redistributed back into RIP. Working fine.

The scenario is fine when both internet feeds are up and running. The increased metric for Site B's default route keeps it out of the routing table of the other sites. The problem happens when Site A (main feed) goes down...Site B's default route takes over fine.

When Site A's internet comes back up the default route is advertised via RIP with a lower metric, all sites local to the PE router see Site A's route as a better route and install it. The problem happens with sites off the other PE. Since the route is being redistributed from PE1 to PE2 via iBGP it has a administrative distance of [200/2]...therefore the default route advertised from Site B will still be kept in the routing table, even though it has a worse metric...because its RIP (lower AD).

Therefore I'm left with all site's local to that PE with the default route being originted from Site B...not what I want.

I need the default-route from Site A to be installed into the routing table. I've been able to verify that it is present in the bgp routing table, just not seen as the 'best route'.

So I'm looking to see how I can either make the PE 2 router increase the administrative distance on route's (or the default-route) learned from Site B...highier than 200. Or so I can make Site A's default route a lower metric...

Its the good old redistribution / sub optimal routing problem.

The routing table looks like this after the failover...then failback. Giving me that problem of Site A's default-route not being installed into the vrf of the PE 2 router...and subsequent CE/CPE routers.

PE 1


R [120/2] via, 00:00:22, GigabitEthernet0.1111

PE 2


R [120/5] via, 00:00:22, GigabitEthernet0.2222

*The higher PE2 default metric from is due to that offset-list I mentioned before.



So I think I figured it out :)

I've decided to do the following.

Within the router rip 'address-family ipv4 vrf XXX' I configured the following.

router rip

address-family ipv4 vrf XXXX

'more config'

distance 220 DEFAULT-ROUTE

ip access-list standard DEFAULT-ROUTE


I've tried this before but it didn't work...

I played around with it tonight and decided that maybe because the route wasn't being re-learned (when I was playing around with it earlier) the new metric of 220 wasn't be applied. It made sense right? So I shutdown the interface that the route was being learned on...brought it back up...and VOLIA! The route now had a metric of...

R [220/2] via, 00:00:04, GigabitEthernet0.2222

Well...I actually tried it with a loopback...but the theory is sound :)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: