Creating Routing Policies for QFX Series Devices in Contrail Networking
Starting with Contrail Networking Release 2005, you can create routing policies with routing policy terms supported by QFX Series devices. In releases prior to release 2005, you could not configure routing policies on physical devices. You could configure routing policies only on vRouters.
In release 2005, you can use routing policies to leak routes between logical routers set up on QFX Series devices. You must configure the routing policies with matching conditions that are supported by a QFX Series device. To leak routes across logical routers deployed in a fabric, you must configure a source logical router and one or more destination logical routers. As specified in the routing policy terms, if an incoming route meets the matching conditions, corresponding actions are performed on the routes. The accepted routes are leaked from a source logical router to all the destination logical routers.
Perform the following steps in Contrail Command to create or edit routing policies and assign routing policy terms that are supported by QFX Series devices.
- Navigate to Overlay>Routing>Routing Policies.
- Click Create to create a new routing policy.
Alternatively, you can also edit an existing routing policy for a QFX Series device. To edit an existing policy, select a policy from the displayed list and click the Edit (pencil) icon.
The Create Routing Policy page is displayed.
- Enter routing policy information according to the guidelines provided in Table 1.
- Click Create to create the routing policy for
a QFX Series device.
The Routing Policies tab is displayed listing the newly created policy along with existing policies.
The routing policies are listed according to their name, type, and the routing policy terms assigned to them. The Name column indicates the name of the routing policy and the Terms column indicates the routing policy terms assigned to the routing policy. Starting with release 2005, the Type column indicates if a routing policy is created for a QFX Series device or a vRouter.
Table 1: Create Routing Policy for a QFX Series Device
Enter a name for the routing policy in the Name field.
Select Physical Device or vRouter. You can create a routing policy for the type of device you select.
Select Physical Device to create a routing policy for a QFX Series device.
Select the matching conditions to be satisfied by the incoming routes.
Add Route filter > Route Filter
Enter an IP prefix address as a route filter in the Route Filter field.
Select one or more type of prefix. If an incoming route satisfies the prefix match condition, the route is processed.
Select the community string to match for the routing policy. The community string is represented with no-advertise, no-export, and no-export-subconfed.
Select the check box to match all the community strings.
Click Add match condition. The Additional Match conditions field is displayed. To add more match conditions, click on Add match condition.
Select a match condition from the list. A route must match the criteria of the match condition you selected. You can define one or more match conditions. If a route matches all match conditions, one or more actions are applied to the route.
Additional Match conditions
Select AS-path from the list. In the Type/Value field, enter the name of the path regular expression of an autonomous systems (AS). In the BGP routes, the AS path that matches the regular expression are processed.
Select External from the list. In the Type/Value field, select the type of OSPF route: OSPF Type1 or OSPF Type2. External OSPF routes, including routes exported from one level to another are processed.
Select Family from the list. In the Type/Value field, select the type of BGP family from the list to which the route belongs:
Select local-pref from the list. In the Type/Value field, enter a preference value between 0-4,294,967,295 (2^32 – 1). A route that matches the BGP local preference attribute, is processed.
Select NLRI from the list. In the Type/Value field, select a NLRI route type from the list: Type 1 to Type 10. You can specify multiple route types in a single policy.
Select Prefix List from the list. In the Type/Value field, select a prefix from the list of prefixes in the prefix list. You must select a prefix length qualifier from the list beside the Type/Value field:
A route matches this condition if its prefix matches any of the prefixes in the list.
Select Protocol from the list. In the Type/Value field, select the name of the protocol from which the route was learned or to which the route is being advertised. The protocols are aggregate, bgp, direct, evpn, ospf, ospf3, pim, and static.
Select the actions to be performed on the matching routes. The supported actions and the values are: