0

I am doing a simulation of the network topology.

I found that when using the rip protocol, the ipRouteMetric1 value is 1. I use this value to determine the device near the current router. When using the ospf protocol, the value of the nearby router ipRouteMetric1 is 2.

I can't understand why the data is so different based on the ipRouteTable generated by different protocols. I would like to know if there will be new differences for other protocols, such as bgp.

trgbishi
  • 55
  • 1
  • 2
  • 10
  • Make the network bigger, and add loops. You will see that the metric values basically tell the distance of the quickest path to that route. – Ferrybig Sep 06 '19 at 06:25
  • I know that in fact my question is not because the metric has a value of 2. I just think that the metric between two adjacent routers should be 1, and the ospf protocol shows this value as 2, which I doubt. In addition, when I tested the **ip route-static** command, I found that the metric is even 0. – trgbishi Sep 06 '19 at 06:43

1 Answers1

0

The RFC1213-MIB https://www.rfc-editor.org/rfc/rfc1213 is quite SPECIFIC in its vagueness:

"The semantics of this metric are determined by the routing-protocol specified in the route's ipRouteProto value."

So, you have to look at the protocol specs for the particular routing protocol to understand the metric calculation. A Google for OSPF metric explains the metric calculated based on "cost".

Community
  • 1
  • 1
Gambit Support
  • 1,432
  • 1
  • 7
  • 17