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

multiple RouteTarget

edwardlinta
Level 1
Level 1

I've got a question on multiple route target and their semantic releationship.

For example, with the following configuration:

(config)# ip vrf vrf_blue

(config-vrf)# route-target both 1000:1

(config-vrf)# route-target export 1000:2

(config-vrf)# route-target import 173.27.0.130:200

Does it mean every route advertised via vrf_blue will have both 1000:1 **and** 1000:2 attached?

Also, for the import, does it mean that only route with both 1000:1 **and** 173.27.0.130:200 can be accepted into the vrf_blue? Or does it mean that the route with either 1000:1 **or** 173.27.0.130:200 can be accepted into the vrf_blue?

In general, does the semantic relationship between all the route target is the *either/or* relationship ? If so, how can you express the *and* relationship?

2 Replies 2

Harold Ritter
Spotlight
Spotlight

The answer to your first question is yes. An extended community is added to the prefix for each "route-target export" specified.

The import policy is actually an OR condition, so only one "route-target import" statement needs to be matched in order for the prefix to be imported.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Harold Ritter
Spotlight
Spotlight

Oops, I forgot to answer the last question about how you could achieve an AND condition instead of the OR you get with the "route-target import" statement.

This can be done using an import map as follow:

ip vrf test

import map test

!

route-map test permit 10

match extcommunity 1

!

ip extcommunity-list 1 permit rt 1:1 rt 2:2

This way you would import a given prefix only if it had both extended communities attached to it.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)