Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Default Policies and Actions

    If an incoming or outgoing route or packet arrives and there is no explicitly configured policy related to the route or to the interface upon which the packet arrives, the action specified by the default policy is taken. A default policy is a rule or a set of rules that determine whether the route is placed in or advertised from the routing table, or whether the packet is accepted into or transmitted from the router interface.

    All policies also have default actions in case one of the following situations arises during policy evaluation:

    • A policy does not specify a match condition.
    • A match occurs, but a policy does not specify an action.
    • A match does not occur with a term in a policy and subsequent terms in the same policy exist.
    • A match does not occur by the end of a policy.

    An action defines what the router does with the route when the route matches all the match conditions in the from and to statements for a particular term. If a term does not have from and to statements, all routes are considered to match and the actions apply to all routes.

    Each term can have one or more of the following types of actions. The actions are configured under the then statement.

    • Flow control actions, which affect whether to accept or reject the route and whether to evaluate the next term or routing policy
    • Actions that manipulate route characteristics
    • Trace action, which logs route matches

    If you do not specify an action, one of the following results occurs:

    • The next term in the routing policy, if one exists, is evaluated.
    • If the routing policy has no more terms, the next routing policy, if one exists, is evaluated.
    • If there are no more terms or routing policies, the accept or reject action specified by the default policy is executed.

    Table 1 summarizes the routing policy actions.

    Table 1: Summary of Key Routing Policy Actions

    Action

    Description

    Flow Control Actions

    These actions control the flow of routing information into and out of the routing table.

    accept

    Accepts the route and propagates it. After a route is accepted, no other terms in the routing policy and no other routing policies are evaluated.

    reject

    Rejects the route and does not propagate it. After a route is rejected, no other terms in the routing policy and no other routing policies are evaluated.

    next term

    Skips to and evaluates the next term in the same routing policy. Any accept or reject action specified in the then statement is ignored. Any actions specified in the then statement that manipulate route characteristics are applied to the route.

    next policy

    Skips to and evaluates the next routing policy. Any accept or reject action specified in the then statement is ignored. Any actions specified in the then statement that manipulate route characteristics are applied to the route.

    Route Manipulation Actions

    These actions manipulate the route characteristics.

    as-path-prepend as-path

    Appends one or more AS numbers at the beginning of the AS path. If you are specifying more than one AS number, include the numbers in quotation marks.

    The AS numbers are added after the local AS number has been added to the path. This action adds AS numbers to AS sequences only, not to AS sets. If the existing AS path begins with a confederation sequence or set, the appended AS numbers are placed within a confederation sequence. Otherwise, the appended AS numbers are placed with a nonconfederation sequence.

    as-path-expand last-as count n

    Extracts the last AS number in the existing AS path and appends that AS number to the beginning of the AS path n times. Replace n with a number from 1 through 32.

    The AS numbers are added after the local AS number has been added to the path. This action adds AS numbers to AS sequences only, not to AS sets. If the existing AS path begins with a confederation sequence or set, the appended AS numbers are placed within a confederation sequence. Otherwise, the appended AS numbers are placed with a nonconfederation sequence.

    class class-name

    Applies the specified class-of-service (CoS) parameters to routes installed into the routing table.

    color preference

    color2 preference

    Sets the preference value to the specified value. The color and color2 preference values can be a number from 0 through 4,294,967,295 (232 – 1). A lower number indicates a more preferred route.

    damping name

    Applies the specified route-damping parameters to the route. These parameters override BGP's default damping parameters.

    This action is useful only in import policies.

    local-preference value

    Sets the BGP local preference attribute. The preference can be a number from 0 through 4,294,967,295 (232 – 1).

    metric metric

    metric2 metric

    metric3 metric

    metric4 metric

    Sets the metric. You can specify up to four metric values, starting with metric (for the first metric value) and continuing with metric2, metric3, and metric4.

    For BGP routes, metric corresponds to the MED, and metric2 corresponds to the IGP metric if the BGP next hop loops through another router.

    next-hop address

    Sets the next hop.

    If you specify address as self, the next-hop address is replaced by one of the local router's addresses. The advertising protocol determines which address to use.

    Published: 2013-02-10