6.9. Route Policy Command Reference

6.9.1. Command Hierarchies

6.9.1.1. Route Policy Configuration Commands

config
[no] router
abort
as-path name expression regular-expression
— no as-path name
begin
commit
community name members comm-id [comm-id (up to 15 max)]
community name expression expression [exact]
— no community name [members comm-id]
[no] damping name
half-life minutes
— no half-life
max-suppress minutes
— no max-suppress
reuse integer
— no reuse
suppress integer
— no suppress
[no] policy-statement name
description description-string
default-action {accept | next-entry | next-policy | reject}
as-path {add | replace} name
— no as-path
as-path-prepend as-number [repeat]
community add name [name...(up to 28 max)]
community remove name [name...(up to 28 max)]
community replace name [name...(up to 28 max)]
— no community
damping {name | none}
— no damping
local-preference local-preference
metric {add | subtract} metric
metric set {igp | metric}
— no metric
next-hop ip-address
— no next-hop
[no] next-hop-self
origin {igp | egp | incomplete}
— no origin
preference preference
— no preference
tag tag
— no tag
type type
— no type
entry entry-id
— no entry
description description-string
action {accept | next-entry | next-policy | reject}
— no action
as-path {add | replace} name
— no as-path
as-path-prepend as-number [repeat]
community {add name | remove name | replace name} [name...(up to 28 max)]
— no community
damping {name | none}
— no damping
local-preference local-preference
metric {add | subtract} metric
metric set {igp | metric}
— no metric
next-hop ip-address
— no next-hop
[no] next-hop-self
origin {igp | egp | incomplete}
— no origin
preference preference
— no preference
tag tag
— no tag
type type
— no type
[no] from
area area-id
— no area
as-path name
— no as-path
community comm-name
community expression expression
— no community
[no] external
family [ipv4] [vpn-ipv4]
— no family
group-address prefix-list-name
interface interface-name
— no interface
level {1 | 2}
— no level
neighbor {ip-address | prefix-list name}
— no neighbor
origin {igp | egp | incomplete | any}
— no origin
prefix-list name [name...(up to 5 max)]
protocol protocol [all | {instance instance}]
— no protocol
source-address ip-address
tag tag
— no tag
type type
— no type
[no] to
level {1 | 2}
— no level
neighbor {ip-address | prefix-list name}
— no neighbor
prefix-list name [name...(up to 5 max)]
protocol protocol [all | {instance instance}]
— no protocol
[no] prefix-list name
[no] prefix ip-prefix/prefix-length [exact | longer | through length | prefix-length-range length1-length2]

6.9.1.2. Show Commands

show
— router router-name
policy [name | damping name | prefix-list name | as-path name | community name | admin]

6.9.2. Command Descriptions

6.9.2.1. Configuration Commands

6.9.2.1.1. Generic Commands

abort

Syntax 
abort
Context 
config>router>policy-options
Description 

This command discards changes made to a route policy.

Default 

n/a

begin

Syntax 
begin
Context 
config>router>policy-options
Description 

This command enters the mode to create or edit route policies.

Default 

n/a

commit

Syntax 
commit
Context 
config>router>policy-options
Description 

This command saves changes made to a route policy.

Default 

n/a

description

Syntax 
description description-string
no description
Context 
config>router>policy-options>policy-statement
config>router>policy-options>policy-statement>entry
Description 

This command creates a text description that is stored in the configuration file to help identify the contents of the entity.

The no form of the command removes the string from the configuration.

Default 

n/a

Parameters 
description-string—
the description character string. Allowed values are any string up to 80 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

6.9.2.1.2. Route Policy Options

as-path

Syntax 
as-path name expression regular-expression
no as-path name
Context 
config>router>policy-options
Description 

This command creates a route policy AS path regular expression statement to use in route policy entries. See Regular Expressions for information.

The no form of the command deletes the AS path regular expression statement.

Default 

no as-path

Parameters 
name—
the AS path regular expression name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.
regular-expression—
the AS path regular expression (any string or null)
Values—
any string up to 256 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.
null — the AS path expressed as an empty regular expression string

 

community

Syntax 
community name members comm-id [comm-id...(up to 15 max)]
community name expression expression [exact]
no community name [members comm-id]
Context 
config>router>policy-options
Description 

This command creates a route policy community list to use in route policy entries.

The community name expression form of the command extends the community name members form by allowing the community list structure to support AND, OR, and NOT operators.

When the community name members command is used, community lists operate with implicit AND support only, and all communities must match to provide a positive match, as shown in the following example, where the only routes that match include all three communities:

  1. community “north” members “target:1234:111” “target:1234:222” “target:1234:333”

