1

RIP routing protocol use the distance vector routing algorithm that mean each router will share the distance information,But how can this distance information help the router to know where to forward the data?

For example just say : R1->R2->R3->R4

From R1 to go to R4, the distance is 2 because it will go through two hops, but how can this distance information help the router to route the data?

1
  • Has any answer solved your question? Then please accept it or your question will keep popping up here forever. Please also consider voting for useful answers.
    – Zac67
    Dec 9, 2023 at 14:11

1 Answer 1

1

A routing protocol like RIP helps create a routing table that is used to make routing decisions. For R1 and R4 that is trivial, but R2 and R3 need to decide which interface to use. R2 learns from R3 where the network between R3 and R4 is located.

Distance or cost/metric is used to decide when there are multiple paths to a destination. If you connected R1 and R4, packets could go either way. The path with the lowest cost is chosen to enable efficient routing and avoid routing loops. A packet from R1 to R4 would use the direct link (cost 1) instead of R1-R2-R3-R4 (cost 3).

Link speeds are used to calculate distance/cost, so it's actually not just the hop count but the sum of the inverse link rates (some constant divided by the individual link rate).

1
  • Thanks for the explanation sir
    – Darevil294
    Dec 9, 2023 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.