Foundation Topics

   

Understanding OSPF Fundamentals

OSPF stands for Open Shortest Path First, an open standard using the SPF algorithm, making it a link-state routing protocol. OSPF is an open standard because it was built by a standards committee. The term open standard means that anyone can read the rules or standard and write an application. The routing protocol as such belongs to no one vendor, but to everyone. This documentation is freely available, allowing OSPF to be developed and offered by every vendor. With the specifications in place, it is an obvious solution to connect various technologies and vendor solutions.

OSPF's purpose as a routing protocol is to convey routing information to every router within the organizational network. The technology that has been selected is a link-state technology, which was designed to be very efficient in the way it propagates updates, allowing the network to grow or scale.

OSPF Terminology

OSPF is a sophisticated protocol, but it is in essence quite straightforward. As with a 19th century Russian novel , when you know the different names of the protagonists and how they interrelate, the rest is simple.

Table 6-2 explains briefly the OSPF terminology that you will see in the next few chapters.

Table 6-2. OSPF Terms

Term

Description

Adjacency

Formed when two neighboring routers have exchanged information and have the same topology table. The databases are synchronized, and they both see the same networks.

Area

A group of routers that share the same area ID. Each router in the area has the same topology table. Each router in the area is an internal router. The area is defined on an interface basis in the configuration of OSPF.

Autonomous system

Routers that share the same routing protocol within the organization.

Backup designated router (BDR)

The backup to the designated router (DR), in case the DR fails. The BDR performs none of the DR functions while the DR is operating correctly.

Cost

The metric for OSPF. It is not defined in the standard with a value. Cisco use the default of the inverse of bandwidth so that the higher the speed of the link, the lower the cost, and, therefore, the more attractive the path.

This default can be overridden by a manual configuration. This should be done only if you have a full knowledge of the network.

Database descriptor

Referred to as DBDs or database descriptor packets (DDPs). These are packets exchanged between neighbors during the exchange state. The DDPs contain partial LSAs, which summarize the links of every router in the neighbor's topology table.

Designated router (DR)

Router responsible for making adjacencies with all neighbors on a multiaccess network, such as Ethernet or FDDI. The DR represents the multiaccess network, in that it ensures that every router on the link has the same topology database.

Dijkstra algorithm

A complex algorithm used by routers running link-state routing protocols to find the shortest path to the destination.

Exchange state

State in which two neighboring routers discover the map of the network. When these routers become adjacent, they must first exchange DDPs to ensure that they have the same topology table.

Exstart state

State in which the neighboring routers determine the sequence number of the DDPs and establish the master/slave relationship.

Flood

A term that refers to network information. When network information is flooded, it is sent to every network device in the domain.

Fully adjacent

When the routing tables of the two neighbors are fully synchronized, with exactly the same view of the network.

Init state

State in which a hello packet has been sent from the router, which is waiting for a reply to establish two-way communication.

Internal router

A router that has all its interfaces in the same area.

Link-state advertisement (LSA)

A packet describing a router's links and the state of those links. There are different types of LSAs to describe the different types of links. These are discussed in Chapter 9, "Configuring OSPF Across Multiple Areas."

Link-state database

Otherwise known as the topology map, the link-state database has a map of every router, its links, and the state of the links. It also has a map of every network and every path to each network.

Link-state request (LSR)

When the router receives a DDP complete with a partial LSA, it compares the summarized information against the topological database. If either the LSA entry is not present or the entry is older than the DDP, it will request further information.

Link-state update (LSU)

Update sent in response to the LSR. It is the LSA that was requested .

Loading state

State in which, if the receiving router requires more information during the process in which two routers are creating an adjacency, it will request that particular link in more detail using the LSR packet. The LSR will prompt the master router to send the LSU packet. This is the same as an LSA used to flood the network with routing information. While the receiving router is awaiting the LSUs from its neighbor, it is in the loading state.

Neighbor

A router on the same link with whom routing information is exchanged.

Neighbor table

A table built from the hello messages received from the neighbors. The hello message also carries a list of the neighbors.

Priority

A Cisco tool by which the DR can be manually elected or, conversely, prevented from taking part in the DR/BDR election.

Shortest Path First (SPF)

The same as the Dijkstra algorithm, which is the algorithm used to find the shortest path.

SPF tree