Using the community name expression command allows for configuration of a community expression using Boolean operators to provide flexible matching of communities. The AND operator provides functionality equivalent to the community name members command; the OR operator allows an OR match of communities; and the NOT operator allows inverted matches. If required, operators may be chained (for example, AND NOT) or enclosed within parentheses. The entire expression must be enclosed within quotation marks.

  1. community “north2” expression “target:1234:111 AND target:1234:222 AND target: 1234:333”
  2. community “south” expression “target:1234:111 OR target:1234:222”
  3. community “east” expression “target:1234:1.1 AND NOT target:1234:191”
  4. community “west” expression “[community list A] OR ([community list B] AND [community list C])”

The first example above demonstrates the implementation of AND operators, which is equivalent to the members syntax (that is, “north” and “north2” are equivalent). The second example shows the OR operator, which will match a route that has target:1234:111 or target:1234:222. The third example shows the combined AND NOT operators, which will match a route that matches the regular expression for target:1234:1.1 except for target:1234.191, where “1.1” means any match of 111, 121, 131, 141, 151, 161, 171, 181, or 191. The fourth example shows the grouping of lists B and C through the use of parentheses.

The no form of the command deletes the community list or the provided community ID.

Default 

no community

Parameters 
name—
the community list or expression name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.
comm-id —
the community ID. Up to 15 community ID strings can be specified with a total maximum of 72 characters. A community ID can be specified in four different forms:
  1. 2byte-asnumber:comm-val
  2. reg-ex
  3. ext-comm
  4. well-known-comm
Values—
2byte-asnumber:comm-val — the 2byte-asnumber is the    Autonomous System Number (ASN) and comm-val is the    community value, where:
          2byte-asnumber:       0 to 65535
          comm-val:                 0 to 65535
reg-ex — a regular expression string. Allowed values are any string up to 72 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes. See Regular Expressions for information.
ext-comm — the extended community, where ext-comm is defined as:      type:{ip-address:comm-val | reg-ex1&reg-ex2 |                ip-address&reg-ex2 | 2byte-asnumber:ext-comm-               val | 4byte-asnumber:comm-val}, and where:
          type:     target or origin (keywords that denote the                        community as an extended community of                        type route target or route origin, respectively)
          ip-address:             a.b.c.d
          comm-val:              0 to 65535
          2byte-asnumber:    0 to 65535
          ext-comm-val:        0 to 4294967295
          4byte-asnumber:    0 to 4294967295
          reg-ex1:                 a regular expression string, 63                                         characters maximum (see reg-ex,                                         above)
          reg-ex2:                a regular expression string, 63                                        characters maximum (see reg-ex,                                        above)
well-known-comm — one of the keywords null, no-export,    no-export-subconfed, no-advertise

 

expression—
a logical community expression containing terms and operators. It can contain sub-expressions enclosed in parentheses. Allowed values are any string up to 900 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.
Values—
expression is one of the following:
     expression {AND | OR} expression
     [NOT] (expression)
     [NOT] comm-id

 

exact—
the community expression only matches the route with the specified expression. Without the exact keyword, a community expression evaluates to be true if any member is present.

policy-options

Syntax 
[no] policy-options
Context 
config>router
Description 

This command enables the context to configure route policies. Route policies are applied to the routing protocol.

The no form of the command deletes the route policy configuration.

Default 

n/a

policy-statement

Syntax 
[no] policy-statement name
Context 
config>router>policy-options
Description 

This command enables the context to configure a route policy statement.

Route policy statements control the flow of routing information from a specific protocol or protocols.

The policy-statement is a logical grouping of match and action criteria. A single policy-statement can affect routing in one or more protocols and/or one or more protocols’ peers/neighbors. A single policy-statement can also affect the export of routing information.

The no form of the command deletes the policy statement.

Default 

no policy-statement

Parameters 
name—
the route policy statement name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

triggered-policy

Syntax 
[no] triggered-policy
Context 
config>router
Description 

This command triggers route policy re-evaluation.

By default, when a change is made to a policy in the config router policy-options context and then committed, the change is effective immediately. However, there may be circumstances where the changes should or must be delayed; for example, when a policy change is implemented that would affect every BGP peer on a 7705 SAR. It is more effective to control changes on a peer-by-peer basis.

If the triggered-policy command is enabled and a given peer is established, and you want the peer to remain up, then, in order for a change to a route policy to take effect, a clear command with the soft or soft-inbound option must be used. In other words, when a triggered-policy is enabled, any routine policy change or policy assignment change within the protocol will not take effect until the protocol is reset or a clear command is issued to re-evaluate route policies; for example, clear router bgp neighbor x.x.x.x soft. This keeps the peer up, and the change made to a route policy is applied only to that peer, or group of peers.

Default 

disabled — dynamic route policy is enabled; policy-option configuration changes take effect immediately

6.9.2.1.3. Route Policy Damping Commands

damping

Syntax 
[no] damping name
Context 
config>router>policy-options
Description 

This command creates a context to configure a route damping profile to use in route policy entries.

