cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7137
Views
5
Helpful
21
Replies

Set metric +/-<metric>

Jonn cos
Level 4
Level 4

Hi all.

In route-map, while redistribution or distribute list, when i was configuring the metric, i came across this paramter,

Router(config)#route-map test
Router(config-route-map)#set metric ?
+/-<metric>     Add or subtract metric
  <0-4294967295>  Metric value or Bandwidth in Kbits per second
  <cr>

Can some one tell what this parameter +/-<metric> does ? can someone give an example how it works. In eigrp, i tried to apply to incoming route but it didnt work at small values like 100,90,63, but as soon as i gave it a value like 6000, it increased the incoming prefix metric !

Any idea how this paramter works ?

1 Accepted Solution

Accepted Solutions

Hello Jonn,

>> hall only be added to delay but eigrp topology should be showing the complete metric including BWmin and not only 256* (delay+2000) isnt it ?

yes I've noticed it looks like more a substitution rather then an adding to previous link.

I couldn't find a reference for this

my only reference is that set metric + is suggested for other routing protocols

The + and – keywords enable you to increase or decrease the current metric. To increase the metric by 10,

for example, the command would be set metric +10. To set just the composite metric for EIGRP, the

command is set metric 4295

(from CCIE pratical studies volume II )

Hope to help

Giuseppe

View solution in original post

21 Replies 21

Jon Marshall
Hall of Fame
Hall of Fame

Jonn.cos88 wrote:

Hi all.

In route-map, while redistribution or distribute list, when i was configuring the metric, i came across this paramter,

Router(config)#route-map test
Router(config-route-map)#set metric ?
+/-     Add or subtract metric
  <0-4294967295>  Metric value or Bandwidth in Kbits per second
 

Can some one tell what this parameter +/- does ? can someone give an example how it works. In eigrp, i tried to apply to incoming route but it didnt work at small values like 100,90,63, but as soon as i gave it a value like 6000, it increased the incoming prefix metric !

Any idea how this paramter works ?

Jon

With EIGRP the metric is the "cost" of the route to a destination. Different protocols use different metrics eg. RIP uses hop count. EIGRP uses 5 separate inputs to derive a metric. What you can do is add or subtract a value from the advertised metric if you wanted to influence which routes were selected by the router.

Jon

Jon,

You meant that with OSPF the metric is the cost correct (not EIGRP)?

Federico.

coto.fusionet wrote:

Jon,

You meant that with OSPF the metric is the cost correct (not EIGRP)?

Federico.

Federico

That was why i put cost in inverted quotes ie. "cost". A metric is a cost to a destination whether that be a hop count, OSPF outgoing interface cost or EIGRP delay, bandwidth etc..

Jon

Jon,

I know that you're right.

The metric is the cost for all routing protocols, being ''cost'' the actual method implemented in each routing protocol (RIP - hop count, EIGRP - bandwidth and delay by default,etc)