A tree of the topological network. It can be drawn after the SPF algorithm has been run. The algorithm prunes the database of alternative paths and creates a loop-free shortest path to all networks. The router is at the root of the network, which is perceived from its perspective.

Topology table

The same as a link-state database. The table contains every link in the wider network.

Two-way state

State during the process in which two routers are creating an adjacency. The new router sees its own router ID in the list of neighbors, and a neighbor relationship is established. This is the stage before routing information is exchanged.

OSPF Features

OSPF has many features, the most important of which are dealt with in the following section in the context of the simplest OSPF network design, that of a single area. The concept of neighbors; adjacent neighbors; DRs; and the role of the hello packetwhich creates and maintains these neighbors, adjacencies, and DRsare all considered in this section.

OSPF Neighbors

A neighbor in OSPF is a router that shares the same network link or the same physical segment. A router running OSPF discovers its neighbors by sending and receiving a simple protocol called the Hello protocol .

A router configured for OSPF sends out a small hello packet periodically (10 seconds is the default on broadcast multiaccess media). It has a source address of the router and a multicast destination address set to AllSPFRouters (224.0.0.5). All routers running OSPF (or the SPF algorithm) listen to the protocol and send their own hello packets periodically.

Adjacent OSPF Neighbors

After neighbors have been established by means of the Hello protocol, they exchange routing updates. This information about the network is entered into a database, called the topology table. From this database, the best paths to destinations are calculated and entered into the routing table. Therefore, the neighbor relationship is the key to understanding OSPF, as a router's neighbor gathers information about the network and passes it on to its directly connected neighbors.

When the topology databases of the neighbors are the same (synchronized), the neighbors are fully adjacent . To ensure that the link is maintained and the topology databases are up to date and accurate, the Hello protocol continues to transmit.

The transmitting router and its networks reside in the topology database for as long as the other routers receive the Hello protocol.

Advantages of Having Neighbors

There are obvious advantages to creating neighbor relationships. These advantages include the following:

  • It is a mechanism for determining that a router has gone down (obvious because its neighbor no longer sends hello packets).

  • Streamlined communication results because after the topological databases are synchronized, incremental updates will be sent to the neighbors as soon as a change is perceived, as well as every 30 minutes.

  • Adjacencies created between neighbors control the distribution of the routing protocol packets.

The use of adjacencies and a neighbor relationship results in a much faster convergence of the network than can be achieved by RIPv1. This is because RIPv1 must wait for incremental updates and holddown timers to expire on each router before the update is sent out. Convergence on a RIPv1 network can take many minutes, and the real problem is the confusion created by the different routing tables held on different routers during this time. This problem can result in routing loops and "black holes" in the network.

The DR

If routers are connected to a broadcast segment, one router on the segment is assigned the duty of maintaining adjacencies with all the routers on the segment. This router is known as the designated router ( DR ) and is elected by the use of the Hello protocol. The hello packet carries the information that determines the DR and the BDR, which you will learn more about in the next section, "BDRs." The election is determined by either the highest IP address or the following command (if it is defined):

  Router(config-if)#ip ospf priority   number  

The number in the priority command can be set between 0255, where the higher the number, the greater the likelihood that this router will be selected as the DR.

All other routers peer with the DR, which informs them of any changes on the segment.

DRs are created on multiaccess links, because if there are many routers on the same segment, the intermesh of neighbor relationships becomes complex. Mathematically speaking, the number of adjacencies required for a full mesh is n ( n -1)/2 and for a DR/BDR situation is 2 n -2.

On an FDDI ring, which forms the campus or building backbone, each router must form an adjacency with every other router on the segment. Although the Hello protocol is not networking- intensive , maintaining the relationships requires additional CPU cycles. Also, there is a sharp increase in the number of LSAs generated.

If one router is elected foreman of the link, responsible for maintaining adjacencies and forwarding updates, this dramatically reduces the overhead on the network.

BDRs

A network administrator does not want the responsibility of the segment to fall to one router, which poses the frightening situation of a single point of failure. Instead, you need to build redundancy into the network with the BDR. The BDR knows all the links for the segment. All routers have an adjacency not only with the DR, but also with the BDR, which in turn has an adjacency with the DR. If the DR fails, the BDR immediately becomes the new DR.

Electing the DRs and BDRs

You can manually elect the DRs and BDRs, or you can rely on the Hello protocol to select them dynamically, as described in the next sections.

