Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

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:

  • 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.

  1. Click the Add button in Overlay > Routing > Routing Policies.
  2. Enter routing policy information according to the guidelines provided in Table 1
  3. Click Create to create the routing policy.

    The Routing Policies tab is displayed listing the newly created policy.

  4. Navigate to the Overlay > Virtual Networks page.
  5. 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.

  6. 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.
  7. 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:

  • exact

  • orlonger

  • longer

Example: 10.1.0.0/16 orlonger

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:

Action Value

action

Reject-Reject the route that matches this term. No more terms are evaluated after hitting this term.

Accept-Accept the route that matches this term. No more terms are evaluated after hitting this term.

Next-This is the default action taken upon matching the policy term. The route is updated according to the update specified in the policy action. Next terms present in the routing policy are processed on the route. If there are no more terms in the policy, the next routing policy is processed, if present.

add community

Add a list of community to the existing community.

The community is of type unsigned 32 bit integer:unsigned 32 bit integer.

For example, 64512:55555.

add extended community

Add a list of extended community to the existing community.

An eight octet string representation of value type:administrator:assigned-number where type is two octets, administrator is four octets, and assigned-number is two octets or it can be a hexadecimal representation of the community like: 0xFFffA101.

as-path

Select different AS paths to control routing decisions

Unsigned 32-bit integer representing the as-path.

For example, 444.

local-preference

Select the local preference to distinguish routes and take further action.

Unsigned 32-bit integer representing local-preference.

For example, 444.

med

Select the MED of the BgpPath.

Unsigned 32-bit integer representing the MED.

For example, 444.

remove community

Remove a list of community (if present) from the existing community.

The community is of type unsigned 32 bit integer:unsigned 32 bit integer.

remove extended community

Remove a list of extended community (if present) from the existing community.

An eight octet string representation of value type:administrator:assigned-number where type is two octets, administrator is four octets, and assigned-number is two octets or it can be a hexadecimal representation of the community like: 0xFFffA101.

set community

Set a list of community.

The community is of type unsigned 32 bit integer:unsigned 32 bit integer.

set extended community

Set a list of extended community.

An eight octet string representation of value type:administrator:assigned-number where type is two octets, administrator is four octets, and assigned-number is two octets or it can be a hexadecimal representation of the community like: 0xFFffA101.