Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

metric (Policy Action)

Syntax

Hierarchy Level

Description

Specify this CLI policy action in an import or export policy to set the metric value to one of the following options as per your network requirement.

Options

add add

Specify a constant that should be added to the metric value. Use this option if you want to increase the metric of a route.

expression

Calculate the metric value based on the route metric and metric2.

igp metric_offset

Configure this option to set the IGP metric for BGP. Specify a metric offset to increase or decrease the calculated IGP metric.

minimum-igp metric_offset

Configure this option to set the minimum IGP metric for BGP.

aigp

Configure this option to set IGP metric to the accumulated interior gateway protocol (AIGP) metric value if an AIGP attribute has been configured. Specify this value in an export policy to redistribute BGP routes to an IGP, such as the OSPF protocol.

subtract subtract

Specify a constant that must be subtracted from the metric value. Use this option if you want to decrease the metric of a route.

Required Privilege Level

routing—To view this statement in the configuration.

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

Release Information

Statement introduced in Junos OS Release 16.1.