Dynamic Election of the DR

When selected dynamically, the DR is elected arbitrarily. The selection is made on the basis of the highest router ID or IP address present on the network segment. Be aware that the highest IP address is the numerically highest number, not the class ranking of the addresses. Therefore, an elderly 2500 router with a Class C address of 192.168.250.249 might end up as a DR although there is a 7500 available on the segment that connects to the other segments. Unfortunately, the address of 10.10.10.1 is not as high as an old, frail, low-capacity router. This might not be the optimal choice.

After the DR and BDR have been elected, all routers on the broadcast medium will communicate directly with the DRs. They will use the multicast address to all DRs. The BDR will listen but will not respond; remember, the BDR is the understudy waiting in the wings. The DR will send out multicast messages if it receives any information pertinent to the connected routers for which it is responsible.

Manual Configuration of the DR

To determine manually which router will be the DR, it is necessary to set the priority of the router. A router interface can have a priority of 0 to 255. The value of 0 means that the router cannot be a DR or BDR; otherwise, the higher the priority, the more favorable the chances are of winning the election.

If there is more than one router on the segment with the same priority level, the election process picks the router with the highest router ID. The default priority on a Cisco router is 1.

In Figure 6-1, the 2500 router for Building A, which is connected to the San Francisco campus via a hub, would be a reasonable choice as the DR. Although it is small, size is not as important as fault tolerance in this situation.

Figure 6-1. The DR

graphics/06fig01.gif

Because there are not many other routers on the segment, the number of LSAs and adjacencies that this router would have to record is small.

The larger 7200 Cisco router, which connects the building routers to the campus backbone, acts as the centralized router; therefore, the 7200 Cisco router makes sense as the router in charge of the connectivity of the campus buildings , allowing another router on the FDDI ring (not pictured) to take the DR responsibility for the FDDI segment. It would be a mistake to make the 7200 the DR for both networks, because this would increase the demand for resources and also would centralize all the responsibility on one router.

The Election of the DR

The following is the process used to elect the designated and BDRs:

All the neighbors who have a priority greater than 0 are listed.

  1. The neighbor with the highest priority is elected as the BDR.

  2. If there is no DR, the BDR is promoted as DR.

  3. From the remaining routers, the router with the highest priority is elected as the BDR.

  4. If the priority has not been configured, there will be a tie, because the default is to set the priority to 1.

  5. If there is a tie because the priority has not been configured, the highest router IDs are used.

The Hello Packet

Although the routers running OSPF transmit a small packet, called the hello packet, to establish neighbor relations, it serves other functions. The various fields in the hello packet have specific responsibilities. Figure 6-2 shows the format of the hello packet. Table 6-3 describes each field.

Figure 6-2. The Hello Packet

graphics/06fig02.gif

Table 6-3. The Hello Packet Fields

Field

Characteristics

Function

Common OSPF Header

Version #

The version of OSPF, which is currently version 2

To ensure the versions of OSPF are compatible

Packet Type=1

This states the type of OSPF packet after the header.

The Type 1 header is the hello packet.

Packet Length

This is the length of the packet including the OSPF header.

This field is used to identify the packet length.

Router ID

This is a 32-bit number. The highest IP address on the router is used as the ID. If a loopback address is configured, this will be used, even if it is not the highest address. If there are multiple loopbacks, the highest address is chosen .

This field identifies the router within the autonomous system. It is the ID of the originating router.

Area ID

This is the area ID of the originating router's interface.

The hello packet must come from a router within the same area to be valid.

Checksum

A checksum on the entire OSPF packet excluding the authentication field.

This is used to ensure the integrity of the packet.

AU Type

States the type of authentication used

Ensures the same authentication is used between systems

Authentication

64 bit authentication

Used for security between systems

Hello Packet Format

Network Mask

The network mask for the transmitting interface

The mask must match the mask on the receiving interface, ensuring that they share a segment and network.

Hello Interval

Options

RouterDeadInterval

Used on broadcast, multiaccess networks:

Dead Interval=40 Hello=10 sec

Used on nonbroadcast networks:

Dead Interval=120 Hello = 30

Hello maintains the presence of the router in its neighbor's databases. It works like a keepalive.

The dead interval is how long the router waits before it determines that a neighbor is unavailable because it has not heard a hello packet within the prescribed time, that is, four times the hello timer.

Neighbor

