cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3597
Views
5
Helpful
9
Replies

What set metric command does in RIPv2

Hello guys

I've been working on some project in Cisco Packet tracer for last few days.I build my network,set every addresses and conections between routers etc.Today I started dealing with metrics (Im using RIPv2 protocol in all routers) and I got a bit confused.I understand that in RIP protocol metrics mean amount of hops and by default it is 15 nad 16 will be dropped.But when I changed it to 3 I still could ping networks that were more than 3 hops away.So my question is what exectly set metric does in RIPv2 protocol ?

Thanks

1 Accepted Solution

Accepted Solutions

Hello BogusLaw,

see the following command reference for route-map commands

https://www.cisco.com/c/en/us/td/docs/ios/iproute_pi/command/reference/iri_book/iri_pi1.html

 

I think in your case you should use something like

 

router rip

distribute-list route-map 1 out eth1

 

However, the meaning is the same it can set the metric for updates sent out of Eth1, but does not provide an upper limit to metric.

 

Hope to help

Giuseppe

 

View solution in original post

9 Replies 9

luis_cordova
VIP Alumni
VIP Alumni

Hi @BoguslawKowalski3556 ,

 

Could you share an image of the command you enter to set the metric in RIPv2?

 

Regards

Hi,thanks for your Reply

Here's the whole command I entered
router rip
version 2
network 173.23.11.80/28
network 173.23.11.16/28
network 173.23.11.32/28
route-map 1 out eth1
route-map 1 permit 10
set metric 3

Regards

Hello BogusLaw,

see the following command reference for route-map commands

https://www.cisco.com/c/en/us/td/docs/ios/iproute_pi/command/reference/iri_book/iri_pi1.html

 

I think in your case you should use something like

 

router rip

distribute-list route-map 1 out eth1

 

However, the meaning is the same it can set the metric for updates sent out of Eth1, but does not provide an upper limit to metric.

 

Hope to help

Giuseppe

 

Ok I understood everything.Thank you for your help
Regards

delasandro
Level 1
Level 1

When u set the metric in Rip it does not mean that router is set for only X number of hops techs usually set it at a standard 5. Try setting it to 1 u should still be able to ping all rip routers.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello BogusLaw,

the normal use of the command set metric for RIPv2 is inside a route-map for redistribution.

 

Example:

ip access-list 10 192.168.10.0 0.0.0.255

 

route-map RED-CONN permit 10

match address 10

set metric 3

!

 

router rip

version 2

redistribute connected route-map RED-CONN

!

In this context the set metric command provides the so called seed metric: the redistributed route will have an initial metric of 3.

For the way RIP works this means that the route will be advertised and will be reachable and usable ten router hop away.

In any case, the set metric does not provide an upper limit for the metric in RIP but instead it provides the initial/seed metric for routes injected into RIP  via redistribution (external routes, but RIP is not able to discriminate external routes from internal routes, this is possible for EIGRP or OSPF).

 

 

Hope to help

Giuseppe

 

 

 

Hello,thanks for your reply,
It helped me a lot with understanding how metric in RIP works.I only have last question.Which of these two lines defines that my route will be advertised ten router hop away only?
route-map RED-CONN permit 10 or
match address 10 ?
My guess is that will be the one with permit 10 but I want to make sure.

Regards

The RIP metric is composed of hop count, and the maximum valid metric is 15. Anything above 15 is considered infinite; you can use 16 to describe an infinite metric in RIP. When redistributing a protocol into RIP, Cisco recommends that you use a low metric, such as 1. A high metric, such as 10, limits RIP even further. If you define a metric of 10 for redistributed routes, these routes can only be advertised to routers up to 5 hops away, at which point the metric (hop count) exceeds 15. By defining a metric of 1, you enable a route to travel the maximum number of hops in a RIP domain. But, doing this increases the possibility of routing loops if there are multiple redistribution points and a router learns about the network with a better metric from the redistribution point than from the original source, as explained in the Administrative Distance section of this document. Therefore, you have to make sure that the metric is neither too high, preventing it from being advertised to all the routers, or too low, leading to routing loops when there are multiple redistribution points.

 

I found this its why we just take a medium 5 or even lower as u see is actually better. Metric 3 does not mean rip can reach routers 3 hops away.

 

route-map RED-CONN permit 10 

match address 10 ?

your above config is telling your route-map to permit whatever ACL #10 is saying to do this has nothing to do w/RIPv2 metric.

Hello BogusLaw,

as explained well by delasandro the complete configuration of my example included a set metric 3.

All the commands together contribute to the example

 

route-map RED-CONN permit 10  !  defines a route-map clause routes matching will be redistributed

match address 10  ! defines which subnets will be a match only those with a permit in ACL 10

set metric 3 !  defines the seed/initial metric and can limit the scope of the route because max usable is 15

 

router rip

redistribute connected route-map RED-CONN

!

 

RIP has no knowledge of external routes, it cannot understand if a route was generated with a network command or it is coming from a redistribution.

 

Again the seed metric that is chosen is just the initial metric of the route.

 

Hope to help

Giuseppe

 

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:

Review Cisco Networking products for a $25 gift card