cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1031
Views
0
Helpful
7
Replies

Export route from one VRF to another

Omar Ismaeel
Level 1
Level 1

Hello Everyone ..

I've an issue when trying to export a route that has been learnt via BGP on VRF-A to VRF-B on single Cisco ios XR router.
I've tried below config:

prefix-set TEST1
X.X.X.X/32
end-set
!

route-policy TEST1
if destination in TEST1 then
set extcommunity rt (123:1)
endif
end-policy
!

vrf A
address-family ipv4 unicast
import route-target
123:1
!
export route-policy TEST1
!
!

vrf B
address-family ipv4 unicast
import route-target
123:1
!
export route-policy TEST1
!
!

 

when checked output of VRF-B :
ios-xr#show route vrf B
Tue Mar 14 19:50:02.339

% No matching routes found

Is there something wronge with above config? or I miss something here?
Your help much appreciated.
Thanks ..

7 Replies 7

you must export the RT then you apply filter to what RT prefix will export 

Sorry @MHM Cisco World I didn't understand you, can you explain more please?

export route-target
xx:xx
then you apply export policy 

Hi @MHM Cisco World ,

This is not required and it should work if you are setting the RT in the export route policy.

Regards, 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Harold Ritter
Level 12
Level 12

Hi @Omar Ismaeel ,

You are probably missing the VRF B configuration under "router bgp". Can you please provide the "show run router bgp" output.

Regards,

 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hello @Harold Ritter 
I've already configured the new VRF under BGP proccess, please check below:
vrf B
rd 123:1
bgp bestpath as-path multipath-relax
address-family ipv4 unicast
label mode per-vrf
maximum-paths ibgp 4
!
address-family ipv6 unicast
label mode per-vrf
maximum-paths ibgp 4
!
!
vrf A
rd XXX:XX
bgp bestpath as-path multipath-relax
address-family ipv4 unicast
label mode per-vrf
maximum-paths ibgp 4
!
address-family ipv6 unicast
label mode per-vrf
maximum-paths ibgp 4
!
!

Hi @Omar Ismaeel ,

You mentioned that the route is learnt via bgp in VRF A. I do not see any bgp neighbor configuration under VRF A. Can you provide a "show bgp vrf A xxxx/32".

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Review Cisco Networking for a $25 gift card