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

Route target exports between 2 Cisco

matthydras
Level 1
Level 1

Hello Community

I need your help because I didn't see where is my mistake.

I want to implement VRFs with import export route targets.

A this time, I have 2 cisco :

  1. The first one R1 have only one VRF (name "Links_in") . On it, I have configure a loopback and create a BGP Instance with router-id associated with the loopback.
  2. The second one R2 have 2 VRF. The 1st one is the same as the R1 VRF (Links_in) with a ibgp instance with the router R1. The second VRF (name "Backbone") is dedicated for going on the Internet. On the R2 router, I have configured a default static route for going on my BGP routers.

A this time, I have configured the import and export the routes from the VRF Links_in using the associated Route Target 10. This route-target is shared with the both routers. So i can see the routes using the command : sh ip bgp vpnv4 vrf LINKS_in.

Now I want to export some connected routes for R1 VRF  "Links_in" to R2 VRF "Backbone". I want the some routes are in a new route target.

So I create this actions on R1 :

  1. Create prefix list :  ip prefix-list PF-Export-Links_in seq 5 permit 10.0.0.0/25
  2. Create the route-amp associated with the prefix list . The RT500 is added in addition to the route target 10 which is the default route target for the VRF Links-in :

route-map RM-Export-RT500 permit 10
 match ip address PF-Export-Clients-RT500
 set extcommunity rt  9000:500 additive

  3 . Finally I add the route-map on the VRF

ip vrf Links_in
 export map RM-Export-RT500

After I created that on R2 VRF Backbone :

    Create the extended community : ip extcommunity-list standard Allow_RT2 permit rt 9000:500
    Create the route map :

route-map RM-IMPORT-RT500 permit 10
match extcommunity Allow_RT500

  3. Associate and import the route to the VRF Backbone :

ip vrf Backbone
 import map RM-IMPORT-RT500

 

Unfortunatelly, the routes are tagged with the new RT on the R1/R2 routers on VRF Links_in but are not imported on the R2 on the Backbone VRF.


R1#sh ip bgp vpnv4 all
BGP table version is 30, local router ID is x.x.x.34
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 9000:202 (default for vrf Links_in)
* i10.10.1.0/30     <R2 Address>            0    100      0 ?
*>                  0.0.0.0                 0         32768 ?
r>ix.x.x.33/32      <R2 Address>            0    100      0 ?
*> x.x.x.34/32      0.0.0.0                 0         32768 ?
*> 10.0.0.0/25     0.0.0.0                  0         32768 ?
R1#
R1#sh ip bgp vpnv4 vrf Links_in 0.0.0.0/25
BGP routing table entry for 9000:202:0.0.0.0/25, version 13
Paths: (1 available, best #1, table Links_in)
  Advertised to update-groups:
     1         
  Local
    0.0.0.0 from 0.0.0.0 (x.x.x.34)
      Origin incomplete, metric 0, localpref 100, weight 32768, valid, sourced, best
      Extended Community: RT:9000:2 RT:9000:10
      


R2#sh ip bgp vpnv4 all
BGP table version is 14, local router ID is x.x.x.33
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 9000:103 (default for vrf Backbone)
*> 0.0.0.0          x.x.x.22            0         32768 i
*> x.x.x.16/29 0.0.0.0                  0         32768 ?

Route Distinguisher: 9000:201 (default for vrf Links_in)
*> 10.10.1.0/30     0.0.0.0                 0         32768 ?
* i                 <R1 Address>            0    100      0 ?
*> x.x.x.33/32      0.0.0.0                 0         32768 ?
r>i4x.x.x..34/32    <R1 Address>            0    100      0 ?
*>i10.0.0.0/25      <R1 Address>           0    100      0 ?
R2#

R2#sh ip bgp vpnv4 vrf Links_in 10.0.0.0/25  
BGP routing table entry for 9000:201:10.0.0.0/25, version 4
Paths: (1 available, best #1, table Links_in)
  Not advertised to any peer
  Local
    <R2 Address> from <R2 Address> (<R2 Address>)
      Origin incomplete, metric 0, localpref 100, valid, internal, best
      Extended Community: RT:9000:10
      mpls labels in/out 33/nolabel
R2#
R2#
R2#sh ip bgp vpnv4 vrf Backbone 10.0.0.0/25     
% Network not in table
R2#

If someone can help me because have any idea where the problem is.

Thanks in advance for your help.

Have a nice day.

Matt

3 Replies 3

Jon Marshall
Hall of Fame
Hall of Fame

Matt

Perhaps you have posted the wrong config or I am misunderstanding but on R1 your route map is referencing a prefix list that doesn't exist and on R2 your route map is referencing a community list which doesn't exist.

Jon

Hello Jon

 

I copied and modify my production config and I have done errors when I modified it.

So the correct config is behind :

 

R1

ip prefix-list PF-Export-Links_in seq 5 permit 10.0.0.0/25

route-map RM-Export-RT500 permit 10
 match ip address PF-Export-Links_in
 set extcommunity rt  9000:500 additive

ip vrf Links_in
 export map RM-Export-RT500

 

R2

ip extcommunity-list standard Allow_RT500 permit rt 9000:500

route-map RM-IMPORT-RT500 permit 10
match extcommunity Allow_RT500

ip vrf Backbone
 import map RM-IMPORT-RT500
 route-target import 9000:500

 

Before your reply, I have successfully import and export some routes using route targets but on the same router R2. In the case behind, I would like to export routes using routes targets (RT 500) on R1 VRF Links-in and import the RT500 on another router (R2) and on another VRF (Backbone).

Thanks for your help.

Matt

Matt

Just to clarify what you are trying to do.

You have two VRFs and VRF Links-in is on both routers. You also have a second VRF that is only on R2 and you want some of the VRF Links-in routes to be imported into second VRF.

Is that correct ?

Just out of interest why are you modifying the community for this ie. you could simply use a prefix list on R2's import statement.

Not saying that is the solution just trying to get a fuller picture of what you are trying to do.

Jon

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco