The Open Shortest Path First (OSPF), the shortest open path, is a hierarchical interior gateway routing protocol or IGP ( Interior Gateway Protocol ), which uses the Dijkstra link-state algorithm (LSA – Link State Algorithm) to calculate the route shortest possible. Use “cost” as your metric measure. In addition, it builds an identical link-state database on all routers in the zone.
Summary
[ hide ]
- 1 Why OSPF?
- 2 Features
- 1 Quick and loop-free response to changes
- 2 Security against changes
- 3 Multiple metric support
- 4 Multiple path load balancing
- 3 OSPF monitoring
- 4 Description of operations in OSPF
- 5 OSPF messages
- 6 OSPF package
- 7 Important OSPF Facts
- 8 References
Why OSPF?
OSPF is the IAB’s response through the IETF , given the need to create an internal routing protocol that would meet the needs of the Internet for internal routing that the RIP version 1 protocol revealed:
- Slow response to changes in the network topology .
- Little baggage in the metrics used to measure the distance between nodes.
- Impossibility of distributing traffic between two nodes along several paths if these existed due to the creation of loops that saturated the network.
- Impossibility of discerning different types of services.
- Impossibility of distinguishing between hosts , routers, different types of networks within the same Autonomous System .
Some of these points have been solved by RIP version 2 which has a greater number of metrics as well as supports CIRD , subnet routing and multicast transmission, but the development of OSPF by the IETF is fundamentally based on the introduction of a different algorithm from that used up to now in the standard internal routing protocols in TCP / IP to calculate the minimum path between two nodes of a network.
features
Fast, loop-free response to changes
The SPF algorithm on which OSPF is based allows, with the current technology that exists in the nodes, a response time in terms of computing time for the calculation of the local map of the network much faster than said calculation in the RIP protocol. Furthermore, since all the nodes of the network calculate the map identically and have the same map, it is generated without loops or nodes that are counting at infinity; The main problem suffered by protocols based on the distance vector algorithm such as RIP.
Security against changes
For the routing algorithm to work properly, there must be an identical copy of the network topology at each node in the network. There are various failures that can occur in the network such as failure of the synchronization protocols or flooding, memory errors, introduction of wrong information. The OSPF protocol specifies that all exchanges between routers must be authenticated. OSPF allows a variety of authentication schemes and also allows you to select a scheme for one area different from the scheme for another area. The idea behind authentication is to ensure that only trusted routers broadcast routing information .
Multiple metric support
Today’s technology makes it possible to support multiple metrics in parallel. Evaluating the path between two nodes based on different metrics means having different best paths depending on the metric used in each case, but the question arises as to which is the best. This choice will be made based on the requirements that exist in the communication. Different metrics used can be:
- Higher performance
- Less delay
- Lower cost
- Higher reliability
The possibility of using several metrics to calculate a route implies that OSPF provides a mechanism so that once a metric has been chosen in a packet to carry out its routing, it is always the same for that packet, this characteristic provides OSPF with a type service routing based on metric.
Load balancing on multiple paths
OSPF allows load balancing between nodes where there is more than one path. To perform this balancing apply:
- A version of SPF with a modification that prevents the creation of partial loops.
- An algorithm that allows calculating the amount of traffic that must be sent on each road.
- Scalability in the growth of external routes.
The continuous growth of the Internet is due to the fact that more and more autonomous systems are connecting to each other through external routers. In addition to taking into account the possibility of accessing the outside of the autonomous system through a certain external router or another, it must be taken into account that there are several service providers and it is more versatile to choose at any time the external router and the required service that establish a default route and service when it comes to external routing as it has been until now. OSPF solves this problem by allowing the so-called “ gatewaylink state records ”. These records allow us to store the value of the metrics calculated and make it easier to calculate the optimal route for the exterior. For each external input there will be a new entry of type “gateway link state records” in the database, that is, the database will grow linearly with the number of external inputs as occurs with distance vector protocols, but the cost The route calculation will grow as a function of N * log * N for OSPF and not as a function of N ^ 2 as it happens in distance vector protocols.
OSPF monitoring
As usual, Cisco IOS offers a series of commands that allow you to monitor and verify the operation of the protocol on the device:
- Router # show ip ospf.
- Router # show ip ospf neighbor.
- Router # show ip ospf interface.
- Router # show ip route ospf.
Description of operations in OSPF
The basic sequence of operations performed by OSPF routers is:
- Discover OSPF neighbors.
- Choose the DR ( designed router ).
- Form adjacencies (close elements).
- Synchronize databases.
- Calculate the routing table .
- Announce link statuses.
Routers will perform all of these steps during activation, and will repeat them in response to network events. Each “router” must perform these steps for each network to which it is connected, except to calculate the routing table. Each “router” generates and maintains a single routing table for all networks.
OSPF messages
There are five types of OSPF protocol messages:
- HELLO or Greeting is used to:
- Identify the neighbors, to create a local map database.
- Send <I’m alive> signals to the rest of the routers to keep the map local.
- Choosing a designated router for a broadcast network
- Find the existing designated router.
- Database Description Packets or Description of the database is used to:
- Exchange information so that a router can discover missing data during the initialization or synchronization phase when two nodes have established connectivity.
- Link State Request or Link state request:
- It is used to request data that a router has realized is missing from its database or is obsolete during the information exchange phase between two routers.
- Link State Request or Link State Update:
- It is used as a response to link status request messages and also to dynamically report changes in the network topology, the sender will retransmit until confirmed with an ACK message .
- Link State ACK or link state ACK:
- Used to confirm receipt of a Link Status Update.
OSPF package
It consists of nine fields:
- Version Number: Identifies the OSPF Version
- Type: Identifies the type of OSPF packet (Hello, state of the database, state and requirements of the link).
- Packet Length: Specifies the size of the packet including the header.
- Router ID: Identifies the origin of the packets.
- Area ID: Identifies the area to which the packets belong, all OSPF packets are bound to an area.
- Cheksum: allows checking the integrity of the package.
- Authentication Type: Contains the type of OSPF authentication (security).
- Authentication: Contains the authentication information.
- Data: Contains encapsulated information from upper layers .
Important OSPF Facts
OSPF is probably the most widely used type of IGP protocol in large networks. You can operate safely using MD5 (Message-Digest Algorithm 5, it is a 128-bit cryptographic reduction algorithm) to authenticate your points before making new routes and before accepting link-state notices. In general, it has been raised and is being It is a natural successor to RIP. The latest version, version three, is the most recent, it supports IPv6 as well as Multicast Extensions for OSPF (MOSPF), although they are not very widespread.




