cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

375
Views
0
Helpful
10
Replies

import export between VRF and GRE tunnel

Hello,

i have a question.

I would like to import export routes between VRF's and use OSPF for this.
But the difficult part is that i want to do this accross a GRE Tunnel.

 

As below is shown.
VRF TEST1 is fully operational and i would like to import TEST2


How can i accomplish this ?

THANKS

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Most important thing I forgot

Most important thing I forgot to ask. What about your MP-BGP configuration?

You should have a vrf address-family for TEST2 and redistribute the routes there. There's no need of neighbor configuration. Just something like this:

router bgp 1
 address-family ipv4 vrf TEST2
 redistribute connected

Take a look at this link about inter vrf route leakage.
And regarding RD and RTs, here.

View solution in original post

10 REPLIES 10

Hi Johan,I guess, you will

Hi Johan,

I guess, you will need to add route-target import/export for vrf TEST1 to import/export routes of vrf TEST2 , hence the GRE tunnel is based on vrf TEST1. This solution called Inter VRF route leaking.

Regards,
Mohammad

Hello Mohammad,Thanks for

Hello Mohammad,

Thanks for your reply!.

i tried this:

ip vrf TEST1
 rd 65000:1
 route-target export 65000:1
 route-target import 65000:1
 route-target import 65000:2
!
ip vrf TEST2
 rd 65000:2
 route-target export 65000:2
 route-target import 65000:2
 route-target import 65000:1

but after this still no routes are visible in both VRF's.

 

Hi Johan,Please try it like

Hi Johan,

Please try it like this:

ip vrf TEST1
 rd 65000:1
 route-target export 65000:1
 route-target export 65000:2
 route-target import 65000:1

 route-target import 65000:2
!
ip vrf TEST2
 rd 65000:2
 route-target export 65000:2
 route-target import 65000:2

Regards,
Mohammad

Tried it but still no luck.i

Tried it but still no luck.

i'm kinda new with VRF so i correct me if i'm wrong
but could i be that i need to create a static route to connect the VRF's?

No, there's no need of static

No, there's no need of static route here.

Do you use the below commands to check the routes?
show ip route vrf TEST1
show ip route vrf TEST2

Yes i'm using the command

Yes i'm using the command :

show ip route vrf TEST1
show ip route vrf TEST2

:)

Sounds strange, because you

Sounds strange, because you should at least see the connected routes in each vrf.

Could you please paste the output of show ip vrf detail?

VRF TEST1 (VRF Id = 1);

VRF TEST1 (VRF Id = 1); default RD 65000:1; default VPNID <not set>
  Interfaces:
    Tu1                   Gi0/0.1
VRF Table ID = 1
  Export VPN route-target communities
    RT:65000:1             RT:65000:2
  Import VPN route-target communities
    RT:65000:1             RT:65000:2
  No import route-map
  No export route-map
  VRF label distribution protocol: not configured
  VRF label allocation mode: per-prefix

VRF TEST2 (VRF Id = 1); default RD 65000:2; default VPNID <not                                                                                                                                                              set>
  Interfaces:
    Gi0/0.2
VRF Table ID = 1
  Export VPN route-target communities
    RT:65000:2             RT:65000:1
  Import VPN route-target communities
    RT:65000:2             RT:65000:1
  No import route-map
  No export route-map
  VRF label distribution protocol: not configured
  VRF label allocation mode: per-prefix

Highlighted

Most important thing I forgot

Most important thing I forgot to ask. What about your MP-BGP configuration?

You should have a vrf address-family for TEST2 and redistribute the routes there. There's no need of neighbor configuration. Just something like this:

router bgp 1
 address-family ipv4 vrf TEST2
 redistribute connected

Take a look at this link about inter vrf route leakage.
And regarding RD and RTs, here.

View solution in original post

i didn't had BGP after adding

i didn't had BGP after adding that everthing works!

Many thanks Mohammed!!

 

 

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards