cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
638
Views
0
Helpful
1
Replies

Inter VRF Route Export Map Problem

Andrew Powell
Level 1
Level 1

Hi,

I am trying to export a route between one VRF and another in a BGP MPLS environment using a route map and prefix list. Both the source and target VRFs exist on the same device, a 6513 running IOS 12.2(33)SXJ7

As a test I originally had static routes in my routing table for the routes I wanted to export, and it worked perfectly, However when I implemented it live with BGP routes instead of static, the export would not work it is as if the prefix list couldn't match the same route when it was learned via BGP rather than static

Here is the relevant sections of config:

ip prefix-list TEST seq 5 permit 10.1.1.1/32

!

route-map VRFA-EXPORT permit 10

match ip address prefix-list TEST

set extcommunity rt  65001:200 additive

ip vrf VRF-A

rd 1.1.0.251:2670

export map VRFA-EXPORT

route-target export 51551:2670

route-target import 51551:2670

!

ip vrf VRF-B

rd 65001:200

route-target export 65001:200

route-target import 65001:200

!

The routing table for VRF-A looks like this:

Gateway of last resort is 10.0.0.6 to network 0.0.0.0

     10.0.0.0/32 is subnetted, 4 subnets

B       10.2.1.1 [200/0] via 30.30.30.30, 00:34:46

B       10.1.1.2 [200/0] via 20.20.20.20, 00:34:46

B       10.1.1.3 [200/0] via 20.20.20.20, 00:34:46

B       10.1.1.1 [200/0] via 20.20.20.20, 00:32:00

B*   0.0.0.0/0 [20/0] via 10.0.0.6 (VRF-B), 00:34:46

and a sho bgp vpnv4 unicast vrf VRFA 10.1.1.1/32 looks like this.

R2#sh bgp vpnv4 unicast vrf VRF-A 10.1.1.1/32
BGP routing table entry for 1.1.0.251:2670:10.1.1.1/32, version 8
Paths: (1 available, best #1, table VRF-A)
Not advertised to any peer
Local, imported path from 20.20.20.20:2670:10.1.1.1/32
20.20.20.20 from 20.20.20.20 (20.20.20.20)
Origin incomplete, metric 0, localpref 100, valid, internal, best
Extended Community: RT:51551:2670
mpls labels in/out nolabel/17

In the above it looks like the full BGP route is actually 1.1.0.251:2670:10.1.1.1/32 which is the route prepended by the RD, could this be why the prefix list isn't matching the route? Strange as it appears correctly as 10.1.1.1 in the routing table

Any help would be appreciated.

1 Reply 1

info
Level 1
Level 1

Remove and attach the route map 

CCNA Training in Bangalore

Review Cisco Networking for a $25 gift card