Network Bulls
www.networkbulls.com
Best Institute for CCNA CCNP CCSP CCIP CCIE Training in India
M-44, Old Dlf, Sector-14 Gurgaon, Haryana, India
Call: +91-9654672192
All the CCNP exams consider CCNA materials as prerequisites, so the Cisco Press CCNP
Exam Certification Guide series of books also assumes the reader is already familiar with
CCNA topics. However, the CCNP exams do include features that overlap with CCNA.
Additionally, most people forget some details about CCNA topics along the way. This section
is intended as a quick reminder of the basics from your earlier CCNA studies related
to OSPF, with the addition of a few related details you may not have seen suring your
CCNA study.
Note that this section does not cover every detail of CCNA-level OSPF topics–the main
goal is a quick refamiliarization. Following this review, throughout this and the next three
chapters, the rest of the CCNA-level OSPF features, plus many new OSPF-features, will
be detailed.
To that end, this section begins with a review of OSPF terminology and link state theory,
followed by a configuration and verification sample.
OSPF Link State Concepts
OPSF uses link state (LS) logic, which can be broken into three major branches. The first
step, neighbor discovery, has the same overall goal as EIGRP’s neighbor discovery process:
to find the neighboring routers, and exchange enough information so that the two routers
know whether they should exchange topology data. (Like EIGRP, OSPF keeps a list of
neighbors in its neighbor table.)
The second step, topology database exchange, requires each OSPF router to cooperate by
sending messages so that all routers learn topology information–information that is the
equivalent of the kinds of information a human would draw and write in a diagram of the
internetwork. Each router stores this topology information in its topology database,
sometimes called its link state database (LSDB). The information communicated by OSPF
routers and held in their LSDBs includes:
■ The existence of, and an identifier for, each router (router ID)
■ Each router interface, IP address, mask, and subnet
■ The list of routers reachable by each router on each interface
The third major step, route computation, means that each router independently analyzes
the topology data to choose the best routes from their perspective. In particular, LS algorithms
such as OSPF use a Shortest Path First (SPF) algorithm to analyze the data, choose
the shortest (best) route for each reachable subnet, and add the correct next-hop/outgoing
interface information for those routes to the IP routing table.
OSPF requires more planning than does EIGRP, particularly with regard to the necessity
for a hierarchical design using OSPF areas. Each router interface exists in a single area,
with some special routers, called area border routers (ABR), being the boundary between
www.CareerCert.info
Chapter 5: OSPF Overview and Neighbor Relationships 141
areas. Inside an area, routers exchange detailed topology information. However, the detailed
topology information does not flow between areas. Instead, the ABRs advertise
briefer information between areas, including information about subnets/masks, but the information
advertised into one area does not include details about the topology of the
other area. For perspective on the OSPF design issues, consider Figure 5-1, which shows a
typical hierarchical design.
One area, called the backbone area, must connect to all other areas. Packets that need to
pass between two nonbackbone areas must pass through (at least) one backbone router.
The ABRs must keep a copy of the LSDB for each area to which they attach; for example,
ABR1 has LSDBs for area 0, area 1, and area 2. However, the ABRs do not forward all the
topology details between areas; instead, they simply advertise the subnets (prefix/length)
between the areas.
Because of the sparse information advertised into one area about another area, topologically,
routers inside one area know only about the subnets in another area. They do not
know about the details of the topology in the other area; instead, from a topology perspective,
it appears as if the subnets from another area connect to the ABR. Figure 5-2
shows the concept with the two routers in area 3 from Figure 5-1.
Figure 5-2 essentially shows the contents of area 3’s LSDB in graphical form. Two routers
exist, with a link between them, and one LAN subnet (Subnet 3) internal to the area.
However, the other three sample subnets shown in Figure 5-1 (Subnets 1, 2, and 3) appear
Table 5-2 Commonly Used OSPF Terms
Term Definition
Link State Advertisement (LSA) The name of a class of OSPF data structures that hold
topology information. LSAs are held in memory in the
LSDB and communicated over the network in LSU messages.
Area A contiguous grouping of routers and router interfaces.
Routers in an area strive to learn all topology information
about the area, but they do not learn topology information
about areas to which they do not connect.
Area Border Router (ABR) A router that has interfaces connected to at least two different
OSPF areas, including the backbone area. ABRs
hold topology data for each area, and calculate routes for
each area, and advertise about those routes between areas.
Backbone router Any router that has at least one interface connected to the
backbone area.
Internal routers A router that has interfaces connected to only one area,
making the router completely internal to that one area.
Designated Router (DR) On multiaccess data links like LANs, an OSPF router
elected by the routers on that data link to perform special
functions. These functions include the generation of LSAs
representing the subnet, and playing a key role in the database
exchange process.
Backup Designated Router (BDR) A router on a multiaccess data link that monitors the DR
and becomes prepared to take over for the DR, should the
DR fail.
www.CareerCert.info
144 CCNP ROUTE 642-902 Official Certification Guide
OSPF Configuration Review
Other than the configuration of the OSPF areas, the configuration of OSPF basics looks
similar to a simple EIGRP configuration. IOS uses the router ospf process-id command,
plus one or more network net-id wildcard-mask area area-id subcommands, to enable
OSPF on the router and on router interfaces. The rules for these commands are as follows:
Step 1. Neighboring routers’ router ospf process-id commands do not have to be
configured with the same process-id parameter to become neighbors.
Step 2. IOS only enables OSPF on interfaces matched by an OSPF network command.
When enabled, the router does the following:
Attempts to discover OSPF neighbors on that interface by sending multicast
OSPF Hello messages
Includes the connected subnet in future topology database exchanges
Step 3. To match an interface with the network command, IOS compares the net-id
configured in the network command with each interface’s IP address, while using
the configured wildcard-mask as an ACL wildcard mask.
Step 4. Regardless of the order in which the network commands are added to the configuration,
IOS puts these commands into the configuration file with the most
specific (most binary 0s) wildcard mask first. IOS lists the network commands
in this sorted order in the configuration.
Step 5. The first network command that matches an interface, per the order shown in
the output of the show running-config command, determines the OSPF area
number associated with the interface.
Example 5-1 shows a sample configuration for each router in Figure 5-3.
Example 5-1 OSPF Configuration on Routers R1, R2, and R3
! On Router R1: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
interface loopback 1
ip address 1.1.1.1 255.255.255.255
router ospf 1
network 10.0.0.0 0.255.255.255 area 1
! On Router R2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
interface loopback 1
ip address 2.2.2.2 255.255.255.255
router ospf 2
network 10.1.12.2 0.0.0.0 area 1
network 10.1.0.0 0.0.255.255 area 0
! On Router R3: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
interface loopback 1
ip address 3.3.3.3 255.255.255.255
router ospf 3
network 10.1.0.0 0.0.255.255 area 0
network 192.168.3.3 0.0.0.0 area 0
First, note that all three routers use a different process ID on their respective router ospf
process-id commands; these mismatches do not prevent neighborship.
Next, consider the requirement that R1’s S0/0/0 and R2’s S0/0/1 must be in the same area.
Typically, all routers on the same subnet need to be in the same area; the routers themselves
are the boundary between areas. In this case, R1’s network 10.0.0.0 0.255.255.255
area 1 command matches all interfaces whose addresses begin with 10 in the first octet
and assigns those interfaces (Fa0/0 and S0/0/0) to area 1. Similarly, R2’s network 10.1.12.2
0.0.0.0 area 1 command matches only one IP address–R2’s S0/0/1 IP address–and places it
in area 1. Looking further at R2’s OSPF configuration, note that both network commands
actually match the 10.1.12.2 S0/0/1 IP address: one with area 0, and one with area 1. However,
R2 orders these two network commands with the most-specific wildcard mask first,
placing the command with wildcard mask 0.0.0.0 first, and the one with wildcard
0.0.255.255 second. Then, R2 compares the commands to the interface IP addresses in order,
so R2 places S0/0/1 into area 1. (Note that in real internetworks, choosing wildcard
masks such that it is clear which network command should match each interface is the
better choice.)
On R3, the network 10.1.0.0 0.0.255.255 area 0 command matches interfaces Fa0/0 and
S0/0/0, adding them to area 0. R3 then needs an additional network command to enable
OSPF on R3’s Fa0/1 interface with all three interfaces in area 0.
Finally, note that the addition of the loopback interfaces causes each router to choose an
obvious OSPF router ID (RID). OSPF uses the same logic as does EIGRP to choose a
www.CareerCert.info
146 CCNP ROUTE 642-902 Official Certification Guide
router ID on each router, at the time the OSPF process is initialized, as follows, in the
listed order of precedence:
Step 1. Use the router ID defined in the router-id x.x.x.x OSPF router subcommand.
Step 2. Use the highest IP address of any up/up loopback interface.
Step 3. Use the highest IP address of any up/up non-loopback interface.
Note that for the second and third choices, the interface does not need to have OSPF
enabled.
OSPF Verification Review
The verification process, whether it uses a formal verification plan, must have some
knowledge of the intended design and function of the network. The design and implementation
documents dictate what the network should do, and the verification plan should
confirm whether the network is meeting those goals.
For the purposes of this OSPF review section, assume that the only design goal for the internetwork
in Figure 5-3 is that OSPF be used so that all routers have routes to reach all
subnets shown in the figure, within the constraints of the area design.
To verify such a simple design, an engineer should start by confirming on which interfaces
OSPF has been enabled on each router. The next step should be to determine if the OSPF
neighbor relationships that should occur are indeed up and working. Then, the OSPF
topology table should be examined to confirm that non-ABRs have only topology information
for their respective areas. Finally, the IP routes on each router should be examined,
confirming that all routes are known. To that end, Table 5-3 summarizes five key show
commands that provide the information to answer these questions:
Key
Topic
Table 5-3 Most Commonly Used OSPF show Commands
Command Key Information
show ip ospf interface brief Lists the interfaces on which OSPF is enabled (based on the
network commands); it omits passive interfaces.
show ip protocols Lists the contents of the network configuration commands for
each routing process, and a list of enabled but passive interfaces.
show ip ospf neighbors Lists known neighbors, including neighbor state; does not list
neighbors for which some mismatched parameter is preventing
a valid OSPF neighbor relationship.
show ip ospf database Lists all LSAs for all connected areas. (See Chapter 6 for more
detail on the LSA types seen in the database.)
show ip route Lists the contents of the IP routing table, listing OSPF-learned
routes with a code of O on the left side of the output.
Key
Topic
www.CareerCert.info
Chapter 5: OSPF Overview and Neighbor Relationships 147
! On Router R2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Note that S0/0/1 is shown as in area 1, while the other 3 interfaces are all
in
! Area 0.
R2#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Se0/0/0 2 0 10.1.23.2/30 64 P2P 1/1
Fa0/0 2 0 10.1.2.2/25 1 DR 0/0
Se0/0/1 2 1 10.1.12.2/30 64 P2P 1/1
! Next, note that R2 lists two “Routing Information Sources”, 1.1.1.1 (R1) and
! 3.3.3.3 (R3). These routers, listed by RID, should mirror those listed
! in the output of the show ip ospf neighbors command that follows.
R2#show ip protocols
Routing Protocol is “ospf 2”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 2.2.2.2
It is an area border router
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.12.2 0.0.0.0 area 1
10.1.0.0 0.0.255.255 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
3.3.3.3 110 00:01:08
1.1.1.1 110 00:01:08
Distance: (default is 110)
! Note that the Full state means that the database exchange process is
Example 5-2 shows samples of each command listed in Table 5-3. Note that the output
highlights various samples of items that should be verified, including the interfaces on
which OSPF is enabled, the known neighbors, the neighbors’ state, the LSAs in the topology
table, and the OSPF routes.
Example 5-2 OSPF Verification on Routers R1, R2, and R3
www.CareerCert.info
148 CCNP ROUTE 642-902 Official Certification Guide
! fully completed between these two neighbors.
R2#show ip ospf neighbors
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:34 10.1.23.1 Serial0/0/0
1.1.1.1 0 FULL/ - 00:00:34 10.1.12.1 Serial0/0/1
! On Router R1: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Note that R1’s LSDB includes a “Router Link State” for RID 1.1.1.1 (R1)
! and R2 (2.2.2.2), but not 3.3.3.3 (R3), because R3 is not attached to area
1.
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 210 0x80000004 0x001533 3
2.2.2.2 2.2.2.2 195 0x80000002 0x0085DB 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
10.1.2.0 2.2.2.2 190 0x80000001 0x00B5F0
10.1.3.0 2.2.2.2 190 0x80000001 0x00AE76
10.1.23.0 2.2.2.2 190 0x80000001 0x0031A4
192.168.3.0 2.2.2.2 191 0x80000001 0x008B3B
! Below, note that R1 has routes for all remote subnets, including R3’s
! LAN subnets, even though R1 does not list R3 in its LSDB.
R1#show ip route ospf
10.0.0.0/8 is variably subnetted, 5 subnets, 4 masks
O IA 10.1.3.0/26 [110/129] via 10.1.12.2, 00:04:13, Serial0/0/0
O IA 10.1.2.0/25 [110/65] via 10.1.12.2, 00:04:13, Serial0/0/0
O IA 10.1.23.0/30 [110/128] via 10.1.12.2, 00:04:13, Serial0/0/0
192.168.3.0/26 is subnetted, 1 subnets
O IA 192.168.3.0 [110/129] via 10.1.12.2, 00:04:13, Serial0/0/0
www.CareerCert.info
Chapter 5: OSPF Overview and Neighbor Relationships 149
OSPF Feature Summary
Table 5-4 summarizes some of the key facts about OSPF. The table includes some review
items from the CCNA level OSPF topics, plus some topics that will be developed in
chapters 5 through 8. The items that are not CCNA topics are included just for convenience
when reviewing for final preparation before taking the exam.
This concludes the review of OSPF topics. The rest of this chapter focuses on OSPF topics
related to the formation of OSPF neighbor relationships.
No comments:
Post a Comment