If damping is enabled and the route policy does not specify a damping profile, the default damping profile is used. This default profile is always present and consists of the following parameters:

  1. Half-life: 15 m
  2. Max-suppress: 60 m
  3. Suppress-threshold: 3000
  4. Reuse-threshold: 750

The no form of the command deletes the named route damping profile and uses the default damping profile.

Default 

no damping

Parameters 
name—
the damping profile name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

half-life

Syntax 
half-life minutes
no half-life
Context 
config>router>policy-options>damping
Description 

This command configures the half-life value for the route damping profile.

The half-life value is the time, expressed in minutes, required for a route to remain stable in order for the Figure of Merit (FoM) value to be reduced by one half; for example, if the half-life value is 6 and the route remains stable for 6 min, then the new FoM value is 3. After another 3 min pass and the route remains stable, the new FoM value is 1.5.

When the FoM value falls below the reuse threshold, the route is once again considered valid and can be reused or included in route advertisements.

The no form of the command removes the half-life parameter from the damping profile and uses the value from the default profile.

Default 

no half-life

Parameters 
minutes—
the half-life in minutes, expressed as a decimal integer
Values—
1 to 45

 

Default—
15

max-suppress

Syntax 
max-suppress minutes
no max-suppress
Context 
config>router>policy-options>damping
Description 

This command configures the maximum suppression value for the route damping profile.

This value indicates the maximum time, expressed in minutes, that a route can remain suppressed.

The no form of the command removes the maximum suppression parameter from the damping profile and uses the value from the default profile.

Default 

no max-suppress

Parameters 
minutes—
the maximum suppression time, in minutes, expressed as a decimal integer
Values—
1 to 720

 

Default—
60

reuse

Syntax 
reuse integer
no reuse
Context 
config>router>policy-options>damping
Description 

This command configures the reuse value for the route damping profile. This value must be less than the suppress value.

When the Figure of Merit (FoM) value falls below the reuse threshold, the route is once again considered valid and can be reused or included in route advertisements.

The no form of the command removes the reuse parameter from the damping profile and uses the value from the default profile.

Default 

no reuse

Parameters 
integer—
the reuse value, expressed as a decimal integer
Values—
1 to 20000

 

Default—
750

suppress

Syntax 
suppress integer
no suppress
Context 
config>router>policy-options>damping
Description 

This command configures the suppression value for the route policy damping profile. This value must be greater than the reuse value

A route is suppressed when it has flapped frequently enough to increase the Figure of Merit (FoM) value so that it exceeds the suppress threshold limit. When the FoM value exceeds the suppress threshold limit, the route is removed from the route table or inclusion in advertisements.

The no form of the command removes the suppress parameter from the damping profile and uses the value from the default profile.

Default 

no suppress

Parameters 
integer—
the suppress value expressed as a decimal integer
Values—
1 to 20000

 

Default—
3000

6.9.2.1.4. Route Policy Prefix Commands

prefix-list

Syntax 
[no] prefix-list name
Context 
config>router>policy-options
Description 

This command creates a context to configure a prefix list to use in route policy entries.

The no form of the command deletes the named prefix list.

Default 

n/a

Parameters 
name—
the prefix list name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

prefix

Syntax 
[no] prefix ip-prefix/prefix-length [exact | longer | through length | prefix-length-range length1-length2]
Context 
config>router>policy-options>prefix-list
Description 

This command creates a prefix entry in the route policy prefix list.

The no form of the command deletes the prefix entry from the prefix list.

Parameters 
ip-prefix/prefix-length—
the IPv4 or IPv6 prefix for the prefix list entry
Values—
ipv4-prefix                  a.b.c.d (host bits must be 0)
ipv4-prefix-length       0 to 32
ipv6-prefix                  x:x:x:x:x:x:x:x (eight 16-bit pieces)
                                    x:x:x:x:x:x:d.d.d.d
                                    x - [0..FFFF]H
                                    d - [0..255]D
ipv6-prefix-length        0 to 128

 

exact—
the prefix list entry only matches the route with the specified ip-prefix and prefix-length values
longer—
the prefix list entry matches any route that matches the specified ip-prefix and has a prefix-length value greater than the specified prefix-length
length—
the prefix list entry matches any route that matches the specified ip-prefix and has a prefix-length value within the specified length values
Values—
0 to 128 (length > prefix-length)

 

length1 - length2
a route must match the most significant bits and have a prefix-length value within the given range
Values—
0 to 128 (length2 > length1 > prefix-length)

 

6.9.2.1.5. Route Policy Entry Match Commands

entry

Syntax 
entry entry-id
no entry
Context 
config>router>policy-options>policy-statement
Description 

This command enables the context to edit route policy entries within the route policy statement.

Multiple entries can be created using unique entries. The 7705 SAR exits the filter when the first match is found and executes the action specified. For this reason, entries must be sequenced correctly from most to least explicit.

An entry does not require matching criteria defined (in which case, everything matches) but must have an action defined in order to be considered complete. Entries without an action are considered incomplete and will be rendered inactive.

