Route Policy Command Reference

Command Hierarchies

Route Policy Configuration Commands

config
[no] router
abort
as-path name {regular-expression | null}
— no as-path name
begin
commit
community name members comm-id [comm-id (up to 15 max)]
— 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 [remove name]} | {remove name [add name]} | {replace name}}
— no community
damping {name | none}
— no damping
local-preference preference
metric {add | subtract | set} 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 hex-string
— 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]} | {remove name [add name]} | {replace name}}
— no community
damping {name | none}
— no damping
local-preference preference
metric {add | subtract | set} 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 hex-string
— no tag
type type
— no type
[no] from
area area-id
— no area
as-path name
— no as-path
community name
— 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]

Show Commands

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

Command Descriptions

Configuration Commands

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.

Route Policy Options

as-path

Syntax 
as-path name {regular-expression | null}
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.

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. Allowed values are 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)]
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 no form of the command deletes the community list or the provided community ID.

Default 

no community

Parameters 
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.
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:

as-number:comm-val1 | reg-ex | ext-comm | well-known-comm

Values—
as-number:comm-val1 — the as-number is the Autonomous System Number (ASN), where:
          as-number:                       0 to 65535
          comm-val1:                      0 to 65535
reg-exp — a regular expression string. Allowed values are 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.
ext-comm — where ext-comm is defined as type:{ip-address:comm-val1 | as-number:comm-val2}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-val1:                     0 to 65535
          as-number:                      0 to 65535
          comm-val2:                     0 to 4294967295 (as-number and                                                   comm.-val2 allow the same values                                                   as described above for regular                                                   community values)
well-known-comm — one of the keywords no-advertise, no-export, no-export-subconfed, none

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 creates 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

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:

Half-life: 15 m

Max-suppress: 60 m

Suppress-threshold: 3000

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
Values—
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
Values—
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
Values—
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
Values—
3000

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 IP prefix for the prefix list entry in dotted-decimal notation
Values—
ipv4                  a.b.c.d (host bits must be 0)
prefix-length     0 to 32
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 32
length1 - length2
a route must match the most significant bits and have a prefix-length value within the given range
Values—
0 to 32, length2 > length1 > prefix-length

Route Policy Entry Match Commands

entry

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

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

Multiple entries can be created using unique entries. The 7705 SAR OS 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 creates 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 creates 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 name
no community
Context 
config>router>policy-options>policy-statement>entry>from
Description 

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

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

Default 

no community

Parameters 
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 name specified must already be defined.

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 IP address in dotted-decimal notation
Values—
a.b.c.d
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
Values—
aggregate, bgp, bgp-vpn, direct, igmp, isis, ldp, mld, ospf, ospf3, pim, rip, static
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—
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 the source address that is embedded in the join or prune packet as a filter criterion.

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

Default 

n/a

Parameters 
ip-address—
the IP prefix for the IP match criterion in dotted-decimal notation

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

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 match(es) 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 creates 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-num [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-num—
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 [remove name]} | {remove name [add name]} | {replace name}}
no community
Context 
config>router>policy-options>policy-statement>default-action
config>router>policy-options>policy-statement>entry>action
Description 

This command adds or removes a BGP community list to or from routes matching the route policy statement entry. If no community list is specified, the community path attribute is not changed.

The community list changes the community path attribute according to the add and remove keywords.

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 is added to any existing list of communities
remove—
the specified community list is removed from the existing list of communities
replace—
the specified community list 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 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 
preference—
the local preference expressed as a decimal integer
Values—
0 to 4294967295

metric

Syntax 
metric {add | subtract | set} 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, or modified by adding or subtracting a fixed value offset.

If no metric is specified, the configured metric is used. If neither is defined, no metric will be advertised.

The value assigned for the metric by the route policy is controlled by the required keywords.

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 7705 SAR OS 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-cost—
the MED is set 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 in dotted-decimal notation
Values—
ipv4-prefix                  a.b.c.d (host bits must be 0)
ipv4-prefix-length       0 to 32

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 hex-string
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 tag to routes that do not match any entry (for default action) or that match the entry (for action). A hexadecimal value of 4 octets can be entered.

The no form of the command removes the tag.

Default 

no tag

Parameters 
hex-string
assigns an OSPF tag
Values—
OSPF:      [0x0...0xFFFFFFFF]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

Show Commands

policy

Syntax 
policy [name | damping | 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 
Sample Output - 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#
Sample Output - 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#
Sample Output - 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#
Sample Output - 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#
Sample Output - 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#
Sample Output - 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#
Sample Output - 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#
Sample Output - 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"
Sample Output - 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#
Sample Output - 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 63:  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