Chapter 6 Using OSPF in a Single Area
Chapter 7 Configuring OSPF in a Single Area
Chapter 8 Using OSPF Across Multiple Areas
Chapter 9 Configuring OSPF Across Multiple Areas
Part II covers the following Cisco BSCI exam topics:
■ Describe the features and operation of single area OSPF
■ Describe the features and operation of multiarea OSPF
■ Given an addressing scheme and other laboratory parameters, identify the steps to configure a single-area OSPF environment and verify proper operation (within
described guidelines) of your routers
■ Given an addressing scheme and other laboratory parameters, identify the steps to configure a multiple-area OSPF environment and verify proper operation (within
described guidelines) of your routers
■ Identify the steps to verify OSPF operation in a single area
■ Identify the steps to verify OSPF operation in multiple areas
■ Interpret the output of various show and debug commands to determine the cause of route selection errors and configuration problems
This chapter covers the
following topics, which
you need to understand to
pass the CCNP/CCDP/CCIP
■ Understanding OSPF fundamentals
■ OSPF features
■ OSPF operation in a single area
■ OSPF network topologies
Using OSPF in a Single Area
The topics in this chapter detail the routing protocol OSPF. This chapter assumes knowledge of the previous chapter, which dealt conceptually with link-state routing protocols.
This chapter covers the essence of OSPF. It introduces OSPF by considering the protocol in its simplest form, within a single area. The basic operations of the protocol are explained in this chapter. Chapter 7, “Conﬁguring OSPF in a Single Area,” builds on this chapter and explains how to conﬁgure, verify, and troubleshoot OSPF. Chapter 8, “Using OSPF Across Multiple Areas,” and Chapter 9, “Conﬁguring OSPF Across Multiple Areas,” build further on this understanding and explain how OSPF works within a large multiarea network.
The topics in this chapter directly reﬂect questions on the exam. OSPF is the industry-standard interior routing protocol designed for use in large networks. Therefore, it is an obligatory subject in an exam on IP routing protocols. The following chapter assumes your comprehension of the subjects covered within this chapter.
“Do I Know This Already?” Quiz
The purpose of the “Do I Know This Already?” quiz is to help you decide what parts of this chapter to use. If you already intend to read the entire chapter, you do not necessarily need to answer these questions now.
The 12-question quiz, derived from the major sections in the “Foundation Topics” portion of the chapter, helps you to determine how to spend your limited study time.
Table 6-1 outlines the major topics discussed in this chapter and the “Do I Know This Already?” quiz questions that correspond to those topics.
180 Chapter 6: Using OSPF in a Single Area
Table 6-1 “Do I Know This Already?” Foundation Topics Section-to-Question Mapping (Continued)
NOTE The goal of self-assessment is to gauge your mastery of the topics in this chapter. If you do not know the answer to a question or are only partially sure of the answer, you should mark this question wrong for purposes of the self-assessment. Giving yourself credit for an answer you correctly guess skews your self-assessment results and might provide you with a false sense of security.
1. What is a neighbor in OSPF?
a. A neighbor is a router in the same area.
b. A neighbor is a router in the same classful network.
c. A neighbor is a router on a multiaccess link, with an adjacency with a DR.
d. A neighbor is another router with the same network address.
2. What is an adjacency in OSPF?
a. An adjacency is when another router has received an LSA from another area. The areas are adjacent.
b. An adjacency is the state that two neighbors can achieve after they have synchronized their OSPF databases.
c. An adjacent router is one that is sent a hello packet.
d. Routers connected across a WAN but not directly connected, for example Frame Relay, are considered adjacent to each other.
3. What is a designated router?
a. The router responsible for maintaining the SPF tree for a totally stubby area
b. The router responsible for summarizing routes to another areas
c. A router responsible for making adjacencies with all routers on a multiaccess link and maintaining those adjacencies
d. The router responsible for forwarding all the trafﬁc across the global Internet
4. How often, by default, does OSPF send out hello packets on a broadcast multiaccess link?
a. By default, OSPF sends out hello packets every 30 seconds on a broadcast network.
b. By default, OSPF sends out hello packets every 40 seconds on a broadcast network.
c. By default, OSPF sends out hello packets every 3.3 seconds on a broadcast network.
d. By default, OSPF sends out hello packets every 10 seconds on a broadcast network.
5. If a router has an OSPF priority set to 0, what does this indicate?
a. A router with the OSPF priority set to 0 is one that can participate in the election of a DR. It has the highest priority.
b. A router with the OSPF priority set to 0 is one that will switch OSPF packets before it does anything else.
c. A router with the OSPF priority set to 0 is one that cannot participate in the election of a DR. It can become neither a designated nor a BDR.
d. A router with the OSPF priority set to 0 is one that cannot participate in the election of a DR, but it can become a BDR.
6. When a router sends an LSA on a multiaccess link, to what is it sent?
a. Designated router
b. Designated router and the BDR
c. To all routers on the link; all routers maintain adjacencies, but it is only the DR that updates the rest of the network
d. DR who updates the BDR every 3.3 minutes
7. What does it mean when an interface shows that it is in the init state?
a. That an interface is coming online, determining the IP address and OSPF parameters
b. That a router coming online is waiting for a hello from a neighbor
c. That this is an point-to-multipoint interface and is waiting to connect to the WAN cloud
d. Seen only on broadcast links, it shows that the election of the DR is in progress
8. If the network is stable and sees no changes, how often will it send LSAs? Why are these updates sent out periodically?
a. Every 30 minutes by default. This is to ensure the integrity of the topological databases.
b. Every 30 seconds by default. This is to ensure that the network is fully connected.
c. Never, there is no need if the network is stable.
d. Whenever an LSA is received, this means there is a problem on the network that needs to be ﬂooded through the network.
9. In learning a new route, what will OSPF do if a received LSA is not found in the topological database?
a. The LSA is ﬂooded immediately out of all the OSPF interfaces, except the interface from which the LSA was received.
b. The LSA is dropped and a message is sent to the transmitting router.
c. The LSA is placed in the topological database and an acknowledgement is sent to the transmitting router.
d. The sequence numbers are checked, and if the LSA is valid, it is entered into the topology database.
10. What does NBMA stand for?
a. Nonbroadcast multiadjacencies.
b. Nonbroadcast multiaccess.
c. Nonbreachable multidigest.
d. Nonbackup multiarea.
11. Which of the following best describes a virtual link?
a. A dial-on-demand link that appears to the routing tables of OSPF as if it is always present, but is raised when needed
b. A connection to another autonomous system that simulates one autonomous system
c. A virtual connection to a remote area that does not have any connections to the backbone (Area 0)
d. Point-to-point and point-to-multipoint link across an NBMA cloud
12. RFC 2328 describes the operation of OSPF in two modes across an NBMA cloud. What are they?
a. Point-to-point and broadcast operation
b. Nonbroadcast multiaccess and broadcast operation
c. Point-to-point and point-to-multipoint operation
d. Nonbroadcast multiaccess and point-to-multipoint operation
The answers to this quiz are found in Appendix A, “Answers to Chapter ‘Do I Know This Already?’ Quizzes and Q&A Sections.” The suggested choices for your next step are as follows:
■ 6 or less overall score —Read the entire chapter. This includes the “Foundation Topics” and “Foundation Summary” sections, the “Q&A” section, and the “Scenarios” at the end of the chapter.
■ 7–9 overall score —Begin with the “Foundation Summary” section, and then go to the “Q&A” section and the “Scenarios” at the end of the chapter. If you have trouble with these exercises, read the appropriate sections in “Foundation Topics.”
■ 10 or more overall score —If you want more review on these topics, skip to the “Foundation Summary” section, and then go to the “Q&A” section and the “Scenarios” at the end of the chapter. Otherwise, move to the next chapter.
184 Chapter 6: Using OSPF in a Single Area
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 speciﬁcations 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 efﬁcient in the way it propagates updates, allowing the network to grow or scale.
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 brieﬂy the OSPF terminology that you will see in the next few chapters.
Table 6-2 OSPF Terms
Understanding OSPF Fundamentals 185
Table 6-2 OSPF Terms (Continued)
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 packet—which creates and maintains these neighbors, adjacencies, and DRs—are all considered in this section.
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 conﬁgured 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 (126.96.36.199). 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.
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 deﬁned):
RRoouutteerr((ccoonnffiigg–iiff))##iipp oossppff pprriioorriittyy number
The number in the priority command can be set between 0–255, 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 2n-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 networkingintensive, 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.
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.
OSPF Features 189
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.
190 Chapter 6: Using OSPF in a Single Area
Figure 6-1 The DR
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 conﬁgured, 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 conﬁgured, 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 ﬁelds in the hello packet have speciﬁc responsibilities. Figure 6-2 shows the format of the hello packet. Table 6-3 describes each ﬁeld.
Figure 6-2 The Hello Packet
Table 6-3 The Hello Packet Fields
192 Chapter 6: Using OSPF in a Single Area
Table 6-3 The Hello Packet Fields (Continued)