Open shortest path first (OSPF) is an internal gateway protocol used to make decisions in a single autonomous system (as). It is the implementation of routing protocol for connection state and is a part of IGP (internal Gateway Protocol), so it can work in autonomous system. The famous Dijkstra algorithm (Dijkstra) is used to calculate the shortest spelling distance. OSPF is divided into two versions, ospfv2 and OSPFv3. Ospfv2 is used for IPv4 network and OSPFv3 is used for IPv6 network. Ospfv2 is defined by RFC 2328 and OSPFv3 by RFC 5340. Compared with rip, OSPF is a connection state protocol and rip is a distance vector protocol.