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

Actions That Manipulate Route Characteristics

You can specify one or more of the actions listed in Table 16 to manipulate route characteristics.

Table 16: Actions That Manipulate Route Characteristics

Action

Description

as-path-prepend as-path

(BGP only) Affix one or more AS numbers at the beginning of the AS path. If specifying more than one AS number, include the numbers in quotation marks. The AS numbers are added after the local AS number has been added to the path. This action adds AS numbers to AS sequences only, not to AS sets. If the existing AS path begins with a confederation sequence or set, the affixed AS numbers are placed within a confederation sequence. Otherwise, the affixed AS numbers are placed with a nonconfederation sequence. For more information, see Configuring the AS Path Prepend Action.

Beginning with JUNOS Release 9.1, the range that you can configure for AS numbers has been extended to provide BGP support for 4-byte AS numbers as defined in RFC 4893, BGP Support for 4-octet AS Number Space. The JUNOS software continues to support 2-byte AS numbers. For more information about configuring the AS number for the router and BGP, see the JUNOS Routing Protocols Configuration Guide.

as-path-expand last-as count n

(BGP only) Extract the last AS number in the existing AS path and affix that AS number to the beginning of the AS path n times, where n is a number from 1 through 32. The AS number is added before the local AS number has been added to the path. This action adds AS numbers to AS sequences only, not to AS sets. If the existing AS path begins with a confederation sequence or set, the affixed AS numbers are placed within a confederation sequence. Otherwise, the affixed AS numbers are placed within a nonconfederation sequence. This option is typically used in non-IBGP export policies.

class class-name

(Class of service [CoS] only) Apply the specified class-of-service parameters to routes installed into the routing table. For more information, see the JUNOS Class of Service Configuration Guide.

color preference color2 preference

Set the preference value to the specified value. The color and color2 preference values are even more fine-grained than those specified in the preference and preference2 actions. The color value can be a number in the range from 0 through 4,294,967,295 (232 –1). A lower number indicates a more preferred route.

If you set the preference with the color action, the value is internal to the JUNOS software and is not transitive.

For more information about preference values, see the JUNOS Routing Protocols Configuration Guide.

color (add | subtract) number color2 (add | subtract) number

Change the color preference value by the specified amount. If an addition operation results in a value that is greater than 4,294,967,295 (232 –1), the value is set to 232 –1. If a subtraction operation results in a value less than 0, the value is set to 0. If an attribute value is not already set at the time of the addition or subtraction operation, the attribute value defaults to a value of 0 regardless of the amount specified. If you perform an addition to an attribute with a value of 0, the number you add becomes the resulting attribute value.

community (+ | add) [ names ]

(BGP only) Add the specified communities to the set of communities in the route. For more information, see Configuring Communities.

community (– | delete) [ names ]

(BGP only) Delete the specified communities from the set of communities in the route. For more information, see Configuring Communities.

community (= | set) [ names ]

(BGP only) Replace any communities that were in the route in with the specified communities. For more information, see Configuring Communities.

cos-next-hop-map map-name

Set CoS-based next-hop map in forwarding table.

damping name

(BGP only) Apply the specified route-damping parameters to the route. These parameters override the default damping parameters. This action is useful only in an import policy, because the damping parameters affect the state of routes in the routing table.

To apply damping parameters, you must enable BGP flap damping as described in the JUNOS Routing Protocols Configuration Guide, and you must create a named list of parameters as described in Configuring the Damping Action.

destination-class destination-class-name

Maintain packet counts for a route passing through your network, based on the destination address in the packet. You can do the following:

  • Configure group destination prefixes by configuring a routing policy; see Defining Routing Policies and Examples: Routing Policy Configuration.
  • Apply that routing policy to the forwarding table with the corresponding destination class; see Applying Routing Policies to the Forwarding Table. For more information about the forwarding-table configuration statement, see the JUNOS Routing Protocols Configuration Guide.
  • Enable packet counting on one or more interfaces by including the destination-class-usage statement at the [edit interfaces interface-name unit logical-unit-number family inet accounting] hierarchy level (see the JUNOS Class of Service Configuration Guide). See Examples: Routing Policy Configuration.
  • View the output by using one of the following commands: show interfaces destination-class (all | destination-class-name logical-interface-name), show interfaces interface-name extensive, or show interfaces interface-name statistics (see the JUNOS Interfaces Command Reference).
  • To configure a packet count based on the source address, use the source-class statement described in this table.