The no form of the command removes the specified entry from the route policy statement.

Default 

n/a

Parameters 
entry-id—
the entry ID expressed as a decimal integer. An entry-id uniquely identifies match criteria and the corresponding action. It is recommended that multiple entries be given entry-ids in staggered increments. This allows users to insert a new entry in an existing policy without requiring renumbering of all the existing entries.
Values—
1 to 4294967295

 

from

Syntax 
[no] from
Context 
config>router>policy-options>policy-statement>entry
Description 

This command enables the context to configure policy match criteria based on a route’s source or the protocol from which the route is received.

If no condition is specified, all route sources are considered to match.

The no form of the command deletes the source match criteria for the route policy statement entry.

to

Syntax 
[no] to
Context 
config>router>policy-options>policy-statement>entry
Description 

This command enables the context to configure export policy match criteria based on a route’s destination or the protocol into which the route is being advertised.

If no condition is specified, all route destinations are considered to match.

The to command context only applies to export policies. If it is used for an import policy, match criteria is ignored.

The no form of the command deletes export match criteria for the route policy statement entry.

area

Syntax 
area area-id
no area
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command configures an OSPF area as a route policy match criterion.

This match criterion is only used in export policies.

All OSPF routes (internal and external) are matched using this criterion if the best path for the route is by the specified area.

The no form of the command removes the OSPF area match criterion.

Default 

n/a

Parameters 
area-id—
the OSPF area ID expressed in dotted-decimal notation or as a 32-bit decimal integer
Values—
0.0.0.0 to 255.255.255.255 (dotted-decimal), 0 to 4294967295 (decimal)

 

as-path

Syntax 
as-path name
no as-path
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command configures an AS path regular expression statement as a match criterion for the route policy entry. If no AS path criterion is specified, any AS path is considered to match. AS path regular expression statements are configured at the global route policy level (config>router>policy-options>as-path name).

The no form of the command removes the AS path regular expression statement as a match criterion.

Default 

no as-path

Parameters 
name—
the AS path regular expression name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

The name specified must already be defined.

community

Syntax 
community comm-name
community expression expression
no community
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command configures a community list or expression as a match criterion for the route policy entry. If no community list or expression is specified, any community is considered a match.

The no form of the command removes the community list or expression match criterion.

Default 

no community

Parameters 
comm-name—
the community list name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

The comm-name specified must already have its members defined using the config>router>policy-options>community name members command.

expression—
the community expression. Allowed values are any expression up to 900 characters long composed of one or more expressions separated by AND, OR, and NOT operators. Operators may be combined (for example, OR NOT).

An expression can also be a community name enclosed in square brackets.

