match metric (filter)

Use this command to match a route‘s metric cost value or a range of metric cost values.

Syntax

match metric {cost | range min-cost max-cost}
no match metric {cost | range min-cost max-cost}

Parameters

cost Specifies a metric cost value to match against the metric cost value of the packet for this route filter. Valid values: 1 - 4294967295.
range min-cost max-cost Specifies a range of metric cost values to match against the metric cost value of the packet for this route filter:
  • min-cost - Specifies the start of the metric range.
  • max-cost - Specifies the end of the metric range.

Valid values: 1 - 4294967295.

Defaults

None.

Mode

Route-map filter configuration.

Usage

Apply the filter route-map using the distribute-list route-map in command in OSPF router configuration command mode to prevent route matches from entering the OSPF routing table.

The “no” form of this command removes the match between a metric cost and this route-map.

Examples

This example shows how to match a packet cost metric against the specified value of 100:

System(rw-config)->route-map filter ospf1
System(rw--config-fltr)->match metric 100

This example shows how to match a packet cost metric against the range of metric values from 100 to 200:

System(rw-config)->route-map filter ospf1
System(rw--config-fltr)->match metric range 100 200