[Contents] [Prev] [Next] [Index] [Report an Error]

policy-statement

Syntax

policy-statement policy-name {
term term-name {
from {
family family-name;
match-conditions;
policy subroutine-policy-name;
prefix-list prefix-list-name;
prefix-list-filter prefix-list-name match-type <actions>;
route-filter destination-prefix match-type <actions>;
source-address-filter source-prefix match-type <actions>;
}
to {
match-conditions;
policy subroutine-policy-name;
}
then actions;
}
}

Hierarchy Level

[edit logical-systems logical-system-name policy-options],
[edit policy-options]

Release Information

Statement introduced before JUNOS Release 7.4.

Description

Define a routing policy, including subroutine policies.

Options

actions—(Optional) One or more actions to take if the conditions match. The actions are described in Table 15 and Table 16.

family family-name—(Optional) Specify an address family protocol. Specify inet for an IPv4 address protocol. Specify inet6 for a 128-bit IPv6 address protocol, and to enable interpretation of IPv6 router filter addresses. When family is not specified, the router uses the default IPv4 setting.

from—(Optional) Match a route based on its source address.

match-conditions—(Optional in from statement; required in to statement) One or more conditions to use to make a match. The qualifiers are described in Table 14.

policy subroutine-policy-name —Use another policy as a match condition within this policy. The name identifying the subroutine policy can contain letters, numbers, and hyphens (-) and can be up to 255 characters long. To include spaces in the name, enclose it in quotation marks (“  ”). For information about how to configure subroutines, see Configuring Subroutines.

policy-name—Name that identifies the policy. The name can contain letters, numbers, and hyphens (-) and can be up to 255 characters long. To include spaces in the name, enclose it in quotation marks (“  ”).

prefix-list prefix-list-name —Name of a list of IPv4 or IPv6 prefixes. To create a named list of IP address prefixes, see Extended Match Conditions Configuration.

prefix-list-filter prefix-list-name—Name of a prefix list to evaluate using qualifiers; match-type is the type of match (see Table 25), and actions is the action to take if the prefixes match.

route-filter prefix match-type <actions>—(Optional) List of routes on which to perform an immediate match; source-prefix is the IPv4 or IPv6 route prefix to match, match-type is the type of match (see Table 24), and actions is the action to take if the source-prefix matches.

source-address-filter source-prefix match-type <actions>—(Optional) Unicast source addresses in multiprotocol BGP (MBGP) and Multicast Source Discovery Protocol (MSDP) environments on which to perform an immediate match. source-prefix is the IPv4 or IPv6 route prefix to match, match-type is the type of match (see Table 25), and actions is the action to take if the source-prefix matches.

term term-name—Name that identifies the term.

to—(Optional) Match a route based on its destination address or the protocols into which the route is being advertised.

then—(Optional) Actions to take on matching routes. The actions are described in Table 15 and Table 16.

Usage Guidelines

See Defining Routing Policies and Extended Match Conditions Configuration.

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.


[Contents] [Prev] [Next] [Index] [Report an Error]