The router ID of a neighbor is entered in the neighbor table when a two-way (bidirectional) communication is established within the RouterDeadInterval. The communication is established when the router sees itself listed as a neighbor in the hello packet generated by another router on the same physical segment.

A neighbor is another router with which updates will be exchanged to synchronize databases.

Rtr Pri

This is the router priority of the source router interface. The higher the priority, the higher the likelihood of the router being selected as a DR or BDR.

This field is used to select the DR and BDR manually.

Designated Router

This is the address of the existing DR.

This field is used to allow the router to create unicast traffic to the DR router.

Backup Designated Router

This is the address of the existing BDR.

This field is used to allow the router to create unicast traffic to the BDR router.

Authentication

This specifies the authentication type and information. If set, the password must match the password stated on the router.

This field is used as security.

OSPF Operation in a Single Area

OSPF operates as a classic link-state routing protocol. It uses topology tables as well as the SPF tree as the basis of the SPF algorithm. This algorithm, created by Edsger Wybe Dijkstra, creates an SPF tree from the topology table. After calculating the algorithm on the SPF tree, the forwarding table is created. The forwarding table is, in fact, the routing table by another name . This section considers and describes how routes are entered into and removed from the routing table.

Creating and Maintaining the OSPF Routing Table

As discussed in the section "OSPF Neighbors," after a neighbor is discovered in OSPF, an adjacency is formed. It is important to understand how the neighbor adjacency is formed and, in this context, to understand the other messages that the routers receive.

Routing tables are built in two different ways. Either established databases have to adjust to a change in the network, or a new router has to create the topology and forwarding databases when it enters the network.

Different techniques are used for these different routing table requirements. Essentially, the difference between the two techniques is simple:

  • If a new router connects to a network, it will find a neighbor using the Hello protocol and will exchange routing information.

  • If a change occurs in an existing network, the router that sees the change will flood the area with the new routing information.

Both of these events must occur as stated because, although the new router must learn the network topology, its addition is a change to the rest of the network.

These two requirements for updating the routing table use different technologies and OSPF protocols. These technologies and protocols are often confused , so the next sections take a moment to distinguish them. Understanding the distinction makes the OSPF operation much clearer.

How OSPF Builds the Routing Table on a New Router

When a new router is added to the network, it builds a routing table by listening to the established routers with complete routing tables. Remember that every router within an area will have the same database and will know of every network within the area. The routing table built from this database is unique to the router because the decisions depend on the individual router's position within the area, relative to the remote destination network.

Five packet types are used to build the routing table for the first time:

  • Hello protocol Used to find neighbors and to determine the designated and BDR. The continued propagation of the Hello protocol maintains the transmitting router in the topology database of those that hear the message.

  • Database descriptor Used to send summary information to neighbors to synchronize topology databases.

  • LSR Works as a request for more detailed information, which is sent when the router receives a database descriptor that contains new information.

  • LSU Works as the LSA packet issued in response to the request for database information in the LSR packet. The different types of LSA are described in Chapter 8 in the section "Link-State Advertisements."

  • Link-state acknowledgement Acknowledges the LSU.

Consider the case of a router joining the OSPF network for the first time. In Figure 6-3, the 2500 router in Building A at the San Francisco campus has just been connected.

Figure 6-3. Joining an OSPF Network

graphics/06fig03.gif

The next sections detail what happens when a router joins a network.

Finding Neighbors with the Exchange Process

When it is connected to the network and has been configured to run OSPF, the new router must learn the network from the systems that are up and running. The method described in this section is the same as for a stable network.

The process in this section shows the stages that the systems go through while exchanging information. You can see what stage an interface running OSPF is in with the command show ip ospf neighbor as well as the command debug ip ospf adjacency . Care should be taken with the debug command because it can be CPU-intensive.

The different stages or states that the router goes through while creating a neighbor relationship are shown in the following list:

  1. The down state The new router is in a down state . The 2500 router transmits its own hello packets to introduce itself to the segment and to find any other OSPF-configured routers. This is sent out as a hello to the multicast address 224.0.0.5 (AllSPFRouters). It sets the DR and BDR in the hello to be 0.0.0.0.

  2. The init state The new router waits for a reply. Typically this is four times the length of the hello timer. The router is in the init state . Within the wait time, the new router hears a hello from another router and learns the DR and the BDR. If there is no DR or BDR stated in the incoming hello, an election takes place. However, in accordance with the description of the Hello protocol, the DR has been elected: It is the 7200 router, which connects the campus to the campus backbone.

    Upon hearing the Hello protocol from the 2500 router, a router on the segment adds the router ID of the 2500 and replies as a multicast (224.0.0.5) with its own ID and a list of any other neighbors.

  3. The two-way state The new router sees its own router ID in the list of neighbors, and a neighbor relationship is established. The new router changes its status to the two-way state .

