MPLS VPN Extranet Route Leaking

Hello Nicolas

When a route-map is processing a prefix list with multiple statements, it will evaluate the statements in the prefix list sequentially based on their sequence numbers. If a match is found, the route-map will stop processing the rest of the statements in the prefix list and will apply the corresponding action (permit or deny) defined in the route-map.

If you use the set command after the match statement in a route-map, as you have done, the set command will be applied only to the prefix that matches the first matched statement in the prefix list. Once a match is found, the route-map will apply the corresponding action of the set command, then stop processing the rest of the statements in the prefix list.

The result is that the first prefix, which is matched, gets the community, but the second doesn’t. So this behavior is not an issue related to VRFs or BGP, but to the way that route-maps interact with prefix lists.

I hope this has been helpful!

Laz