OSPF Fundamentals for Data Center Networks
In the recently completed series on switching in the data center, we discussed protocols and concepts that are usually implemented in the Local Area Network (LAN). To send packets between multiple LANs, networks perform what is known as routing. This is the process of selecting paths in a network along which to send network traffic, effectively directing it from its source to its destination across multiple networks.
There are two types of routing: Static and Dynamic.
Static routing involves the network administrator manually configuring the paths for data packets to traverse. Although this method is the best option in smaller establishments and has proven to be a very flexible option, it doesn’t scale well in data centers due to the level of complexity and size of a standard data center network. To reduce the likelihood of human errors, dynamic routing is used instead.
Dynamic routing uses rules and procedures to dynamically determine the best path for network traffic to reach its intended destination. These rules and procedures are known as routing protocols. There are different routing protocols in the industry, with each protocol using a different algorithm to determine the best path to route traffic.
OSPF is a widely adopted dynamic routing protocol known for its efficiency and ability to adapt quickly to network changes, making it well-suited for the demands of data center environments. It offers several advantages over other routing protocols, including fast convergence, scalability, and efficient resource utilization. In this blog, we will be focusing on the Open Shortest Path First (OSPF) Routing Protocol.
What is OSPF?
OSPF is a dynamic routing protocol based on the Dijkstra algorithm (SPF algorithm). This algorithm is used to find the shortest path between two points in a system. It is implemented into computer networks via the OSPF protocol. OSPF is an internal gateway protocol, which means that it only connects routers within a single autonomous system (AS) — this can be thought of as a self-contained network like a company's internal network.
OSPF is a link-state protocol, which means that it considers the state of the physical link connected (e.g., speed) when making routing decisions. OSPF routers exchange information about their connections and neighbors to create a logical map of the entire network, enabling them to make informed routing decisions.
There are some key details every Network Engineer should know about OSPF, which include:
- OSPF does not have a hop count limit, which means that a packet forwarded via OSPF could traverse an unlimited number of routers to reach its destination. This is allowed mainly because OSPF relies on the state of the links and the SPF algorithm to make routing decisions, and not hop count.
- OSPF has a metric of 10^8/Bandwidth. This is used to determine the preferred path when there are multiple ways to go to a destination via OSPF. Faster interfaces have lower costs, making them more desirable candidates for routing.
- OSPF has an administrative distance of 110. This value is used to determine the preferred path when comparing routes learned from OSPF with routes learned from other routing protocols. A lower administrative distance indicates a more preferred route.
- OSPF only supports equal cost load balancing. This means that OSPF would only load balance across multiple paths if they all share the same metric cost.
- OSPF is a classless routing protocol and supports Variable Length Subnet Masking (VLSM) and Classless Inter-Domain Routing (CIDR).
How does OSPF manage large networks?
OSPF manages large networks by using a hierarchical structure called areas. Areas help to divide a large network into smaller units, improving efficiency and scalability. Before the concept of areas, any change in the network would affect all the routers. This could be too memory-intensive for some routers because of the number of advertisements they would receive to update their database. Now, this might not be an issue in a network of about 10 computers, but imagine a network of a thousand routers! This overhead would be significant and could easily congest the network.
OSPF areas fix this by logically subdividing the network into smaller groups where changes to devices in an area are only advertised to devices within that area. Each area maintains its own link-state database and runs the SPF algorithm independently, reducing the amount of routing information that needs to be exchanged and the size of the link-state database.
Inter-Area Communication
In the hierarchical structure, Area 0 serves as the backbone area and the transit area through which all other areas can communicate. Each area has a router called the Area Border Router (ABR). The ABR is a member of multiple areas and serves as the bridge between them. The ABR is also responsible for summarizing routes from its attached areas and advertising them to other areas, further reducing routing overhead.
How do ABRs forward internal Area Routes to other Areas?
ABRs send a consolidation of multiple routes into one single advertisement to other areas. This is known as route summarization. It is recommended that areas send summarized routes in the direction of the backbone area (Area 0). This allows Area 0 to inject this advertisement to all other areas in the network as a summarized route.
For example, a subnet range 128.200.64.0 to 128.200.95.0 can be summarized into 128.200.64.0 255.255.240.0. Sending this advertisement to the backbone area would let all routers know the direction to send traffic destined for any subnet in the summarized network.
How can the amount of external network links be reduced in an Area?
Sometimes, an area doesn’t need to know the specific details of routes outside its area. It only needs to know the way out of the area. This is known as a stub area. In this case, the ABR injects a default route into the routers in the area instead of specific external routes. This implementation minimizes the size of the routing tables on the routers while also reducing the number of LSAs (Link-State Advertisements) exchanged within the area. This simplifies network configuration and improves stability by reducing the impact of external route changes.
Conclusion
We've explored the key elements of OSPF, a dynamic routing protocol essential for today's data centers. From its hierarchical structure and efficient algorithm to its ability to handle large networks and simplify routing with stub areas, OSPF provides the foundation for robust and scalable networks.
But our OSPF journey doesn't end here! In the next blog post, we'll delve deeper into LSA types and the OSPF connectivity process. Stay tuned to learn how routers establish neighbor relationships and exchange routing information.