Discovering Routes

The 2500 router and the designated router have now established a neighbor relationship and need to ensure that the 2500 has all the relevant information about the network. The 7200 router must update and synchronize the topology database of the 2500. This is achieved by using the exchange protocol with the database description packets.

The different stages or states that the router goes through while exchanging routing information with a neighbor are shown in the following list:

  1. The exstart state One of the routers will take seniority , becoming the master router. This is the exstart state . The two neighbors determine a master/slave relationship based on highest IP interface address. This designation is not significant; it just determines which router starts the communication.

  2. The exchange state Both routers will send out database description packets, changing the state to the exchange state .

    In this example, the 2500 router has no knowledge and can inform the 7200 router only of the networks or links to which it is directly connected. The 7200 sends out a series of database description packets containing the networks held in the topology database. These networks are referred to as links .

    Most of the information about the links has been received from other routers (via LSAs). The router ID refers to the source of the link information.

    Each link will have an interface ID for the outgoing interface, a link ID, and a metric to state the value of the path. The database description packet will not contain all the necessary information, but just a summary (enough for the receiving router to determine whether more information is required or whether it already contains that entry in its database).

    When the router has received the DDPs from the neighboring router, it compares the received network information with that in its topology table. In the case of a new router, such as the 2500, all the DDPs are new. Remember that the DDPs are simply a summary of the routes that the neighbor knows about. The different stages or states that the router goes through gathering routing information to update the topology database from a neighbor are shown in the following list:

  3. The loading state If the receiving router, the 2500, requires more information, it will request that particular link in more detail using the LSR packet. The LSR will prompt the master router to send the LSU packet. For example, if there is a discrepancy between the information in the received DDPs and the router's topology database, the router requests more detailed information from its neighbor about those routes of which it was unaware.

    This process is the same as an LSA used to flood the network with routing information. While the 2500 is awaiting the LSUs from its neighbor, it is in the loading state .

  4. The full state When these LSRs are received and the databases are updated and synchronized, the neighbors are fully adjacent .

All the stages in updating a router's databases, as described in the numbered list, are illustrated in Figure 6-4.

Figure 6-4. The Stages of Updating the Routers About the Network

graphics/06fig04.gif

Now that you understand how OSPF learns about the connected network by forming adjacencies, the second stage is to learn how the neighbors flood information about their links throughout the network. The next section describes how the topology database, sometimes referred to as the link-state database, learns about the entire OSPF domain, or autonomous system.

The Topology Database

The topology database is the router's view of the network within the area. It includes every OSPF router within the area and all the connected networks. This database is indeed a routing table, but a routing table for which no path decisions have been made; it is at present a topology database.

The topology database is updated by the LSAs. Each router within the area has exactly the same topology database. All routers must have the same vision of the network; otherwise, confusion, routing loops, and loss of connectivity will result.

The synchronization of the topology maps is ensured by the intricate use of sequence numbers in the LSA headers.

From the topology map, a routing database is constructed . This database will be unique to each router, which creates a routing database by running the shortest path first (SPF) algorithm called the Dijkstra algorithm . Each router uses this algorithm to determine the best path to each network and creates an SPF tree on which it places itself at the top, or root. If there are equal metrics for a remote network, OSPF includes all the paths and load balances the routed data traffic among them.

Occasionally, a link might flap or go up and down. This is more common on a serial line. If this happens, it could cause many LSAs to be generated when updating the network. To prevent this from happening, OSPF introduced timers. These timers force OSPF to wait before recalculating SPF. They are configurable.

NOTE

Although RFC 2328 does not state the number of multiple, equal-cost paths that can be used at the same time, Cisco has defined a maximum of six paths that can be used simultaneously for load balancing.


Maintaining the Topological Database and the Routing Table

Now turn back to the 2500 router in Building A of the San Francisco campus in Figure 6-1. The router is now happily a member of the OSPF network. This section follows the process of hearing an update to the network in the form of an LSA.