But in OSPF usually the metric is referrenced to as ''cost''' (while at least in Cisco implementations this cost is the bandwidth).

So, normally when you say ''cost'' for a metric you're referring to OSPF, eventhough we know that there's no such thing as cost. Cost just refers to something like bandwitdh or something else depending on the implementation.

At least, this is what I've seen ;p

Federico.

Dear Jon,

in route-map, when i am setting the metric, that part is clear to me. But i am confused about "+/-" parameter. Can you give me a working example as to how will i use this parameter with eigrp ? I tried this on the following scenario, pls take a look

R1-- is connected to-- R2

R1 is advertising a loopback to R2 which prefix is 40.0.0.0/8 as shown below

R2# sh ip route

Gateway of last resort is not set

D    40.0.0.0/8 [90/409600] via 10.0.0.1, 00:00:04, Ethernet0/0
C    10.0.0.0/8 is directly connected, Ethernet0/0
R3#

No i configured route-map "test" and did the following configuration

R2#sh access-lists 1
Standard IP access list 1
    10 permit 40.0.0.0 (2 matches)
R2#sh route-m
R2#sh route-map test
route-map test, permit, sequence 10
  Match clauses:
    ip address (access-lists): 1
  Set clauses:
   metric +100
  Policy routing matches: 0 packets, 0 bytes

R2# sh run | sec eigrp

router eigrp 1
network 10.0.0.0
distribute-list route-map test in
auto-summary
R2#

Now the show ip route is still the same

Gateway of last resort is not set

D    40.0.0.0/8 [90/409600] via 10.0.0.1, 00:03:39, Ethernet0/0
C    10.0.0.0/8 is directly connected, Ethernet0/0

R2#

Now as soon as i configure the following (i did it randomly)

R2(config)#route-map test
R2(config-route-map)#set metric +90000
R2(config-route-map)#end
R2#clear ip route *
R2#
*Mar  1 00:17:55.731: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.0.0.1 (Ethernet0/0) is resync: route configuration changed
R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

D    40.0.0.0/8 [90/23040000] via 10.0.0.1, 00:00:03, Ethernet0/0
C    10.0.0.0/8 is directly connected, Ethernet0/0
R2#

See the difference in metric value ! how this happened ? its confusing, why +100 didnt do anything while +90000 changed the metric value ?

Pls help me out !

Thanks in advance

Hello Jonn,

you need to consider the specific characteristics of EIGRP metric:

it is proportional to the sum of delays on path and inversely proportional to the lowest bandwidth on path with default K values.

BWmin = minimum BW on all links on path to destination

EIGRP metric = 256 * (sum of delays in ten of microseconds)  + 256 * (10^7/BWmin [kbps])

so the set metric +value can apply only to the delay component of metric

when you use set metric +90000 this means that you add 256*90000 = 23040000

when you use set metric +100 you add 256*100 = 25600

also you should look at a device downstream to the router where you use the distribution list that invokes the route-map with the set metric +value not on the device itself

Hope to help

Giuseppe

Dear Giuseppe,

Thanks alot for the reply,

I am bit weak in maths so pls dont mind and pls help me understand this.

EIGRP metric formula is following

256* [(10^7/BWmin) + cumulative delay]

so when i am writing set metric +100 for example, i am getting the following in topology table,

then i am not getting any difference its the same with or without +100

R2#sh ip ei topology
IP-EIGRP Topology Table for AS(1)/ID(10.0.0.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 10.0.0.0/8, 1 successors, FD is 281600
        via Connected, Ethernet0/0
P 40.0.0.0/8, 1 successors, FD is 409600
        via 10.0.0.1 (409600/128256), Ethernet0/0

And now when i chang the statement to set metric +2000 the result is (like you said) 256*2000 = 512000

R2#sh ip ei topology
IP-EIGRP Topology Table for AS(1)/ID(10.0.0.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 10.0.0.0/8, 1 successors, FD is 281600
        via Connected, Ethernet0/0
P 40.0.0.0/8, 1 successors, FD is 409600
        via 10.0.0.1 (512000/128256), Ethernet0/0
R2#

This is confusing me. FD is 409600, where as the value is shown as 512000 !! ? where did the BW go ? the entire metric compose of BW and delay but when i add 2000 why its just showing me calculated delay (256*2000) in topology ? should'nt it be something like

256* [(10^7 / BWmin) + (delay +2000)] ???

Sir i know i am being very stupid or missing something very basic but pls solve my confusion.

Hello Jonn,

>> Sir i know i am being very stupid or missing something very basic but pls solve my confusion.

you are not stupid, as explained by Jon the objective of the command is to modify the metric.

How this is implemented is protocol dependent.

In the case of EIGRP we are seeing a threshold effect: metric is changed only if the +value is greater then X

I would suggest to try to use values in the range of 256, I suspect that this can be the threshold

but again you should look at the effect on a downstream router to validate your tests.

Hope to help

Giuseppe

Dear Sir, 2 confusions

1) Why in eigrp FD is shown as 409600 where as in success entry its shown (512000/128256) ?

2) The value 512000 came after calculating 256*2000 right ? so why didnt BW was included in this calculation ? i mean the whole metric is formed using BW and delay so why is it showing only (delay * 2000) +256 ?

I tried to find any cisco doc but none was found.

Pls spare some of your time and help me clear it.

Hello Jonn,

the FD is the best metric to prefix, EIGRP remembers the old value as it comes from an upstream router (R1)

edit:

this comes from EIGRP state machine for prefixes DUAL, the FD is not changed after a small increase so don't worry about this.

let's stay focused on the effects we are looking for

the effect of the command is seen on the second line

again I would look at R3 for the effects.

the threshold effect is probably present, we also see an effect of substitution rather then adding

you should see the effects on downstream router not on R2 but on R3.

Hope to help

Giuseppe

Jonn cos
Level 4
Level 4

Dear Sir,

And what about the 2nd point pls ? i understand that the added value (+2000) shall only be added to delay but eigrp topology should be showing the complete metric including BWmin and not only 256* (delay+2000) isnt it ?

Hello Jonn,

>> hall only be added to delay but eigrp topology should be showing the complete metric including BWmin and not only 256* (delay+2000) isnt it ?

yes I've noticed it looks like more a substitution rather then an adding to previous link.

I couldn't find a reference for this

my only reference is that set metric + is suggested for other routing protocols

The + and – keywords enable you to increase or decrease the current metric. To increase the metric by 10,

for example, the command would be set metric +10. To set just the composite metric for EIGRP, the

command is set metric 4295

(from CCIE pratical studies volume II )

Hope to help

Giuseppe

Dear Sir, although its still confusing, i do appreciate your help and time for helping me out.

Pls keep up the spirit.

Hi all,

Here is an interesting finding

without route-map

R1#sh ip eigrp topology 10.55.1.0 255.255.255.0
IP-EIGRP (AS 100): Topology entry for 10.55.1.0/24
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 409600
  Routing Descriptor Blocks:
  1.1.1.2 (FastEthernet0/0), from 1.1.1.2, Send flag is 0x0
      Composite metric is (409600/128256), Route is Internal
      Vector metric:
        Minimum bandwidth is 10000 Kbit
        Total delay is 6000 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 1
R1#

with route-map +11000

R1#sh ip eigrp topology 10.55.1.0 255.255.255.0
IP-EIGRP (AS 100): Topology entry for 10.55.1.0/24
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2816000
  Routing Descriptor Blocks:
  1.1.1.2 (FastEthernet0/0), from 1.1.1.2, Send flag is 0x0
      Composite metric is (2816000/128256), Route is Internal
      Vector metric:
        Minimum bandwidth is 909 Kbit
        Total delay is 0 microseconds
        Reliability is 0/255
        Load is 0/255
        Minimum MTU is 0
        Hop count is 1

observe that when the route-map is applied delay is made "zero" and the bandwidth is lowered to 909 which is calculated as 10000000/11000 =909

but when you do 256*909 the result is 232704 which is not equal to what the FD 2816000 is ..?

  so when you use route-map with set +100 the bandwidth 10000000/100 = 100000 which is equal to the current bandwidth so it doesnt makes any changes. but still new question is why the metric is different in my calculations...??

More intereting thing is when you change the metric weights to use only delay by using metric weight 0 0 0 1 0 0, the route map does nothing

I m trying ... see if anyone can come with some idea...

HTH

Hitesh Vinzoda

Please rate useful posts

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco