12-17-2004 06:03 AM
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?
12-17-2004 06:55 AM
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,
12-17-2004 07:29 AM
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,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide