The thesis deals with simulation of routing protocols. The aim is to create a functioning model of OSPF link-state protocol in the simulation framework OMNET++. OMNET++ is a discrete simulation environment which was created to provide means to build models of various network protocols and technologies. Chapters in the first part of the thesis focuson the theoretical foundation of OSPFv2 and OSPFv3 and their differences. Important data structures, finite state automata and communication techniques are described and the information is later used to implement the model itself. The chapters in the second part deal with the implementation of the model in C++. The created model reflects the functionality of OSPF on Cisco devices