As soon as a router realizes that there has been a change in the network topology, the router is responsible for informing the rest of the routers in the area. Typically, it will identify a change in the state of one of its links for one of the following reasons:

  • The router loses the physical or data link layer connectivity on a connected network. The router propagates an LSU and sends it to the DR on a multiaccess network or the adjacent router in a point-to-point network. From there, it is flooded to the network.

  • The router fails to hear either an OSPF Hello protocol or a data link Hello protocol. The router propagates an LSU and sends it to the DR on a multiaccess network or the adjacent router in a point-to-point network. From there, it is flooded to the network.

  • The router receives an LSA update from an adjacent neighbor, informing it of the change in the network topology. The LSU is acknowledged and flooded out the other OSPF interfaces.

In any of these instances, the router will generate an LSA and flood it to all its neighbors.

This discussion now turns to the process initiated when a router receives such an update. For this purpose, return to the 2500 router connected to its DR, the 7200, in Figure 6-1.

Learning a New Route

When the 2500 router receives a network LSA update from the DR, it goes through the following logical steps:

  1. The router takes the first entry from the updatethe first network with information about the state of its link.

  2. The router verifies that the type of LSA is one that can be accepted by this router.

  3. Having ascertained that it is a valid LSA which it can receive, the router issues a lookup to its topological database.

  4. If the LSA entry is not in the topological database, it is flooded immediately out all the OSPF interfaces, except for the receiving interface.

  5. If the LSA entry is in the topological database, further questions are required.

  6. The router determines whether the new LSA has a more recent (higher) sequence number.

  7. If the sequence numbers are the same, the router calculates the checksum for the LSAs and uses the LSA with the higher checksum.

  8. If the checksum numbers are the same, the router checks the MaxAge field to ascertain which is the most recent update.

  9. Having found that the latest LSU is the one that was received, the router determines whether it has arrived outside the wait period, before another computation is allowed (minsLSarrival).

  10. If the new LSA entry passes these tests, it is flooded out all the OSPF interfaces, except for the receiving interface.

  11. The current copy replaces the old LSA entry. If there was no entry, the current copy is just placed in the database.

  12. The received LSA is acknowledged.

  13. If the LSA entry was in the database, but the LSA that has just been received has an older sequence number, the router asks whether the information in the database is the same.

  14. If the information is the same and the new LSA has an older sequence number, the process discards the packet. It might be old news, but there is no inconsistency in the database.

  15. If the information is different and the newly received LSA has an older sequence number, however, the receiving router discards the LSA update. It issues a copy of the LSA it has in its database, sending it out of the receiving interface to the source address of the out-of-date LSA. The logic is that the sending router has bad or old information and must be updated because its topological database is obviously not synchronized with the rest of the area.

    This ensures that any packets that get out of sequence will be verified before action is taken. It also attempts to rectify a problem that it seesthat of multiple routers offering different paths because their topological databases are completely confused.

  16. After the initial flood, things calm down, and updates are sent only when there are changes in the area or when the 30-minute timer goes off. This timer ensures that the databases stay synchronized.

This process shows some of the internal complexity of OSPF. As you can see, the internals are extremely detailed. Therefore, the design of any OSPF network should be very carefully thought out. The configuration of the routing protocol, on the other hand, is incredibly straightforward.

Choosing the Shortest Path First and Building the Routing Table

As with any routing protocol, OSPF examines all the available paths to every network that it knows about. It selects the shortest, most direct path to that destination. This section discusses the metric OSPF uses to select the shortest path and the routing table information needed after the shortest path is determined.

The Metric

As with all routing protocols, the decision as to which path to place into the routing table is based on the metric used by the routing protocol. RIP, for example, uses hop count, which shows how many routers must be passed through to get to the destination. When CPU and memory speeds were slower, the latency of traveling through the router had much higher implications on network performance. OSPF has few of those constraints and so chooses the metric of cost . Cost is not defined, however; it depends on the implementation of the protocol. The metric can be programmed to be either complex or simple. Cisco's implementation of a dynamic and default cost uses a predefined value based on the bandwidth of the router interface. The network administrator can manually override this default.

On occasion, the metric determines more than one path to the destination. These are known as multiple equal-cost paths.

The cost is applied to the outgoing interface. The routing process will select the lowest accumulated cost of the interfaces to the remote network.

