cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1330
Views
0
Helpful
3
Replies

default originate issue

hayden-mace
Level 1
Level 1

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
exit-address-family
!

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

3 Replies 3

Giuseppe Larosa
Hall of Fame
Hall of Fame

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 0.0.0.0/0

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.

note:

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

Hope to help

Giuseppe

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 1.1.1.1 255.255.255.252
>
>
> 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 3.3.3.3 peer-group IBGP-RR

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

  neighbor 4.4.4.4 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
exit-address-family

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

Giuseppe

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: