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?