RIP hop count

kpjunglekpjungle Member Posts: 426
Hi all,

I found a thing that puzzled me at first, and wanted to get some input on it.
I have a simple topology with three routers in a "string", running standard RIP (also tried with RIPv2 because it also summarizes by default):

R1 <--> R2 <--> R3

I have a loopback on R1 which im advertising into the RIP process. However, I noticed that when the route on the loopback on R1 reaches both R2 and R3, it only had a hop count of 1.

As far as I can tell, this behavior is due to the fact that each router summarizes on the major network boundary by default.

When not summarizing (no auto-summary), it correctly lists up in R3 as a hop count of 3. Can anyone else confirm that this is the "correct" behavior?
Studying for CCNP (All done)

Comments

  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    Works as expected for me running on a 3550, bye the way i'm sure you meant a R3 has a hop count of 2 rather than 3 with auto-summary enabled.
    Generally the summary should take the worst metric of the child routes.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • kpjunglekpjungle Member Posts: 426
    EdTheLad wrote: »
    Works as expected for me running on a 3550, bye the way i'm sure you meant a R3 has a hop count of 2 rather than 3 with auto-summary enabled.
    Generally the summary should take the worst metric of the child routes.

    Hi Ed, Right, meant 2.

    I figured out the problem though:

    7200emu.hacki.at :: View topic - RIP hop count/metric Problem?

    Even though I tried it on 3640's (real hardware), I had the same problem. Doing it on my 2610's (also real hardware), it works as advertised. Weird...
    Studying for CCNP (All done)
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    Just a bug, after doing software regression testing on cisco kit, nothing new icon_smile.gif.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • BennyLavaBennyLava Member Posts: 60 ■■□□□□□□□□
    I ran into this same problem using IOS 12.4.18. I tried a few others and the only one of my IOS that it didn't happen on was 12.4.20T. I'm not sure what exact versions of IOS are used on the CCIE lab but the only info I could find on cisco.com was 12.4 mainline. Does this mean that there is a good chance that we will have to deal with RIP working this way on the lab?

    Also, EdTheLad are you sure RIP uses the worst metric of child routes as the metric for the summary? From what I've seen so far it has always used the best metric of any child route within it's range.
  • kpjunglekpjungle Member Posts: 426
    BennyLava wrote: »
    I ran into this same problem using IOS 12.4.18. I tried a few others and the only one of my IOS that it didn't happen on was 12.4.20T. I'm not sure what exact versions of IOS are used on the CCIE lab but the only info I could find on cisco.com was 12.4 mainline. Does this mean that there is a good chance that we will have to deal with RIP working this way on the lab?

    Also, EdTheLad are you sure RIP uses the worst metric of child routes as the metric for the summary? From what I've seen so far it has always used the best metric of any child route within it's range.

    By child routes, you mean any routes more specific to the summarization?
    If so, I think it will use the best metric.

    I did an offset list on R1 to R2, i also created a loopback interface on R2 with a more specific address, so in the table of R2 I had:

    12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
    R 12.12.12.0/24 [120/5] via 192.168.12.1, 00:00:16, Serial0/0
    C 12.12.12.16/28 is directly connected, Loopback10

    Now, the summary is 12.0.0.0/8.. it will get advertised to R3 with a metric of 1 (connected interface + 1):
    R 12.0.0.0/8 [120/1] via 192.168.12.17, 00:00:12, Serial0/0
    Studying for CCNP (All done)
  • BennyLavaBennyLava Member Posts: 60 ■■□□□□□□□□
    Yes, I was referring to more specific routes within the summarization range and my results were the same as yours.

    A couple other things I found about the hop count bug are that it happens to manually summarized routes as well as auto summary routes and it only seems to happen if 1 or more child routes have a metric of 1. If all child route metrics are > 1, the hop count increments like normal.

    Here R1 is advertising a few loopbacks to R2. All 3 routers are configured with no auto-summary. If I create a summary address on R2 on the R2-R3 link for R1's loopbacks the metric is now advertised as 1 even though all child routes were previously advertised as 2


    R2(config-if)#
    *Mar 1 00:06:28.003: RIP: received v2 update from 10.0.12.1 on Serial0/0
    *Mar 1 00:06:28.003: 1.1.1.0/24 via 0.0.0.0 in 1 hops
    *Mar 1 00:06:28.007: 1.1.2.0/25 via 0.0.0.0 in 1 hops
    *Mar 1 00:06:28.007: 1.1.3.0/26 via 0.0.0.0 in 1 hops
    *Mar 1 00:06:28.007: 1.1.4.0/27 via 0.0.0.0 in 1 hops
    *Mar 1 00:06:28.011: 1.1.5.0/28 via 0.0.0.0 in 1 hops
    R2(config-if)#
    *Mar 1 00:06:44.291: RIP: sending v2 update to 224.0.0.9 via Serial0/1 (10.0.23.2)
    *Mar 1 00:06:44.291: RIP: build update entries
    *Mar 1 00:06:44.291: 1.1.1.0/24 via 0.0.0.0, metric 2, tag 0
    *Mar 1 00:06:44.295: 1.1.2.0/25 via 0.0.0.0, metric 2, tag 0
    *Mar 1 00:06:44.295: 1.1.3.0/26 via 0.0.0.0, metric 2, tag 0
    *Mar 1 00:06:44.295: 1.1.4.0/27 via 0.0.0.0, metric 2, tag 0
    *Mar 1 00:06:44.295: 1.1.5.0/28 via 0.0.0.0, metric 2, tag 0
    *Mar 1 00:06:44.299: 10.0.12.0/24 via 0.0.0.0, metric 1, tag 0
    R2(config-if)#
    R2(config-if)#ip summary-address rip 1.1.0.0 255.255.248.0
    R2(config-if)#
    *Mar 1 00:06:46.983: RIP: sending v2 flash update to 224.0.0.9 via Serial0/0 (10.0.12.2)
    *Mar 1 00:06:46.983: RIP: build flash update entries - suppressing null update
    *Mar 1 00:06:46.983: RIP: sending v2 flash update to 224.0.0.9 via Serial0/1 (10.0.23.2)
    *Mar 1 00:06:46.987: RIP: build flash update entries
    *Mar 1 00:06:46.987: 1.1.0.0/21 via 0.0.0.0, metric 1, tag 0




    R2(config-if)#do sh ip rou | b Gate
    Gateway of last resort is not set

    1.0.0.0/8 is variably subnetted, 5 subnets, 5 masks
    R 1.1.1.0/24 [120/1] via 10.0.12.1, 00:00:13, Serial0/0
    R 1.1.2.0/25 [120/1] via 10.0.12.1, 00:00:13, Serial0/0
    R 1.1.3.0/26 [120/1] via 10.0.12.1, 00:00:13, Serial0/0
    R 1.1.4.0/27 [120/1] via 10.0.12.1, 00:00:13, Serial0/0
    R 1.1.5.0/28 [120/1] via 10.0.12.1, 00:00:13, Serial0/0
    10.0.0.0/24 is subnetted, 2 subnets
    C 10.0.12.0 is directly connected, Serial0/0
    C 10.0.23.0 is directly connected, Serial0/1


    R3(config-router)#do sh ip rou | b Gate
    Gateway of last resort is not set

    1.0.0.0/21 is subnetted, 1 subnets
    R 1.1.0.0 [120/1] via 10.0.23.2, 00:00:04, Serial0/0
    10.0.0.0/24 is subnetted, 2 subnets
    R 10.0.12.0 [120/1] via 10.0.23.2, 00:00:04, Serial0/0
    C 10.0.23.0 is directly connected, Serial0/0






    If the child routes are received on R2 with a hop count of 2, the metric of the summary address continues incrementing


    R1(config)#router rip
    R1(config-router)#offset-list 0 out 1 s0/0


    R2(config-if)#
    *Mar 1 00:13:59.891: RIP: received v2 update from 10.0.12.1 on Serial0/0
    *Mar 1 00:13:59.891: 1.1.1.0/24 via 0.0.0.0 in 2 hops
    *Mar 1 00:13:59.895: 1.1.2.0/25 via 0.0.0.0 in 2 hops
    *Mar 1 00:13:59.895: 1.1.3.0/26 via 0.0.0.0 in 2 hops
    *Mar 1 00:13:59.899: 1.1.4.0/27 via 0.0.0.0 in 2 hops
    *Mar 1 00:13:59.899: 1.1.5.0/28 via 0.0.0.0 in 2 hops
    R2(config-if)#
    *Mar 1 00:14:01.895: RIP: sending v2 flash update to 224.0.0.9 via Serial0/0 (10.0.12.2)
    *Mar 1 00:14:01.895: RIP: build flash update entries - suppressing null update
    *Mar 1 00:14:01.895: RIP: sending v2 flash update to 224.0.0.9 via Serial0/1 (10.0.23.2)
    *Mar 1 00:14:01.895: RIP: build flash update entries
    *Mar 1 00:14:01.895: 1.1.0.0/21 via 0.0.0.0, metric 3, tag 0
    R2(config-if)#



    R2(config-if)#do sh ip rou | b Gate
    Gateway of last resort is not set

    1.0.0.0/8 is variably subnetted, 5 subnets, 5 masks
    R 1.1.1.0/24 [120/2] via 10.0.12.1, 00:00:05, Serial0/0
    R 1.1.2.0/25 [120/2] via 10.0.12.1, 00:00:05, Serial0/0
    R 1.1.3.0/26 [120/2] via 10.0.12.1, 00:00:05, Serial0/0
    R 1.1.4.0/27 [120/2] via 10.0.12.1, 00:00:05, Serial0/0
    R 1.1.5.0/28 [120/2] via 10.0.12.1, 00:00:05, Serial0/0
    10.0.0.0/24 is subnetted, 2 subnets
    C 10.0.12.0 is directly connected, Serial0/0
    C 10.0.23.0 is directly connected, Serial0/1


    R3(config-router)#do sh ip route | b Ga
    Gateway of last resort is not set

    1.0.0.0/21 is subnetted, 1 subnets
    R 1.1.0.0 [120/3] via 10.0.23.2, 00:00:08, Serial0/0
    10.0.0.0/24 is subnetted, 2 subnets
    R 10.0.12.0 [120/1] via 10.0.23.2, 00:00:19, Serial0/0
    C 10.0.23.0 is directly connected, Serial0/0
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    BennyLava wrote: »
    Also, EdTheLad are you sure RIP uses the worst metric of child routes as the metric for the summary? From what I've seen so far it has always used the best metric of any child route within it's range.

    I assumed it would have used the worst metric, but as we all know we shouldn't assume when it comes to this networking lark.
    I've also done a quick test and i've seen the best metric is used for the summary, and if a child of the summary has a metric 1, the summary will be advertised with metric 1 rather than 2.
    Currently using c3640-js-mz.123-26 , so might look later with the 3550s running IE ios.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • thavamanithavamani Registered Users Posts: 2 ■□□□□□□□□□
    hi all,

    could any one tell the reason for the maximum hop count limit is set as 15 in rip? why not any other number taken as the maximum hop count limit.
  • pham0329pham0329 Member Posts: 556
    Should you have a loop, it's to prevent the packet from looping around the network forever.
  • dredlorddredlord Member Posts: 172
    the 15 hops is an arbitrary value defined in the protocol, which aims to prevent rooting loops, the value is low due to the fact that RIP was originally designed for much smaller networks. Also the larger the network the more it becomes evident that the metric used by RIP (Hop count) does not scale well to diverse bandwidth links. Example if between the source and destination there is a 2 hop route over a slow 10Mbp/s connection, RIP will select this route as opposed to a 3 hop 1Gbp/s route (One can solve this by using offset lists to add a integer value to the metric). Hence RIP is inherently restricted by design to smaller networks. More information can be found in RFC 1058, and RFC 2453
  • thavamanithavamani Registered Users Posts: 2 ■□□□□□□□□□
    Thank you dredlord but i am not able to get you clearely, still i've some confussion that why they sets the maximum limit of the hop count is particularly 15. why they didn't take some other number thats my confussion.


    thanks & regards,
    Thavamani
Sign In or Register to comment.