Creating a Routing Policy With Extended Communities in Contrail Command
Contrail Networking supports extended communities on the import routing policy function. Contrail Networking enables you to import routing policy terms to match on extended communities and perform 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:
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
Enter a name for the routing policy.
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..
Select the check box to match all the community strings.
Select the extended community string to match for the routing policy.
Select the check box to match the extended community strings.
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.
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:
A route matches this condition if its prefix matches any of the prefixes in the list.
Select the actions to be performed on the matching routes. The supported actions and the values are: