2

What (I think) I know:

  • RIP uses a distance vector routing approach, where each node sends to its neighbors the number of hops one should take to get to other routes if one "started" from that particular node.
  • OSPF uses a link-state routing approach, where the costs inherent to each link between nodes is taken into account and not the number of hops. Each node performs flooding to advertise the costs of the links adjacent to it. When all the nodes have all the information about the whole network, each one performs the Dijkstra's Algorithm using themselves as source nodes to get the shortest paths.
  • In RIP, nodes advertise only to neighbors. In OSPF, according to Stallings' Data and Computer Communications, routers advertise the set of link costs to all other routers in the topology, not just neighboring routers.

What I don't understand:

  • If RIP and OSPF used the same metric, would the results be the same? I mean, why would there be a difference if all routers know the whole topology or not? Wouldn't the information coming from neighbors be enough, as it carries information from the neighbors of neighbors, neighbors of neighbors of neighbors, and so on?
  • I have read that in OSPF there is something called designated router (DR). This means that all routers send their costs to the DR instead of flooding them to all routers in the network. But isn't this against the concept of link-state routing, where in theory each router advertises to all of the rest?
  • If there is a DR that is not directly connected to each router in the network, then some non-DR would recieve information about other routers and forward it towards the DR. This means that routers that are not the DR would recieve information from others as well, despite being common routers. Is this information used, or do they just forward it without processing it as they are only waiting for orders from the DR?
  • You cannot compare metrics between different routing protocols. Different routing protocols have different metrics. – Ron Maupin Feb 15 '18 at 15:09
2

If RIP and OSPF used the same metric, would the results be the same? I mean, why would there be a difference if all routers know the whole topology or not?

The (well, one of the) advantages of the OSPF metric is that it takes into consideration that some links may be better than others. In RIP, all links are the same. but in OSPF, one link may have higher bandwidth and be preferred over another link. The metric lets you indicate that.

Distance vector has other problems which require "fixes" like split-horizon and poison reverse, which are not needed in OSPF.

I have read that in OSPF there is something called designated router (DR). This means that all routers send their costs to the DR instead of flooding them to all routers in the network. But isn't this against the concept of link-state routing, where in theory each router advertises to all of the rest?

Yes, it's a compromise (You will see that a lot in your networking career). The DR prevents routers on a shared medium (like a VLAN) from having to peer with all the other routers on the same segment. This was developed at a time when processing power and memory for routers was in short supply.

If there is a DR that is not directly connected to each router in the network, then some non-DR would recieve information about other routers and forward it towards the DR. This means that routers that are not the DR would recieve information from others as well, despite being common routers. Is this information used, or do they just forward it without processing it as they are only waiting for orders from the DR?

DRs exist on broadcast media (like a VLAN), so I'm not sure what you mean by "not directly connected." Non-DR routers ( on the same VLAN) maintain full adjacency with the DR and BDR only. So when they receive LSAs from other routers, they only forward it to the DR/BDR.

  • Thanks for your answer. I believe I didn't state the first question correctly. What I meant is: suppose that we use the same metrics (link bandwidth), then would it make any difference if each router advertises its link costs to the whole network or if it just advertised its neighbors? I don't see why the two approaches would lead to different results. Regarding the DR, I was getting the concept wrong, thanks for the clarification! So if I have a topology such that each link just connects two nodes, the concept of DR would be non-sense, wouldn't it? – Tendero Feb 15 '18 at 14:03
  • You're assuming all links are the same metric. That's often not the case. But if it were, then yes, you'd get the same path selection. – Ron Trunk Feb 15 '18 at 14:22
  • OSPF defines interface types: point-to-point, point-to-multipoint, broadcast, nbma. DRs only exist on broadcast. On Cisco routers, the default type depends on the physical router interface, If it's Ethernet, for example, it defaults to broadcast. – Ron Trunk Feb 15 '18 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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