There are three types of network connections defined for the OSPF routing protocol:
 
• point-to-point
|
• non-broadcast multiaccess
|
• multiaccess
|
In a point-to-point connection, for example between two routers in different LANs, both routers can independently communicate with all other OSPF routers.
|
The two routers form a neighbor relationship with each other.
|
In a non-broadcast multiaccess network, all routers may not communicate with all other OSPF routers.
|
Since multicasts are not available in a non-broadcast environment, neighbor relationships are manually configured by the network administrator.
|
In a multiaccess network, the Hello protocol elects a @Rbackup designated router@r (BDR) and a @Rdesignated router@r (DR).
|
The DR is responsible for generating LSAs for the entire network.
|
The DR communicates with all other OSPF routers regarding the LAN network.
|
It then shares the information it learns with the other routers.
|
Neighbor relationships are formed based on a dynamic learning process using multicast Hellos.
|
Using this approach decreases the amount of network traffic as well as the size of the topological database.
@@
Let's look at what happens when you add a router to a multiaccess network.
|
The new router announces its presence to the network by sending a Hello message on multicast address 224.0.0.5, that is to all OSPF routers.
|
The DR and the BDR respond by sending the new router table information using the new router's unicast address.
|
When the new router receives this table information, it also receives the addresses of the DR and the BDR.
|
The new router sends LSAs for all of its links to the DR and the BDR using the multicast address 224.0.0.6, that is all DR routers.
|
When the BDR receives the LSA it sets its timer and waits for the DR to send out LSAs to the network.
|
The DR transmits LSAs to other routers on 244.0.0.5 telling them all about the new router's links.
|
It must receive an acknowledgment from all routers in order to ensure reliability.
|
If the BDR does not receive the LSAs before its timer expires, it becomes the DR and the Hello protocol elects a new BDR.
|
Assume that one of the links connected to the new router goes down.
|
The router sends an LSA to DR and BDR on 224.0.0.6 to tell them that the link has gone down.
|
DR sends out LSAs to all other routers on 224.0.0.5 to inform them also.
|
The other routers then proceed to flood LSAs onto other networks and so the information permeates through the network.
@@
OSPF operates best within a routing hierarchy.
|
The largest entity within the hierarchy is the @Rautonomous system@r (AS).
|
The term @Rdomain@r is frequently used interchangeably with AS.
|
An AS is a collection of networks under a common administration, sharing a common routing strategy.
|
OSPF is an intra-AS (interior gateway) routing protocol, although it is capable of receiving routes from and sending routes to other ASs.
|
Routers that can route between ASs are called @Rautonomous system boundary routers@r (ASBRs).
|
An AS can be divided into a number of @Rareas@r.
|
An area is a group of contiguous networks and attached hosts.
|
An area's topology is invisible to entities outside the area.
|
By keeping area topologies separate, OSPF passes less routing traffic than it would if the AS were not divided.
|
Routers that operate solely within an area are called @Rinternal routers@r.
|
Routers that have multiple interfaces can participate in multiple areas.
|
These routers, which are called @Rarea border routers@r (ABRs), maintain separate topological databases for each area.
|
All ABRs are connected together to form an OSPF @Rbackbone@r.
|
The backbone is in itself an OSPF area.
|
This means that all backbone routers use the same procedures and algorithms to maintain routing information within the backbone.
@@
There are several important guidelines to consider when designing an OSPF topology.
|
First, an area should generally have no more than 50 routers.
|
Areas with unstable links should have less routers.
|
OSPF uses a CPU-intensive algorithm.
|
The larger and more unstable an area, the greater the likelihood of performance problems associated with routing protocol recalculations.
|
OSPF floods all link-state changes to all routers in an area.
|
Routers that have many neighbors have the most work to do when link-state changes occur.
|
For this reason the number of neighbors for any one router should generally be limited to no more than 50.
|
A router must run the SPF algorithm for each link-state change that occurs for every area in which it resides.
|
In general, to maximize stability, one router should not be in more than three areas.
|
Every ABR is in at least two areas, the backbone and one area.
|
In general the DR and the BDR on a LAN have the most work to do.
|
It is good practice to select routers that are not already heavily laden with CPU-intensive activities to be the DR and the BDR.
|
It is not a good idea to select the same router to be the DR on several LANs simultaneously.
@@
OSPF backbones should be stable.
|
Every router in the backbone needs to recompute its routes after every link-state change.
|
Therefore keeping the size of the backbone reasonable increases stability.
|
As a general rule the backbone should contain no more than 50 routers.
|
However, if the link quality is high and the number of routes small, the number of routers can be increased.
|
The backbone should be designed so that no single link failure will cause a part of the network to be isolated.
|
This is called @Rpartitioning@r.
|
OSPF backbones must be contiguous.
|
All routers in the backbone should be directly connected to other backbone routers.
|
OPSF includes the concept of @Rvirtual links@r.
|
A virtual link creates a path between two ABRs that are not directly connected.
|
A virtual link can be used to heal a partitioned backbone.
|
However, it is not a good idea to design an OSPF network that requires virtual links.
|
You should avoid placing hosts, such as workstations, file servers, or other shared resources, in the backbone area.
|
Keeping them out of the backbone area simplifies internetwork expansion and creates a more stable environment.
@@
Each area must be contiguous.

