Sorry for newbie question for OSPF. I am in the process of learning the protocol, and there is some very basic thing I do not understand. In OSPF the routing is based on router id - which usually is one of its IP addresses. However what actually interests us, is the prefixes of the all the networks that router is directly attached to (that's the key to RIP routing tables if I am not mistake - and it really makes sense). So I am completely confused how given the destination packet IP we deduce the destination router (even before calculating the shortest path to it) without knowing network prefixes of all the networks that all routers in table are being attached to?
This link was very helpful:- https://supportforums.cisco.com/document/133976/reading-and-understanding-ospf-database