If the network is manually configured, all routers connected to a particular network should agree on cost. Also, if manually configured, the cost should be thought through very carefully.

Information Needed in the Routing Table

Having determined the shortest path or multiple equal-cost paths, the routing process will need to supply additional information. To forward the data down the chosen path, the next logical hop, link, and outgoing interface must be ascertained. The routing table, or forwarding database , as it is sometimes called, requires this information.

The operation of OSPF across WANs is slightly different. The next section considers OSPF used over these different technologies.

OSPF Network Topologies

How an OSPF protocol communicates via the Hello protocol to its neighbors depends on the physical medium being used. OSPF identifies five distinct network types or technologies:

  • Broadcast multiaccess

  • Point-to-point

  • Point-to-multipoint

  • Nonbroadcast multiaccess (NBMA)

  • Virtual links

The next sections describe each in more detail.

Broadcast Multiaccess Network

Broadcast multiaccess is any LAN network, such as Ethernet, Token Ring, or FDDI. In this environment, OSPF sends out multicast traffic. A DR and a BDR will be elected. Figure 6-5 illustrates a broadcast multiaccess network and the designated and BDRs.

Figure 6-5. A Broadcast Multiaccess Network

graphics/06fig05.gif

Point-to-Point Network

Point-to-point technology is used where there is only one other router directly connected to the transmitting or receiving router. A typical example of this is a serial line. OSPF has no need for a DR or BDR in this scenario. OSPF messaging is sent using the multicast address for AllSPFRouters, 224.0.0.5. Figure 6-6 illustrates a point-to-point network.

Figure 6-6. Point-to-Point Network

graphics/06fig06.gif

Point-to-Multipoint Network

Point-to-multipoint is a single interface that connects to multiple destinations. The underlying network treats the network as a series of point-to-point circuits. It replicates LSA packets for each circuit. OSPF traffic is sent as multicast. There is no DR or BDR election. This technology uses one IP subnet for all endpoints on the network.

Figure 6-7 illustrates a point-to-multipoint network.

Figure 6-7. Point-to-Multipoint Network

graphics/06fig07.gif

Nonbroadcast Multiaccess Network

Physically, some point-to-multipoint networks cannot support multicast or broadcast traffic. In an NBMA topology, special configuration is required. NBMA physically resembles a point-to-point line, but in fact, many destinations are possible. WAN clouds, including X.25 and Frame Relay, are examples of this technology. NBMA uses a fully meshed or partially meshed network. OSPF sees it as a broadcast network, and it will be represented by one IP subnet.

This technology requires manual configuration of the neighbors and the DR and BDR selection. The configuration options have increased with the different versions of Cisco IOS software.

DR and BDR routers are elected, and the DR will generate an LSA for the network. The DR and BDR must be directly connected to their neighbors. All network traffic sent between neighbors will be replicated for each physical circuit using unicast addresses, because multicast and broadcast addresses are not understood . Figure 6-8 illustrates an NBMA network.

Figure 6-8. An NBMA Network

graphics/06fig08.gif

Virtual Links

A virtual link is a virtual connection to a remote area that does not have any connections to the backbone (Area 0). Typically, this is because the network has become segmented. Although OSPF treats this link as a direct, single-hop connection to the backbone area, it is a virtual connection that tunnels through the network. The OSPF network traffic is sent in unicast datagrams across these links.

Having discussed OSPF network topologies, including WAN technologies, the next section, "OSPF Across NBMA Networks," discusses the NBMA topologies in more detail. Remember that the method by which the routers in an OSPF network find one another and exchange information depends on the physical characteristics of the network.

OSPF Across NBMA Networks

An NBMA network has certain characteristics. The main ones are identified in the name of the technology: It is a network that cannot carry broadcast traffic but has multiple destinations. Examples of NBMA networks include Frame Relay, X.25, and ATM.

The crux of the problem is how OSPF operates using multicast traffic to exchange network information and to create adjacencies in order to synchronize databases across this WAN cloud without using the multicast addresses.

The solution to the problem varies, depending on the technology involved and the network design. The modes available fall into two technologies, within which there are additional options. The two technologies are point-to-point and NBMA.