A contiguous area is one in which you can trace a path from any router to any other router in the same area.
|
This does not mean that all routers must share a common network medium.
|
You cannot use virtual links to reconnect a partitioned area.
|
Ideally, you should richly connect areas internally to prevent partitioning.
|
Each area should have a contiguous set of network and/or subnet addresses.
|
Without a contiguous address space, you cannot implement route summarization.
|
Areas can have a single ABR or multiple ABRs.
|
Ideally you should have more than one ABR for each area in order to minimize the chance of the area becoming disconnected from the backbone.
|
When you are creating a large-scale internetwork, you should try to keep your internetwork flexible by defining areas carefully.
|
You should consider physical proximity when defining areas.
|
If a particular location is densely connected, you should create an area specifically for nodes at that location.
|
Consider also the stability of your links.
|
If your internetwork contains unstable links consider implementing smaller areas.
@@
OSPF areas can be categorized into a number of different types:

• stub areas
|
• stub areas without summaries
|
• non-stub areas
|
Stub areas are areas that carry a default route, intra-area routes and interarea routes.
|
However, they do not carry AS external route advertisments.
|
This reduces the topological database size, and therefore the memory requirements, for a stub area's internal routers.
|
Stub areas are recommended for areas that have only one ABR and they are often useful in areas with multiple ABRs.
|
Stub areas without summaries are areas that carry only a default route and intra-area routes.
|
They do not carry interarea routes or external routes.
|
Non-stub areas carry a default route, static routes, intra-area routes, interarea routes, and external routes.
|
Non-stub areas are the most resource-intensive type of area.
|
An area must be a non-stub area when it contains a router that uses both OSPF and any other protocol, such as the Routing Information Protocol (RIP).
|
Such a router is known as an autonomous system border router (ASBR).
|
An area must also be a non-stub area when a virtual link is configured across the area.
@@
There are different types of LSAs.
|
Router links advertisements (RLAs) describe the collected states of the router's links to a specific area.
|
A router sends an RLA for each area to which it belongs.
|
RLAs are flooded throughout the entire area, and no further.
|
Network links advertisements (NLAs) are sent by designated routers.
|
They describe all the routers that are attached to a multiaccess network.
|
NLAs are flooded throughout the area containing the multiaccess network.
|
RLAs and NLAs cause the full SPF algorithm to be run.
|
You can use the Show IP OSPF command to determine the number of times the SPF algorithm has been run.
|
Both RLAs and NLAs generate router link-state entries in the database.
|
They show up in the routing table as @RO@r (OSPF derived routes).
|
Summary links advertisements (SLAs) are generated by ABRs.
|
They summarize routes to destinations outside the area, but within the AS.
|
They are flooded throughout the area.
|
Only intra-area routes are advertised into the backbone.
|
Both intra-area and inter area routes are advertised into other areas.
|
SLAs do not cause the SPF algorithm to be run.
|
They generate summary link-state entries in the database.
|
These show up in the routing table as IA (inter area routes).
|
Finally, AS external links advertisements describe a route to a destination that is external to the AS.
|
They are generated by AS boundary routers.
|
This type of advertisement is the only type that is forwarded throughout an AS.
@@
All OSPF packets start with a 24-byte header.
|
The one byte Version number field identifies the particular OSPF implementation being used.
|
The Type field, also one byte, specifies the OSPF packet types:
 
• the Hello packet
|
• the database description packet
|
• the link-state request packet
|
• the link-state update packet
|
• the link-state acknowledgment packet
|
The Hello packet is sent at regular intervals to establish and maintain neighbor relationships.
|
Database description packets describe the contents of the topological database.
|
They are exchanged when an adjacency is being initialized.
|
The link-state request packet requests a piece of a neighbor's topological database.
|
These are exchanged after a router has examined a database description packet and discovered that parts of its own database are out of date.
|
Link-state update packets are responses to link-state request packets.
|
They are also used for the regular dispersal of LSAs.
|
Several LSAs can be included within a single packet.
|
The link-state acknowledgment packet is used to acknowledge link-state update packets.
|
They must be explicitly acknowledged to ensure that link-state flooding throughout a network is reliable.
|
The two byte Packet length field specifies the length (in bytes) of the packet, including the OSPF header of 24 bytes.
|
The Router ID field uses four bytes to identify a packet's source.
|
The Area ID field, also four bytes, identifies the area to which the packet belongs.
|
All OSPF packets are associated with a single area.
|
The Checksum field (two bytes) is used for error checking.
|
It checks the entire packet contents for potential damage suffered in transit.
|
The two-byte Authentication type field indicates what type of authentication is used.
|
All OSPF protocol exchanges are authenticated.
|
The authentication type is configured on a per-area basis.
|
For example, "simple password" is one authentication type.
|
The eight byte Authentication field contains the actual authentication information, for example the password.
