CCIE Pursuit Blog

March 3, 2009

Lab Tip: Be Careful When Matching Metric Ranges

I was working on a lab task yesterday which asked you to filter all EIGRP routes on a router with a metric between 500,000 and 750,000.  This can be achieved with a distribution-list using a route-map.

You’ll want to make sure that you’re careful when you’re using the metric range option.

RSRack1R3(config-route-map)#match metric 500000 ?
+-              deviation option to match metric in a range
<1-4294967295>  Metric value
<cr>

At first blush, I assumed that I could simply specify ‘match metric 500000 + 250000′.  BUT if you look closely you’ll see that the option is ‘+-” and NOT “+” or “-“

If you try to use “-” (in this example ‘match metric 750000 – 250000′) IOS will alert you to this:

RSRack1R3(config-route-map)#match metric 750000 – 250000
^
% Invalid input detected at ‘^’ marker.

The + option will look like it took and you’ll assume that you’ve match the range 500000 – 750000

RSRack1R3(config-route-map)#match metric 500000 + 250000

But you’ve actually matched the metric range of 250000 – 750000:

RSRack1R3(config-route-map)#do sh run | i match metric
match metric 500000 +- 250000

The “?” is your friend:

RSRack1R3(config-route-map)#match metric 500000 +- ?
<1-4294967295>  deviation value, 500 +- 10 creates the range 490 – 510

To configure the example, you need to halve your deviation value(250,000/2 = 125,000) and then add that value to your lowest value (500,000 + 125,000 = 625,000):

RSRack1R3(config-route-map)#match metric 625000 +- 125000

It’s little things like this that can turn those easy points into lost points. :-(  It’s a good idea to know how to quickly find the command reference for commands like this to clarify the usage, especially if it’s a command that you are unfamiliar with or haven’t used much. Plus the command reference will often contain an example that will help you avoid mistakes like this.  :-)

match metric (IP)

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 113 other followers