Related Documentation
- EX Series
- dynamic-db
- M Series
- Defining Routing Policies
- Configuring Routing Policies and Policy Objects in the Dynamic Database
- dynamic-db
- PTX Series
- Defining Routing Policies
- Configuring Routing Policies and Policy Objects in the Dynamic Database
- dynamic-db
- T Series
- Defining Routing Policies
- Configuring Routing Policies and Policy Objects in the Dynamic Database
- dynamic-db
policy-statement
Syntax
Hierarchy Level
Release Information
Statement introduced before Junos OS Release 7.4.
Statement introduced in Junos OS Release 9.0 for EX Series switches.
Support for configuration in the dynamic database introduced in Junos OS Release 9.5.
Support for configuration in the dynamic database introduced in Junos OS Release 9.5 for EX Series switches.
inet-mdt option introduced in Junos OS Release 10.0R2.
Statement introduced in Junos OS Release 11.3 for the QFX Series.
route-target option introduced in Junos OS Release 12.2.
Description
Define a routing policy, including subroutine policies.
To list the routing policies under the [edit policy-options] hierarchy level by policy-statement policy-name in alphabetical order, enter the show policy-options configuration command.
Options
actions—(Optional) One or more actions to take if the conditions match. The actions are described in Configuring Flow Control Actions.
family family-name—(Optional) Specify an address family protocol. Specify inet for IPv4. Specify inet6 for 128-bit IPv6, and to enable interpretation of IPv6 router filter addresses. For IS-IS traffic, specify iso. For IPv4 multicast VPN traffic, specify inet-mvpn. For IPv6 multicast VPN traffic, specify inet6-mvpn. For multicast-distribution-tree (MDT) IPv4 traffic, specify inet-mdt. For BGP route target VPN traffic, specifyroute-target.
![]() | Note: When family is not specified, the routing device or routing instance uses the address family or families carried by BGP. If multiprotocol BGP (MP-BGP) is enabled, the policy defaults to the protocol family or families carried in the network layer reachability information (NLRI) as configured in the family statement for BGP. If MP-BGP is not enabled, the policy uses the default BGP address family unicast IPv4. |
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 Configuring Match Conditions in Routing Policy Terms.
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 (“ ”). Policy names cannot take the form __.*-internal__, as this form is reserved. For information about how to configure subroutines, see Configuring Subroutines in Routing Policy Match Conditions.
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.
prefix-list-filter prefix-list-name—Name of a prefix list to evaluate using qualifiers; match-type is the type of match (see Configuring Prefix List Filters), and actions is the action to take if the prefixes match.
route-filter destination-prefix match-type <actions>—(Optional) List of routes on which to perform an immediate match; destination-prefix is the IPv4 or IPv6 route prefix to match, match-type is the type of match (see Configuring Route Lists), and actions is the action to take if the destination-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 Configuring Route Lists), 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 Configuring Flow Control Actions and Configuring Actions That Manipulate Route Characteristics.
Required Privilege Level
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.
Related Documentation
- EX Series
- dynamic-db
- M Series
- Defining Routing Policies
- Configuring Routing Policies and Policy Objects in the Dynamic Database
- dynamic-db
- PTX Series
- Defining Routing Policies
- Configuring Routing Policies and Policy Objects in the Dynamic Database
- dynamic-db
- T Series
- Defining Routing Policies
- Configuring Routing Policies and Policy Objects in the Dynamic Database
- dynamic-db
