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.
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".