metric expression
metric multiplier x offset a
metric2 multiplier y offset b

Calculate a metric based on the current values of metric and metric2.

This policy action overrides the current value of the metric attribute with the result of the expression

((x * metric) + a) + ((y * metric2) + b)

where metric and metric2 are the current input values. Metric multipliers are limited in range to eight significant digits.

external type metric

Set the external metric type for routes exported by OSPF. You must specify the keyword type.

forwarding-class forwarding-class-name

Create the forwarding class that includes packets based on both the destination address and the source address in the packet. You can do the following:

  • Configure group prefixes by configuring a routing policy; see Defining Routing Policies and Examples: Routing Policy Configuration.
  • Apply that routing policy to the forwarding table with the corresponding forwarding class; see Applying Routing Policies to the Forwarding Table. For more information about the forwarding-table configuration statement, see the JUNOS Routing Protocols Configuration Guide.
  • Enable packet counting on one or more interfaces by using the procedure described in either the destination-class or source-class actions defined in this table.

install-nexthop <strict> lsp lsp-name

Choose which next hops, among a set of equal LSP next hops, are installed in the forwarding table. Use the export policy for the forwarding table to specify the LSP next hop to be used for the desired routes. Specify the strict option to enable strict mode, which checks to see if any of the LSP next hops specified in the policy are up. If none of the specified LSP next hops are up, the policy installs the discard next hop.

load-balance per-packet

(For export to the forwarding table only) Install all next-hop addresses in the forwarding table and have the forwarding table perform per-packet load balancing. This policy action allows you to optimize VPLS traffic flows across multiple paths. For more information, see Configuring the Load-Balance Per-Packet Action.

local-preference value

(BGP only) Set the BGP local preference (LOCAL_PREF) attribute. The preference value can be a number in the range from 0 through 4,294,967,295 (232 –1).

local-preference (add | subtract) number

Change the local preference value by the specified amount. If an addition operation results in a value that is greater than 4,294,967,295 (232 – 1), the value is set to 232 – 1. If a subtraction operation results in a value less than 0, the value is set to 0. If an attribute value is not already set at the time of the addition or subtraction operation, the attribute value defaults to a value of 0 regardless of the amount specified. If you perform an addition to an attribute with a value of 0, the number you add becomes the resulting attribute value.

For BGP, if the attribute value is not known, it is initialized to 100 before the routing policy is applied.

metric metric metric2 metric metric3 metric metric4 metric

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

(BGP only) metric corresponds to the MED, and metric2 corresponds to the IGP metric if the BGP next hop loops through another router.

metric (add | subtract) number metric2 (add | subtract) number metric3 (add | subtract) number metric4 (add | subtract) number

Change the metric value by the specified amount. If an addition operation results in a value that is greater than 4,294,967,295 (232 – 1), the value is set to 232 – 1. If a subtraction operation results in a value less than 0, the value is set to 0. If an attribute value is not already set at the time of the addition or subtraction operation, the attribute value defaults to a value of 0 regardless of the amount specified. If you perform an addition to an attribute with a value of 0, the number you add becomes the resulting attribute value.

metric (igp | minimum-igp) site-offset

(BGP only) Change the metric (MED) value by the specified negative or positive offset. This action is useful only in an external BGP (EBGP) export policy.

next-hop address (discard | next-table | peer-address | reject | self)

Set the next hop. When the advertising protocol is BGP, you can set the next hop only when any third-party next hop can be advertised; that is, when you are using IBGP or EBGP confederations.

If you specify self, the next-hop address is replaced by one of the local router’s addresses. The advertising protocol determines which address to use. When the advertising protocol is BGP, this address is set to the local IP address used for the BGP adjacency. A router cannot install routes with itself as the next hop.

If you specify peer-address, the next-hop address is replaced by the peer’s IP address. This option is valid only in import policies. Primarily used by BGP to enforce using the peer’s IP address for advertised routes, this option is meaningful only when the next hop is the advertising router or another directly connected router.

