Creating a Routing Policy With Extended Communities in Contrail Command
Contrail Release 5.1 supports extended communities on the import routing policy function. Release 5.1 allows import routing policy terms to match on extended communities and import routing policy actions to add, set, and remove extended communities. Filtering routes based on extended communities prevent advertising unnecessary service interface and static routes from the control node.
The following extended communities are supported:
Route Target
Encapsulation
Security Group
Origin VN
MAC Mobility
Load Balance
Tag
For information on these extended communities, see BGP Extended Communities.
Creating a Routing Policy
This section shows how to create a routing policy for a virtual network with extended communities.
- Click the Add button in Overlay > Routing > Routing Policies.
- Enter routing policy information according to the guidelines provided in Table 1
- Click Create to create the routing policy.
The Routing Policies tab is displayed listing the newly created policy.
- Navigate to the Overlay > Virtual Networks page.
- Select the check box for the virtual network that you
want to attach the routing policy to, and click the Edit icon.
The Edit Virtual Network page appears.
- Scroll down to the Routing, Bridging, and Policies section in the Network tab, and select the newly created routing policy in the Routing Policies field.
- Click Save to add the routing policy to the virtual network.
Table 1: Create Routing Policy
Field | Guidelines | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | Enter a name for the routing policy. | ||||||||||||||||||||||
Term(s) | |||||||||||||||||||||||
Community | Select the community string to match for the routing policy. The community string is represented with accept-own, no-advertise, no-export, no-export-subconfed, no-reoriginate.. | ||||||||||||||||||||||
Match All | Select the check box to match all the community strings. | ||||||||||||||||||||||
Extended Community | Select the extended community string to match for the routing policy. | ||||||||||||||||||||||
Match All | Select the check box to match the extended community strings. | ||||||||||||||||||||||
Protocol | Select the protocol for the routing policy which is an array of path source or path protocol to match. The protocols are interface, aggregate, bgp, BGPaaS, interface-static, service-chain, service-interface, static, and xmpp. A path is considered as matching this condition if the path protocol is one of protocols in the list. | ||||||||||||||||||||||
Prefixes | Select a list of prefixes to match. Each prefix in the list is represented as prefix and match type, where the prefix match type can be:
Example: 1.1.0.0/16 A route matches this condition if its prefix matches any of the prefixes in the list. | ||||||||||||||||||||||
Then | |||||||||||||||||||||||
Actions | Select the actions to be performed on the matching routes. The supported actions and the values are:
|