The NBMA technology is then subdivided into two categories, under which different configuration options are available. These two categories are the RFC-compliant solution and the Cisco proprietary solution, as follows:

  • RFC-compliant The RFC-compliant category offers a standard solution, which is independent of the vendor platform. The configuration options are:

    - NBMA

    - Point-to-multipoint

  • Cisco-specific These configuration options are proprietary to Cisco and include:

    - Point-to-multipoint nonbroadcast

    - Broadcast

    - Point-to-point

The option you select depends on the network topology that is in use. The OSPF technology is separate from the physical configuration, and the choice of implementation is based on the design topology.

The Frame Relay topologies include:

  • Full mesh Every router is connected to every other router. This solution provides redundancy, and it might allow load sharing. This is the most expensive solution.

  • Partial mesh Some routers are connected directly; others are accessed through another router.

  • Star, or hub and spoke One router acts as the connection to every other router. This is the least expensive solution because it requires the fewest number of permanent virtual circuits (PVCs). A single interface is used to connect to multiple destinations.

Choosing a Topology

Some of the considerations in choosing the OSPF topology depend on its method of updating the network and its effect on network overhead. These considerations are mentioned in RFC 1586, which suggests that the different virtual circuits have different functions, as follows:

  • A point-to-point circuit Although no DR or BDR is required, each circuit will have an adjacency, which will create many more adjacencies on the network and will increase the need for network resources.

  • An NBMA environment This might require a DR and a BDR, unless the underlying technology is viewed as point-to point. This is economical for most routers, requiring only two adjacencies, except for the DR and BDR. However, it might require more administration in terms of configuration.

Subinterfaces

On a Cisco router, it is possible to configure a physical interface to be many logical interfaces. You can configure these subinterfaces to be point-to-point or point-to-multipoint. One of the main determining factors is the number of subnets to be used. A point-to-point interface requires its own subnet to identify it.

If you select the point-to-point option, managing the network is a little easier because the routers at each end create the adjacencies. The point-to-point option does require more network overhead and restricts some communication, in particular, the capability to indirectly connect through a hub router.

In a point-to-point network, the concept of a broadcast is not relevant because the communication is direct to another router. In a point-to-multipoint network, although OSPF simulates a broadcast environment, the network traffic is replicated and sent to each neighbor.

Table 6-4 indicates the characteristics and options for each case.

Table 6-4. OSPF over NBMA
 

Point-to-Point Nonbroadcast

Point-to-Point

Broadcast

NBMA

Point-to Multipoint

Addressing

Unicast

Multicast

Multicast

Unicast

Multicast

DR/BDR

No

No

Yes

Manual

Yes

No

Manual Configuration of Neighbors

Yes

No

No

Yes

No

Hello

30 seconds

Dead=120

10 seconds

Dead=40

10 seconds

Dead=40

30 seconds

Dead=120

30 seconds

Dead=120

RFC/Cisco

Cisco

Cisco

Cisco

RFC 2328

RFC 2328

Network Supported

Star

Partial mesh

Star

Partial mesh, using subinterfaces

Full mesh

Full mesh

Star

Partial mesh

(Seen as point-to-point)

Replicates Packets

Yes

Yes

Yes

Yes

Yes

Number of Subnets

1

Many (1 per circuit)

1

1

1

All the differing characteristics of the various network topologies can be very confusing, because it is not clear which type of network corresponds to a particular physical configuration. The following list clarifies the characteristics of the various network topologies:

  • For serial interfaces with HDLC encapsulation, the default network type is point-to-point. Timers: hello 10, dead 40.

  • For serial interfaces with Frame Relay encapsulation, the default network type is nonbroadcast. Timers: hello 30, dead 120.

  • For serial interfaces with Frame Relay encapsulation and using point-to-point subinterfaces, the default network type is point-to point. Timers: hello 10, dead 40.

  • For serial interfaces with Frame Relay encapsulation and using point-to-multipoint subinterfaces, the default network type is nonbroadcast. Timers: hello 30, dead 120.

Now that you understand the mechanism of the OSPF routing protocol, this information will be useful in understanding how to configure the protocol on a Cisco router.

TIP

If OSPF is used in an environment across different vendor equipment, it should be researched and tested to ensure interoperability.




CCNP BSCI Exam Certification Guide
CCNP BSCI Exam Certification Guide (CCNP Self-Study, 642-801) (3rd Edition)
ISBN: 1587200856
EAN: 2147483647
Year: 2002
Pages: 194
Authors: Clare Gough

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net