default originate issue

Unanswered Question
Mar 9th, 2010

OK, picture this from a BGP routing perspective:

ISP provides internet link to one of my PE's. This internet link has to service multiple customer VRF's. I have a Internet VRF configured which imports to each customer VRF for the default route, and the customer vrf's in turn export to teh Internet VRF their specific routing table. All works fine. All PE's use route reflectors for routing.

Now complexity is added. A second Internet site is provisioned which connects to a geographically differnet PE. This PE also uses the same Route reflectors etc. Of the multiple VRF's, I need one of them to prefer the internet link out of City #1, and the others to use the internet link out of City #2. Each should provide dynamic failover for one another.

Now in a simple world, local preference could do the trick. But a typical config on the PE for a customer VRF could be as follows, remember the bgp peering is done on a different vrf, and this vrf just imports the default route and then advertises it so there is no peer as such to add a route-map with local pref setting etc:

 address-family ipv4 vrf customerABC
  no synchronization
  redistribute connected
  redistribute static
  maximum-paths ibgp unequal-cost 2 import 4
  default-information originate

Basically with the above config, how can I add in a more preferred or less preferred default route from one of two sites on a per vrf basis ?

Many thanks

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Giuseppe Larosa Wed, 03/10/2010 - 01:20

Hello Hayden,

I would say you could invoke a route-map in VRF context using the import-map route-map name

ip prefix-list only-default seq 5 permit

access-list 11 permit host PE1-ipaddress

route-map prefer_PE1_def permit 10

match ip address only-default

match ip next-hop 11

set local-pref 200

ip vrf VRF1

import-map prefer_PE1_def

A similar setup with preference to PE2 default could be setup for the other VRF.

each VRF by importing the appropriate Route targets can use the second path for redundancy

note: you should test this, I'm not sure the combination of match and set commands in the route-map are accepted when invoking the route-map with import-map in VRF context

if the VRFs are on different PE nodes you could set the local preference inbound on each PE node in address-family vpnv4.

This is something I tested and it should work.


the two internet facing PE nodes have to use different RD in order to see both default routes propagated everywhere

Hope to help


hayden-mace Wed, 03/10/2010 - 15:02

HI, thanks mate. I tried it but it does not like the next-hop in the route map. I tried with out but still no joy.

This is what I have so far

> interface GigabitEthernet0/1
>  ip vrf forwarding customerabc
>  ip address
> I have this BGP which talks to my RR
router bgp 22222
no bgp default ipv4-unicast
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor IBGP-RR peer-group
neighbor IBGP-RR remote-as 22222

neighbor IBGP-RR update-source Loopback0
neighbor IBGP-RR version 4
neighbor peer-group IBGP-RR

I have this bgp for the vrf
address-family ipv4 vrf customerabc
  redistribute connected
  redistribute static
  neighbor remote-as 44444

  neighbor activate

  default-information originate

All that works, and that vrf is fine.

However, I want to do the same on the other new router, but get that default
route for that address family going with a local-pref of 50. 

Likewise, I have a new VRF I want to use that internet connection which is where I think your idea came in
address-family ipv4 vrf INTERNET-TEST
  redistribute connected
  redistribute static
  maximum-paths ibgp unequal-cost 2 import 4
  no synchronization

Giuseppe Larosa Fri, 03/12/2010 - 05:43

Hello Hayden,

you should try to apply inbound a route-map increasing weight or local-preference on address-family vpnv4 on BGP sessions with route reflector servers.

This would allow you to prefer one default router per PE node for all defined VRFs on it.

Different choices could be made on different PE nodes.

Hope to help



This Discussion