cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1365
Views
0
Helpful
2
Replies

how to import a prefix into specific VRF that has specific RT value?

mohammed hashim
Level 1
Level 1

Hi,

in the BGP table:

Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1 (default for vrf CUSTOMER_A)
*>i 10.0.3.10/32 10.0.3.3 0 100 0 ?
*> 10.0.4.10/32 0.0.0.0 0 32768 ?
*>i 10.0.37.0/24 10.0.3.3 0 100 0 ?
*> 10.0.48.0/24 0.0.0.0 0 32768 ?

Route Distinguisher: 200:1 (default for vrf CUSTOMER_B)
*>i 10.0.3.20/32 10.0.3.3 0 100 0 ?
*> 10.0.4.20/32 0.0.0.0 0 32768 ?

Route Distinguisher: 300:1 (default for vrf CUSTOMER_C)
*>i 10.0.3.30/32 10.0.3.3 0 100 0 ?
*> 10.0.4.30/32 0.0.0.0 0 32768 ?

I want to only import prefix 10.0.37.0/24 from VRF CUSTOMER_A to VRF CUSTOMER_C

CUSTOMER_A RT: 100:1

CUSTOMER_B RT: 200:1

CUSTOMER_C RT: 300:1

I created route-map to do this:

ip prefix-list PREFIX_37 seq 5 permit 10.0.37.0/24
!
route-map MAP_37 permit 10
  match ip address prefix-list PREFIX_37
route-map MAP_37 permit 20
!
ip vrf CUSTOMER_C
import map MAP_37

however, it did not import anything. but when I used route-target import 100:1, it worked but imported all the prefixes in CUSTOMER_A VRF, which I dont want

Route Distinguisher: 300:1 (default for vrf CUSTOMER_C)
*>i 10.0.3.10/32 10.0.3.3 0 100 0 ?
*>i 10.0.3.30/32 10.0.3.3 0 100 0 ?
*> 10.0.4.10/32 0.0.0.0 0 32768 ?
*> 10.0.4.30/32 0.0.0.0 0 32768 ?
*>i 10.0.37.0/24 10.0.3.3 0 100 0 ?
*> 10.0.48.0/24 0.0.0.0 0 32768 ?

??

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

You need to use both.

You use  "import map ..."   to filter the routes being imported but it does not actually import the routes, that is what  "route-target import ..." does.

Jon

View solution in original post

2 Replies 2

Jon Marshall
Hall of Fame
Hall of Fame

You need to use both.

You use  "import map ..."   to filter the routes being imported but it does not actually import the routes, that is what  "route-target import ..." does.

Jon

Thank you, it worked by configuring this:

ip prefix-list PREFIX_37 seq 5 permit 10.0.37.0/24

!

route-map MAP_37 permit 10

  match ip address prefix-list PREFIX_37

route-map MAP_37 deny 20

!

ip vrf CUSTOMER_C

  import map MAP_37

  route-target import 100:1

!

I also had to deny statement 20 in the route-map, to exclude anything else