Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

metric (Policy Action)

date_range 20-Nov-23

Syntax

content_copy zoom_out_map
metric (add add | aigp | expression  expression | igp metric_offset  | minimum-igp metric_offset | subtract subtract)

Hierarchy Level

content_copy zoom_out_map
[edit policy-options policy-statement policy-name term term-name then ],
[edit policy-options policy-statement policy-name then ]

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.

footer-navigation