Intradomain Routing: OSPF
In this lesson we'll study the OSPF protocol.
We'll cover the following
Intradomain Routing
Intradomain routing protocols have two objectives:
- They distribute routing information that corresponds to the shortest path between two routers in the domain.
- They should allow the routers to quickly recover from link and router failures.
OSPF
Open Shortest Path First (OSPF), defined in RFC 2328, is one of the link-state routing protocols that has been standardized by the IETF.
Hierarchical Routing
A domain can consist of thousands of routers. In such a large network, exchanging link-state information, building a global view of the network, and efficiently handling changes in the network becomes unscalable. Instead, a large domain is divided hierarchically into separate zones, or in OSPF terms, areas. Link state information flooding is restricted to an area. Routers run Dijkstra’s algorithm based on this information. All the routers inside an area have detailed information about the topology of the area but only learn aggregated information about the topology of the other areas and their interconnections.
Areas
OSPF supports a restricted variant of hierarchical routing. In OSPF’s terminology, a region is called an area. OSPF imposes restrictions on how a network can be divided into areas. An area is a set of routers and links that are grouped together. Usually, the topology of an area is chosen so that a packet sent by one router inside the area can reach any other router in the area without leaving the area. An OSPF area contains two types of routers:
-
Internal router: A router is called an internal router if all of its interfaces are connected to other routers in the same area.
-
Area border routers: A router that is connected to other routers in more than one areas.
For example, the network shown in the figure below has been divided into three areas:
- Area 0 that contains RA, RB, RC, and RD.
- Area 1 that contains routers R1, R3, R4, R5 and RA.
- Area 2 that contains R7, R8, R9, R10, RB and RC.
The Backbone Area
OSPF areas are identified by a 32 bit integer, which is sometimes represented as an IP address. Among the OSPF areas, area 0, also called the backbone area, has a special role.
-
Some routers in the backbone area are connected to area border routers from a different area. On the other hand, some routers in the backbone area may not be connected to routers in any other area. In the following figure, RA, RB and RC fall in the former category while RD falls in the latter.
-
All area border routers not belonging to the backbone area must be physically connected to an area border router in the backbone area!
Note: It’s possible to establish adjacency between area border routers that are not physically connected, but this is not preferred. Sometimes it might not be possible to connect two routers physically. A certain area border router could be miles and miles away from anything in the backbone area and not connected physically. In that case, its adjacency with the backbone area router can be established by configuration.
-
Inside each non-backbone area, routers distribute the topology of the area by exchanging link-state packets with only the other routers reachable inside that area.
-
The internal routers don’t know the topology of other areas, but each router knows how to reach the backbone area.
-
Non-backbone area border routers inject their summarized intra-area routes as distance vectors into the backbone area. The backbone area border router propagates this information to others of its kind, and to different areas through their respective border routers.
Coming up next, we’ll get an introduction to interdomain routing and the only interdomain routing protocol in use today: BGP
Get hands-on with 1400+ tech skills courses.