If the expression contains special characters (#, $, spaces, etc.), the entire string must be enclosed in double quotes.

The expression specified must already be defined using the config>router>policy-options>community name expression command.

Values—
expression is one of the following:
     expression {AND | OR} expression
     [NOT] (expression)
     [NOT] “[“comm-name”]”

 

external

Syntax 
[no] external
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command specifies the external IS-IS route matching criteria for the entry.

Default 

no external

family

Syntax 
family [ipv4] [vpn-ipv4]
no family
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command specifies address families as matching conditions.

Parameters 
ipv4—
specifies IPv4 routing information
vpn-ipv4—
specifies VPN-IPv4 routing information

group-address

Syntax 
group-address prefix-list-name
no group-address
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command specifies the multicast group address prefix list containing multicast group addresses that are embedded in the join or prune packet as a filter criterion. The prefix list must be configured prior to entering this command. Prefix lists are configured in the config>router>policy-options>prefix-list context.

The no form of the command removes the criterion from the configuration.

Default 

no group-address

Parameters 
prefix-list-name—
the prefix-list name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.The prefix-list-name is defined in the config>router>policy-options>prefix-list context.

interface

Syntax 
interface interface-name
no interface
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command specifies the router interface, specified either by name or address, as a filter criterion.

The no form of the command removes the criterion from the configuration.

Default 

no interface

Parameters 
interface-name—
the name of the interface used as a match criterion for this entry. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

level

Syntax 
level {1 | 2}
no level
Context 
config>router>policy-options>policy-statement>entry>from
config>router>policy-options>policy-statement>entry>to
Description 

This command specifies the IS-IS route level as a match criterion for the entry.

Default 

no level

Parameters 
1 | 2—
matches the IS-IS route learned from level 1 or level 2

neighbor

Syntax 
neighbor {ip-address | prefix-list name}
no neighbor
Context 
config>router>policy-options>policy-statement>entry>from
config>router>policy-options>policy-statement>entry>to
Description 

This command specifies the neighbor address as found in the source address of the actual join and prune message as a filter criterion. If no neighbor is specified, any neighbor is considered a match.

The no form of the command removes the neighbor IP match criterion from the configuration.

Default 

no neighbor

Parameters 
ip-address—
the neighbor IPv4 or IPv6 address
Values—
ipv4-address                a.b.c.d
ipv6-address                x:x:x:x:x:x:x:x[-interface]
                                     x:x:x:x:x:x:d.d.d.d[-interface]
                                     x - [0..FFFF]H
                                     d - [0..255]D
                                     interface - 32 chars max, mandatory                                                      for link local addresses

 

name—
the prefix list name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

The name specified must already be defined.

origin

Syntax 
origin {igp | egp | incomplete | any}
no origin
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command configures a BGP origin attribute as a match criterion for a route policy statement entry. If no origin attribute is specified, any BGP origin attribute is considered a match.

The no form of the command removes the BGP origin attribute match criterion.

Default 

no origin

Parameters 
igp—
configures matching path information originating within the local AS
egp—
configures matching path information originating in another AS
incomplete—
configures matching path information learned by another method
any—
ignores this criteria

prefix-list

Syntax 
prefix-list name [name...(up to 5 max)]
no prefix-list
Context 
config>router>policy-options>policy-statement>entry>from
config>router>policy-options>policy-statement>entry>to
Description 

This command configures a prefix list as a match criterion for a route policy statement entry.

If no prefix list is specified, any network prefix is considered a match.

The prefix list specifies the network prefix (this includes the prefix and length) that a specific policy entry applies to.

Up to five prefix list names can be specified.

The no form of the command removes the prefix list match criterion.

Default 

no prefix-list

Parameters 
name—
the prefix list name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

protocol

Syntax 
protocol protocol [all | {instance instance}]
no protocol
Context 
config>router>policy-options>policy-statement>entry>from
config>router>policy-options>policy-statement>entry>to
Description 

This command configures a routing protocol as a match criterion for a route policy statement entry. This command is used for both import and export policies depending on how it is used.

If no protocol criterion is specified, any protocol is considered a match.

The no form of the command removes all instances of the protocol from the match criterion.

Default 

no protocol

Parameters 
protocol—
the protocol name to match. The list of protocols supported under from differs from the list supported under to.
Values—
Under from:  aggregate, bgp, bgp-vpn, direct, igmp, isis, ldp, managed, mld, ospf, ospf3, pim, rip, static
Under to:  bgp, ospf, rip, isis, bgp-vpn, vpn-leak-7705, ospf3

 

all—
specifies that all instances of the protocol are used as match criteria (only applies to IS-IS)
instance—
the instance ID of the specified protocol (only applies to IS-IS). If no instance is specified, instance 0 is used.
Values—
isis-inst          1 to 31

 

source-address

Syntax 
source-address ip-address
no source-address
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command specifies a multicast data source address or prefix list as a match criterion for this entry.

The no form of the command removes the criterion from the configuration.

Default 

n/a

Parameters 
ip-address—
the source IPv4 or IPv6 address
Values—
ipv4-address                a.b.c.d
ipv6-address                x:x:x:x:x:x:x:x (eight 16-bit pieces)
                                     x:x:x:x:x:x:d.d.d.d
                                     x - [0..FFFF]H
                                     d - [0..255]D

 

tag

Syntax 
tag tag
no tag
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command adds an integer tag to the static route. These tags are then matched to control route redistribution.

The no form of the command removes the tag field match criterion.

Default 

no tag

Parameters 
tag—
matches a specific external LSA tag field
Values—
1 to 4294967295

 

type

Syntax 
type type
no type
Context 
config>router>policy-options>policy-statement>entry>from
Description 

This command configures an OSPF type metric as a match criterion in the route policy statement entry.

If no type is specified, any OSPF type is considered a match.

The no form of the command removes the OSPF type match criterion.

Parameters 
type—
the OSPF type metric
Values—
1 — set as OSPF routes with type 1 LSAs
2 — set as OSPF routes with type 2 LSAs

 

6.9.2.1.6. Route Policy Action Commands

default-action

Syntax 
default-action {accept | next-entry | next-policy | reject}
no default-action
Context 
config>router>policy-options>policy-statement
Description 

This command enables the context to configure actions for routes that do not match any route policy statement entries when the accept parameter is specified.

The default action clause can be set to all available action states, including accept, reject, next-entry, and next-policy. If the action states accept or reject, the policy evaluation terminates and the appropriate result is returned.

If a default action is defined and no matches occurred with the entries in the policy, the default action clause is used.

If a default action is defined and one or more matches occurred with the entries of the policy, the default action is not used.

The no form of the command deletes the default-action context for the policy statement.

Default 

no default-action

Parameters 
accept—
routes matching the entry match criteria will be accepted and propagated
next-entry—
the actions specified will be made to the route attributes and then policy evaluation will continue with the next policy entry (if any others are specified)
next-policy—
the actions specified will be made to the route attributes and then policy evaluation will continue with the next route policy (if any others are specified)
reject—
routes matching the entry match criteria will be rejected

action

Syntax 
action {accept | next-entry | next-policy | reject}
no action
Context 
config>router>policy-options>policy-statement>entry
Description 

This command enables the context to configure actions to take for routes matching a route policy statement entry.

This command is required and must be entered for the entry to be active.

Any route policy entry without the action command will be considered incomplete and will be inactive.

The no form of the command deletes the action context from the entry.

Default 

no action

Parameters 
accept—
specifies that routes matching the entry match criteria will be accepted and propagated
next-entry—
the actions specified will be made to the route attributes and then policy evaluation will continue with the next policy entry (if any others are specified)
next-policy—
the actions specified will be made to the route attributes and then policy evaluation will continue with the next route policy (if any others are specified)
reject—
routes matching the entry match criteria will be rejected

as-path

Syntax 
as-path {add | replace} name
no as-path
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command assigns a BGP AS path list to routes matching the route policy statement entry. If no AS path list is specified, the AS path attribute is not changed.

The no form of the command disables the AS path list editing action from the route policy entry.

Default 

no as-path

Parameters 
add—
the AS path list is to be prepended to an existing AS list
replace—
the AS path list replaces any existing AS path attribute
name—
the AS path list name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes. The name specified must already be defined.

as-path-prepend

Syntax 
as-path-prepend as-number [repeat]
no as-path-prepend
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command prepends a BGP AS number once or numerous times to the AS path attribute of routes matching the route policy statement entry. If an AS number is not configured, the AS path is not changed.

If the optional number is specified, then the AS number is prepended as many times as indicated by the number.

The no form of the command disables the AS path prepend action from the route policy entry.

Default 

no as-path-prepend

Parameters 
as-number—
the AS number to prepend expressed as a decimal integer
Values—
1 to 4294967295

 

repeat—
the number of times to prepend the specified AS number expressed as a decimal integer
Values—
1 to 50

 

community

Syntax 
community add name [name...(up to 28 max)]
community remove name [name...(up to 28 max)]
community replace name [name...(up to 28 max)]
no community
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command adds, removes, or replaces a BGP community list or expression to or from routes matching the route policy statement entry. If no community list or expression is specified, the community path attribute is not changed. Up to 28 community list or expression names can be used in one add, remove, or replace command.

The community list or expression changes the community path attribute according to the add, remove or replace keywords. If more than one of the keywords is used in a single command, first add is applied, then remove is applied. However, replace overwrites any add or remove.

The no form of the command disables the action to edit the community path attribute for the route policy entry.

Default 

no community

Parameters 
add—
the specified community list or expression is added to any existing list of communities
remove—
the specified community list or expression is removed from the existing list of communities
replace—
the specified community list or expression replaces any existing community attribute
name—
the community list name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes.

damping

Syntax 
damping {name | none}
no damping
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command configures a damping profile used for routes matching the route policy statement entry. If no damping criteria is specified, the default damping profile is used.

The no form of the command removes the damping profile associated with the route policy entry.

Default 

no damping

Parameters 
name—
the damping profile name. Allowed values are any string up to 32 characters long composed of printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, etc.), the entire string must be enclosed within double quotes. The name specified must already be defined.
none—
disables route damping for the route policy

