Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Default Metric value for static routes in CISCO ?

Hi Floks,

i have basic doubt on metric calculation of the routes in cisco routers.

  1. what was the default metric value for static routes ?
  2. How it is calculated ?

Please share me if there is any link for reference.

thanks and regards,

Rajesh Kumar V

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Gold

I believe that the prior

I believe that the prior response has confused metric with Administrative Distance. A static route does have an Administrative Distance and by default it is 1 and can be set to some different value. Metrics are used by dynamic routing protocols. A static route does not have a metric unless it is being redistributed into a dynamic routing protocol and in that case the assignment of metric is dependent on the particular routing protocol (OSPF does it differently from EIGRP which does it differently from RIP).

 

HTH

 

Rick

11 REPLIES
New Member

  Any comments really helpful

 

 

Any comments really helpful for me . please share your points.

 

thanks

Rajeshkumar V

Hi Rajesh, Default route you

Hi Rajesh,

 

Default route you cannot set it to 0. It can have the metric between 1 to 255.

 

Please do rate for the helpful posts and mark correct answers

 

Thanks

Karthik

New Member

 Thanks karthi.So, Basically

 

Thanks karthi.

So, Basically we cannot use 0 as metric for directly connected route.

In that case we cannot use 0 as the metric for static route  too ?.

I see that many router manufactures  use metric 0 (ad=1 metric=0 [1/0]) for static routes and also standard  mention that non valid metric is -1 and not 0.

 

thanks

Rajesh.

Directly connected can be

Directly connected can be considered as 0 always and static route is with 1 as the default and it differs for each routing protocols.

Route SourceDefault Distance Values
Connected interface0
Static route1
Enhanced Interior Gateway Routing Protocol (EIGRP) summary route5
External Border Gateway Protocol (BGP)20
Internal EIGRP90
IGRP100
OSPF110
Intermediate System-to-Intermediate System (IS-IS)115
Routing Information Protocol (RIP)120
Exterior Gateway Protocol (EGP)140
On Demand Routing (ODR)160
External EIGRP170
Internal BGP200
Unknown*255

 

 

New Member

 thanks a lot karthi.what you

 

thanks a lot karthi.

what you said is exactly correct for Administrative Distance (AD). 

my doubt is in metric point. can we set 0 as a metric for static route ? if yes , how we are determining.

thanks

Rajesh kuamr V

New Member

 example:R1#sh ip route 2.2.2

 

example:

R1#sh ip route 2.2.2.0
Routing entry for 2.2.2.0/24
  Known via "static", distance 1, metric 0 (connected)
  Routing Descriptor Blocks:
  * 12.12.12.2
      Route metric is 0, traffic share count is 1
    directly connected, via Serial0/1

I am not sure you can achieve

I am not sure you can achieve it with static route.... when you redistribute static routes in to dynamic routing protocols you can set a metric for the static route.

But in static route as per my knowledge you cannot do it.

 

Regards

Karthik

New Member

 thanks karthi.i will check

 

thanks karthi.

i will check and update u.

Gold

  1. Default is one. it can

 

 

1. Default is one. it can be overridden

2.Its not calculated. Dynamic protocols calculate metrics. this is static...therefore no calculation. It can be "set" with a configuration command.

 

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_pi/configuration/12-4/iri-12-4-book.html

Hall of Fame Super Gold

I believe that the prior

I believe that the prior response has confused metric with Administrative Distance. A static route does have an Administrative Distance and by default it is 1 and can be set to some different value. Metrics are used by dynamic routing protocols. A static route does not have a metric unless it is being redistributed into a dynamic routing protocol and in that case the assignment of metric is dependent on the particular routing protocol (OSPF does it differently from EIGRP which does it differently from RIP).

 

HTH

 

Rick

New Member

Hi All,Thanks for sharing.i

Hi All,

Thanks for sharing.

i have another question.

 

what was the metric of local route by default. can i set that to 0 ?

please confirm.

27281
Views
6
Helpful
11
Replies
CreatePlease to create content