export map on a vrf

Unanswered Question
Jan 30th, 2007

With the following config, does it export only the route with

the RT set ? Or does all routes from the vrf get exported

(because there is no set extcommunity statement below the

route-map) ?? My intention is to export only that route from the vrf..

ip vrf bv_1.135_fe.0.0.112-Hub

rd 135:5

export map bv_1.135_fe.0.0.112

route-target export

route-target import

route-map bv_1.135_fe.0.0.112 permit 1

match ip address prefix-list bv_EVpn1-bv_1.135_fe.0.0.112-Hub

ip prefix-list bv_EVpn1-bv_1.135_fe.0.0.112-Hub seq 1 permit

Thanks !


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Harold Ritter Tue, 01/30/2007 - 20:07


if you only want the route-map to select and export the one specific prefix, you need to remove "route-target export" from under the ip vrf configuration and then add "set extcommunity rt" under the route-map.

Otherwise all prefixes will be exported with this specific RT, whether or not they match the route-map.

Hope this helps,

Harold Ritter Tue, 01/30/2007 - 20:15

Actually, even with the config I suggested, other prefixes will also be exported but without any RT, which will cause them not to be imported anywhere else.

Hope this helps,

p.danielsen Tue, 01/30/2007 - 22:23

Hi Bala,

try looking at this configuration, it uses access-lists insted of a prefix-list, but it works ..

ip vrf ES

rd 12345:10040

export map ES

route-target export 12345:10040

route-target import 12345:10040


route-map ES permit 10

match ip address 20

set extcommunity rt 12345:10053 additive


access-list 20 permit

Hope i helps you.


Harold Ritter Wed, 01/31/2007 - 04:17


Your configuration adds an extra RT for that one specific prefix that you specify under the route-map but doesn't prevent all of the other prefixes to be tagged and exported with the RT value configured under "ip vrf ES"


mheusinger Wed, 01/31/2007 - 04:20


if your intention is to only export a specific network from a VRF, why not to use filters during redistribution and not to insert other networks into MP-BGP?

Regards, Martin

balavenkata Wed, 01/31/2007 - 09:53


The intent is this: the VRF hosts a management site and our customer wants to export only specific routes from the management hub site to the spokes....enough for them to get to the mgmt site. We had cupla options - using ACLs vs prefix-list and chose the prefix list per customer request due to perf reasons (see my last post).

I;m curious to know how you'd control this via redistribution. So under my PE-CE redistribution to my mgmt site, I'd then have to throw away 'other routes' ? I'd end up using route-map there too right ? it'd just be a different place (instead of "export map" under my "ip vrf" then it'd be under say my "router bgp" ??)

Thanks !


balavenkata Wed, 01/31/2007 - 09:49

To add to that, I got the impression from our customer that prefix-lists have better performance than access-lists ("uses lesser CPU cycles" is the actual quote though I wonder why....maybe a separate topic)


This Discussion