local-preference

Syntax 
local-preference local-preference
no local-preference
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command assigns a BGP local preference to routes matching a route policy statement entry. If no local preference is specified, the BGP configured local preference is used.

The no form of the command disables assigning a local preference in the route policy entry.

Default 

no local-preference

Parameters 
local-preference—
the local preference expressed as a decimal integer
Values—
0 to 4294967295

 

metric

Syntax 
metric {add | subtract} metric
metric set {igp | metric}
no metric
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

In a BGP import or export policy, this command assigns a Multi-Exit Discriminator (MED) value to routes matched by the policy statement entry. The MED value may be set to a fixed value (overriding the received value), set to the routing table cost of the route that is used to resolve the next hop of the BGP route (the metric set igp command), or modified by adding or subtracting a fixed value offset (the metric add | subtract command).

When used in a BGP export policy, the metric set igp command has the same effect as the med-out igp-cost command (see the 7705 SAR Routing Protocols Guide, “BGP Command Reference”) except that it applies only to the routes matched by the policy entry. The effect of the metric set igp command depends on the BGP policy type and the route type as summarized in Table 99.

Table 99:  Effect of Setting the metric set igp Command 

BGP Policy Type

Matched Route Type

Effect of metric set igp Command

Export

Non-BGP route (for example, static, OSPF, or IS-IS)

Adds the MED attribute and sets it to the metric of the non-BGP route in the routing table manager (RTM)

Export

BGP route without MED

Adds the MED attribute and sets it to the metric of the route or tunnel used to resolve the BGP next hop

Export

BGP route with MED assigned

Overwrites the MED value with the metric of the route or tunnel used to resolve the BGP next hop

