Skip to content

Route Policy Sets

Route policy sets control how BGP routes are accepted, rejected, and modified: a machine's export policy shapes the routes it originates (its VIPs and Routes), and an external BGP peer's import and export policies shape the routes received from and sent to that peer. They allow you to filter routes, set preferences, and manipulate BGP attributes to shape traffic flow within your mesh network.

List Page

The Route Policy Sets list page shows all policy sets in your account.

Route policy sets list

Column Description
Name The policy set name
Default Action What happens to routes that do not match any rule: Accept (allow the route) or Reject (drop the route). Applies to a policy set in advanced mode, whether or not it has rules (with no rules and Reject, every route is dropped); a simple-mode policy set accepts every route.
Local Pref Used in simple mode only: the Local Preference set on every route (on an external peer, on imported routes only). Ignored in advanced mode, on machines and on peers; there a rule's Set Local Preference sets it, which on a peer also applies on import only.
Rules The number of rules defined in this policy set

Click Create in the top-right corner to add a new policy set. Click a policy set name to view or edit it. The three-dot menu on each row provides options to delete the policy set.

When no policy sets exist, the page displays: "No route policy sets yet — Click the Create button to add your first route policy set."


Creating a Route Policy Set

When you click Create, a form appears with the following fields:

Field Description
Name A unique name for the policy set.
Description A human-readable description of the policy set's purpose.
Advanced Mode Turns on rules. In advanced mode the rules are evaluated in sequence order and the Default Action applies to routes no rule matches; the Rules section is shown only in this mode. Off (simple mode), the policy set only sets its Local Preference (on an external peer, on imported routes only) and accepts every route.
Default Action The action applied to routes that do not match any rule. Choose Accept to allow unmatched routes, or Reject to drop them. It applies in advanced mode, whether or not the policy set has rules; a simple-mode policy set accepts every route whatever this says.
Local Preference Used in simple mode only: the Local Preference set on every route; on an external peer, on imported routes only. Ignored in advanced mode, on machines and on peers: use a rule's Set Local Preference there (on a peer, also on import only). Higher values make routes more preferred.

Rules

Rules are the building blocks of a route policy set. Each rule specifies match conditions and actions. Rules are evaluated in order by their sequence number — the first matching rule wins.

Rule Fields

Field Description
Sequence A numeric value that determines the evaluation order. Lower numbers are evaluated first.
Action What to do when the rule matches: Accept or Reject.

Match Conditions

Each rule can have one or more match conditions. A route must satisfy all conditions in a rule for the rule to match.

Condition Description
Prefix List Match routes whose prefix is one of the listed prefixes, exactly. With a prefix length range, also match more-specific prefixes inside a listed prefix whose length is in the range (a minimum alone means minimum to /32; a maximum alone means the listed prefix's own length to the maximum). A listed prefix whose own length the range does not fit (the range must lie between its length and /32), or a rule with no prefixes, cannot be used: in a machine's export policy that prefix is skipped and the rule's other prefixes still apply (the agent logs a warning), and a rule with no prefixes matches nothing; on an external BGP peer the policy is refused and the peer is not brought up.
Community Match routes tagged with specific BGP community values.
AS Path Regex Match routes whose AS path matches a regular expression pattern.

Actions

When a rule matches, in addition to accepting or rejecting the route, it can modify BGP attributes:

Action Description
Set Local Preference Override the Local Preference value for the matched route. Higher values are more preferred. On an external peer it applies to imported routes only: in a peer's export policy it does nothing.
Set MED Set the Multi-Exit Discriminator value. Lower MED values are preferred when comparing routes from the same neighboring AS.
Set / Add / Remove Communities Change the route's BGP communities. Write each community as asn:value (each part 0 to 65535), as a decimal value, or as one of the well-known names no-export, no-advertise, no-export-subconfed and no-peer; an entry in any other form (a pattern such as 65000:.* included) is skipped, and the agent logs a warning. Set replaces the route's communities, Add adds to them, and Remove takes away exactly the communities listed, and only ones the route already carried, never ones the same rule sets or adds, whatever form they are written in. A rule may use several: Set with Add gives both lists. This is the same on a machine and on an external peer; a machine's own routes carry no communities, so there Remove has nothing to act on. Matching on communities (a community match rule) is different: there each entry is a pattern, so 65000:.* matches any community of AS 65000; on an external peer, an entry that is not a valid pattern refuses that peer alone.
AS Path Prepend Prepend one or more AS numbers to the AS path, making the route appear longer and less preferred to other routers.

Example

A policy set that prefers routes from a specific community and rejects everything else:

  1. Rule 1 (Sequence 10) — Match community 65000:100, Action: Accept, Set Local Preference: 200
  2. Rule 2 (Sequence 20) — Match community 65000:200, Action: Accept, Set Local Preference: 100
  3. Default Action — Reject

In this example, routes tagged with community 65000:100 are accepted with high preference, routes with 65000:200 are accepted with lower preference, and all other routes are rejected.

This example is meant as an external BGP peer's import policy, where the routes arrive from the peer carrying communities. Do not use it as a machine's export policy: an export policy applies only to the machine's own VIPs and Routes, which carry no communities when they are evaluated, so neither rule matches and the Reject default withholds every one of them. For an export policy, match the machine's own prefixes with a prefix list instead, for example 10.78.0.0/24 with Action: Accept, and Default Action: Reject to announce only that prefix.