If you specify discard, the next-hop address is replaced by a discard next hop.

If you specify next-table, the router performs a forwarding lookup in the specified table.

If you specify reject, the next-hop address is replaced by a reject next hop.

origin value

(BGP only) Set the BGP origin attribute to one of the following values:

  • igp—Path information originated within the local AS.
  • egp—Path information originated in another AS.
  • incomplete—Path information learned by some other means.

preference preference preference2 preference

Set the preference value. You can specify a primary preference value (preference) and a secondary preference value (preference2). The preference value can be a number in the range from 0 through 4,294,967,295 (232 – 1). A lower number indicates a more preferred route.

To specify even finer-grained preference values, see the color and color2 actions in this table.

If you set the preference with the preference action, the new preference remains associated with the route. The new preference is internal to the JUNOS software and is not transitive.

For more information about preference values, see the JUNOS Routing Protocols Configuration Guide.

preference (add | subtract) number preference2 (add | subtract) number

Change the preference value by the specified amount. If an addition operation results in a value that is greater than 4,294,967,295 (232 – 1), the value is set to 232 – 1. If a subtraction operation results in a value less than 0, the value is set to 0. If an attribute value is not already set at the time of the addition or subtraction operation, the attribute value defaults to a value of 0 regardless of the amount specified. If you perform an addition to an attribute with a value of 0, the number you add becomes the resulting attribute value.

priority (low | medium | high)

(OSPF import only) Specify a priority for prefixes included in an OSPF import policy. Prefixes learned through OSPF are installed in the routing table based on the priority assigned to the prefixes. Prefixes assigned a priority of high are installed first, while prefixes assigned a priority of low are installed last. For more detailed information about configuring priority for prefixes included in OSPF import policy, see the JUNOS Routing Protocols Configuration Guide.

Note: OSPF import policy can only be used to set priority or to filter OSPF external routes. If an OSPF import policy is applied that results in a reject terminating action for a nonexternal route, then the reject action is ignored and the route is accepted anyway.

source-class source-class-name

Maintain packet counts for a route passing through your network, based on the source address. You can do the following:

  • Configure group source prefixes by configuring a routing policy; see Defining Routing Policies and Examples: Routing Policy Configuration.
  • Apply that routing policy to the forwarding table with the corresponding source class; see Applying Routing Policies to the Forwarding Table. For more information about the forwarding-table configuration statement, see the JUNOS Routing Protocols Configuration Guide.
  • Enable packet counting on one or more interfaces by including the source-class-usage interface-name statement at the [edit interfaces logical-unit-number unit family inet accounting] hierarchy level (see the JUNOS Network Interfaces Configuration Guide). Also, follow the source-class-usage statement with the input or output statement to define the inbound and outbound interfaces on which traffic monitored for source-class usage (SCU) is arriving and departing (or define one interface for both). The complete syntax is [edit interfaces interface-name unit family inet accounting source-class-usage (input | output | input output) unit-number]. See the example in Examples: Routing Policy Configuration.
  • View the output by using one of the following commands: show interfaces interface-name source-class source-class-name, show interfaces interface-name extensive, or show interfaces interface-name statistics (see the JUNOS Interfaces Command Reference).
  • To configure a packet count based on the destination address, use the destination-class statement described in this table.
  • For a detailed source-class usage example configuration, see the JUNOS Feature Guide.

tag tag tag2 tag

Set the tag value. You can specify two tag strings: tag (for the first string) and tag2. These values are local to the router.

(For OSPF and IS-IS only) The tag actions set the 32-bit tag field in OSPF external link-state advertisement (LSA) packets and the 32-bit flag in the IS-IS IP prefix type length values (TLV).

tag (add | subtract) number tag2 (add | subtract) number

Change the tag value by the specified amount. If an addition operation results in a value that is greater than 4,294,967,295 (232 –1), the value is set to 232 –1. If a subtraction operation results in a value less than 0, the value is set to 0. If an attribute value is not already set at the time of the addition or subtraction operation, the attribute value defaults to a value of 0 regardless of the amount specified. If you perform an addition to an attribute with a value of 0, the number you add becomes the resulting attribute value.


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