The no form of the command removes the MED value from the route policy statement. If a MED value is configured for a BGP peer using the med-out command, that value is used (see the 7705 SAR Routing Protocols Guide, “BGP Command Reference”). If no MED is configured, no MED value is advertised.

Default 

no metric

Parameters 
add —
the specified metric is added to any existing metric. If the result of the addition results in a number greater than 4294967295, the value 4294967295 is used.
subtract—
the specified metric is subtracted from any existing metric. If the result of the subtraction results in a number less than 0, the value of 0 is used.
set—
the specified metric replaces any existing metric
igp—
sets the MED value to the routing table cost of the route that is used to resolve the next hop of the BGP route
metric—
the metric modifier expressed as a decimal integer
Values—
0 to 4294967295

 

next-hop

Syntax 
next-hop ip-address
no next-hop
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command assigns the specified next-hop IP address to routes matching the policy statement entry. If a next-hop IP address is not specified, the next-hop attribute is not changed.

The no form of the command disables assigning a next-hop address in the route policy entry.

Default 

no next-hop

Parameters 
ip-address—
the next-hop IP address
Values—
ipv4-address                  a.b.c.d
ipv6-address                  x:x:x:x:x:x:x:x (eight 16-bit pieces)
                                       x:x:x:x:x:x:d.d.d.d
                                       x - [0..FFFF]H
                                       d - [0..255]D

 

next-hop-self

Syntax 
[no] next-hop-self
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command advertises a next-hop IP address belonging to this router even if a third-party next hop is available to routes matching the policy statement entry.

The no form of the command disables advertising the next-hop-self option for the route policy entry.

Default 

no next-hop-self

origin

Syntax 
origin {igp | egp | incomplete}
no origin
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command sets the BGP origin assigned to routes exported into BGP.

If the routes are exported into protocols other than BGP, this option is ignored.

The no form of the command disables setting the BGP origin for the route policy entry.

Default 

no origin

Parameters 
igp—
sets the path information as originating within the local AS
egp—
sets the path information as originating in another AS
incomplete—
sets the path information as learned by some other means

preference

Syntax 
preference preference
no preference
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command assigns a route preference to routes matching the route policy statement entry.

If no preference is specified, the default route table manager (RTM) preference for the protocol is used.

The no form of the command disables setting an RTM preference in the route policy entry.

Default 

no preference

Parameters 
preference—
the route preference expressed as a decimal integer
Values—
1 to 255 (0 represents unset, MIB only)

 

tag

Syntax 
tag tag
no tag
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command assigns an OSPF, IS-IS, or RIP tag to routes that do not match any entry (for default action) or that match the entry (for action). A decimal or hexadecimal value can be entered.

The no form of the command removes the tag.

Default 

no tag

Parameters 
tag
assigns an OSPF, IS-IS, or RIP tag (decimal or hexadecimal values)
Values—

OSPF and IS-IS:

[0x1...0xFFFFFFFF]H

RIP:

[0x1...0xFFFF]H

 

type

Syntax 
type type
no type
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command assigns an OSPF type metric to routes that do not match any entry (for default action) or that match the entry (for action). The no form of the command disables assigning an OSPF type in the route policy entry.

Default 

no type

Parameters 
type—
specifies the OSPF type metric
Values—
1 — set as OSPF routes with type 1 LSAs
2 — set as OSPF routes with type 2 LSAs

 

6.9.2.2. Show Commands

Note:

The following command outputs are examples only; actual displays may differ depending on supported functionality and user configuration.

policy

Syntax 
policy [name | damping name | prefix-list name |as-path name | community name | admin]
Context 
show>router
Description 

This command displays configured policy statement information.

Parameters 
name—
if a name is provided, the matching policy statement is shown. If no statement name is specified, a list of all policies statements and descriptions are shown.
damping—
displays the damping profile for use in the route policy
prefix-list—
displays the prefix lists configured in the route policy
as-path—
displays AS path regular expression statements used in the route policy
community—
displays community lists used in the route policy
admin—
if this keyword is included, the entire policy option configuration is shown, including any uncommitted configuration changes. This command is similar to the info command.
Output 
Output Example - show router policy

The show router policy command displays all configured route policies.

A:ALU-1# show router policy
===============================================================================
Route Policies
===============================================================================
Policy                          Description 
-------------------------------------------------------------------------------
BGP To OSPF                      Policy Statement For 'BGP To OSPF'
Direct And Aggregate            Policy Statement ABC
-------------------------------------------------------------------------------
Policies : 3
===============================================================================
A:ALU-1#
Output Example - show router policy admin

The show router policy admin command is similar to the info command, which displays information about the route policies and parameters.

