Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

metric (Protocols OSPF Interface)

 

Syntax

Hierarchy Level

Release Information

Statement introduced before Junos OS Release 7.4.

Statement introduced in Junos OS Release 9.0 for EX Series switches.

Support for Multitopology Routing introduced in Junos OS Release 9.0.

Support for Multitopology Routing introduced in Junos OS Release 9.0 for EX Series switches.

Support for the realm statement introduced in Junos OS Release 9.2.

Support for the realm statement introduced in Junos OS Release 9.2 for EX Series switches.

Description

Specify the cost of an OSPF interface. The cost is a routing metric that is used in the link-state calculation.

To set the cost of routes exported into OSPF, configure the appropriate routing policy.

Options

metric—Cost of the route.

Range: 1 through 65,535

Default: By default, the cost of an OSPF route is calculated by dividing the reference-bandwidth value by the bandwidth of the physical interface. Any specific value you configure for the metric overrides the default behavior of using the reference-bandwidth value to calculate the cost of the route for that interface.

Required Privilege Level

routing—To view this statement in the configuration.

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