A:ALU-1# show router policy admin
    prefix-list "All-Routes"
    prefix 0.0.0.0/0 longer
    prefix 2.0.0.0/8 longer
    prefix 3.0.0.0/8 longer
    prefix 4.0.0.0/8 longer
    prefix 5.0.0.0/8 longer
    prefix 6.0.0.0/8 exact
    prefix 224.0.0.0/24 longer
   exit
   community "65206" members "no-export" "no-export-subconfed"
   community "AS65000" members "701:65000"
   as-path "test" "14001 701"
   as-path "test1" "1234{1,6} (56|47) (45001|2000|1534)* 9+"
   damping "TEST-LOW"
    half-life 22
    max-suppress 720
    reuse 10000
    suppress 15000
   exit
   damping "TEST-HIGH"
    half-life 22
    max-suppress 720
    reuse 1000
    suppress 5000
   exit
   damping "TEST-MEDIUM"
    half-life 22
    max-suppress 720
    reuse 5000
    suppress 11000
   exit
   policy-statement "BGP To OSPF"
    description "Policy Statement For 'BGP To OSPF'"
    entry 10
        description "Entry For Policy 'BGP To OSPF"
        from
            protocol bgp
        exit
        to
            protocol rip
        exit
        action accept
            metric set 1
            next-hop 10.0.18.200
            tag 0x8008135
        exit
    exit
    default-action reject
    exit
    policy-statement "Direct And Aggregate"
        entry 10
            from
                protocol direct
            exit
            to
                protocol bgp
                exit
                action accept
                exit
            exit
            entry 20
            from
                protocol aggregate
            exit
            to
                protocol bgp
            exit
            action accept
            exit
        exit
    exit
...
A:ALU-1#
Output Example - show router policy name

The show router policy name command displays information about a specific route policy.

description "Policy Statement For 'BGP To OSPF'"
    entry 10
     description "Entry For Policy 'BGP To OSPF"
     from
      protocol bgp
     exit
     to
      protocol rip
     exit
     action accept
      metric set 1
      next-hop 10.0.18.200
      tag 0x8008135
     exit
    exit
    default-action reject
A:ALU-1#
Output Example - show router policy damping

The show router policy damping command displays information about the route policy damping configurations.

A:ALU-1# show router policy damping 
=============================================
Route Damping Profiles
=============================================
    damping "TEST-LOW"
     half-life 22
     max-suppress 720
     reuse 10000
     suppress 15000
    exit
    damping "TEST-HIGH"
     half-life 22
     max-suppress 720
     reuse 1000
     suppress 5000
    exit
    damping "TEST-MEDIUM"
     half-life 22
     max-suppress 720
     reuse 5000
     suppress 11000
    exit
=============================================
A:ALU-1#
Output Example - show router policy prefix-list

The show router policy prefix-list command displays a list of configured prefix lists.

A:ALU-1# show router policy prefix-list
==================================
Prefix Lists
==================================
Prefix List Name 
----------------------------------
All-Routes
==================================
A:ALU-1#
Output Example - show router policy prefix-list name

The show router policy prefix-list name command displays information about a specific prefix list.

A:ALU-1# show router policy prefix-list All-Routes
    prefix 0.0.0.0/0 longer
    prefix 2.0.0.0/8 longer
    prefix 3.0.0.0/8 longer
    prefix 4.0.0.0/8 longer
    prefix 5.0.0.0/8 longer
    prefix 6.0.0.0/8 exact
    prefix 224.0.0.0/24 longer
A:ALU-1#
Output Example - show router policy as-path

The show router policy as-path command displays a list of configured AS paths.

A:ALU-1# show router policy as-path
==================================
AS Paths
==================================
AS Path Name
----------------------------------
test
test1
----------------------------------
AS Paths : 2
==================================
A:ALU-1#
Output Example - show router policy as-path name

The show router policy as-path name command displays information about a specific AS path.

A:ALU-1# show router policy as-path test
as-path "test" "14001 701"
Output Example - show router policy community

The show router policy community command displays a list of configured communities.

A:ALU-1# show router policy community
==================================
Communities
==================================
Community Name
----------------------------------
65206
AS701
AS65000
----------------------------------
Communities : 3
==================================
A:ALU-1#
Output Example - show router policy community name

The show router policy community name command displays information about a specific community.

A:ALU-1# show router policy community 65206
community "65206" members "no-export" "no-export-subconfed"
A:ALU-1#
Table 100:  Show Route Policy Output Fields  

Label

Description

Policy

The list of route policy names

Description

The description of each route policy

Policies

The total number of policies configured

Damping Name

The damping profile name

half-life

The half-life parameter for the route damping profile

max-suppress

The maximum suppression value configured for the route damping profile

reuse

The reuse value configured for the route damping profile

suppress

The suppression value configured for the route damping profile

Prefix List Name

The prefix list name and IP address/mask and whether the prefix list entry only matches (exact) the route with the specified ip-prefix and prefix mask (length) values or values greater (longer) than the specified mask

AS Path Name

The list of AS path names

AS Paths

The total number of AS paths configured

Community Name

The list of community names

Communities

The total number of communities configured