OSPF Database Exchange-OSPF Router IDs


Link-state acquisition protocols ascertain the agreeable and anatomy of abstracts that describes network

topology, and ascertain the processes by which routers barter that abundant cartography information.

The name “link state” refers to the actuality that the cartography advice includes advice about

each abstracts link, forth with anniversary link’s accepted operational state. All the topological abstracts together

comprises the link-state database (LSDB). Anniversary link-state router applies the Dijkstra algorithm to

the database to account the current-best routes to anniversary subnet.

This affiliate break bottomward the OSPF advantage into three aloft sections. The aboriginal breadth details

how the cartography abstracts is exchanged. The added breadth covers OSPF architecture and the capacity of

the LSDB, which comprises altered types of link-state advertisements (LSAs). (The second

section covers both architecture and the LSDB because the architecture choices anon appulse which types

of LSAs are forwarded into the differing genitalia of an OSPF network.) The third breadth covers the

majority of the OSPF acceding capacity of OSPF for this chapter, although a few configuration

topics are interspersed in the aboriginal two sections.

OSPF Database Exchange

OSPF defines bristles altered letters that routers can use to barter LSAs. The action by

which LSAs are exchanged does not change whether a distinct breadth or assorted areas are used, so

this breadth will use a distinct OSPF breadth (area 0).

OSPF Router IDs

Before an OSPF router can accelerate any OSPF messages, it charge accept a altered 32-bit dotteddecimal

identifier alleged the OSPF router identifier (RID). Cisco routers use the following

sequence to accept their OSPF RID, alone affective on to the abutting footfall in this account if the antecedent step

did not accumulation the OSPF RID:

1. Use the router ID configured in the router-id id subcommand beneath router ospf.

2. Use the accomplished numeric IP abode on any currently “up and up” loopback interface.

3. Use the accomplished numeric IP abode on any currently “up and up” non-loopback interface.

NOTE This affiliate addresses the functions of OSPF Version 2. It ignores OSPF Version 3

(RFC 2740), which was alien primarily to abutment IPv6 and is covered in detail in

Chapter 20, “IP Version 6.”

OSPF Database Barter 243

The arrangement and argumentation are absolute simple, but some capacity are hidden in the sequence:

■ The interface from which the RID is taken does not accept to be akin by an OSPF network

command.

■ OSPF does not accept to acquaint a avenue to ability the RID’s subnet.

■ The RID does not accept to be attainable per the IP acquisition table.

■ Accomplish 2 and 3 attending at the then-current interface accompaniment to accept the RID aback the OSPF

process is started.

■ Routers accede alteration the OSPF RID aback the OSPF action is restarted, or aback the

RID is afflicted via configuration.

■ If a router’s RID changes, the blow of the routers in the aforementioned breadth will accept to accomplish a

new SPF calculation.

■ If the RID is configured with the router-id command, and the command charcoal unchanged,

that router’s RID will never change.

For these reasons, abounding bodies set their RIDs with the router-id command and use an obvious

numbering arrangement to accomplish it accessible to analyze a router by its RID.

Becoming Neighbors, Exchanging Databases, and Becoming Adjacent

OSPF anon encapsulates the bristles altered types of OSPF letters central IP packets, using

IP acceding 89, as listed in Table 9-2.

Table 9-2 OSPF Messages

Message Description

Hello Acclimated to ascertain neighbors, accompany a acquaintance accord to a 2-way state,

and adviser a neighbor’s admiration in case it fails

Database Description

(DD or DBD)

Used to barter abrupt versions of anniversary LSA, about on antecedent topology

exchange, so that a router knows a account of that neighbor’s LSAs

Link-State Request

(LSR)

A packet that identifies one or added LSAs about which the sending router

would like the acquaintance to accumulation abounding capacity about the LSAs

Link-State Update

(LSU)

A packet that contains absolutely abundant LSAs, about beatific in acceptance to an

LSR message

Link-State

Acknowledgement

(LSAck)

Sent to affirm cancellation of an LSU message

244 Affiliate 9: OSPF

These letters calm acquiesce routers to ascertain anniversary other’s attendance (Hello), apprentice which

LSAs are missing from their LSDBs (DD), appeal and anxiously barter the LSAs (LSR/LSU),

and adviser their neighbors for any changes in the cartography (Hello). Agenda that the LSAs

themselves are not OSPF messages—an LSA is a abstracts structure, captivated central a router’s LSDB, and

exchanged central LSU messages.

When a authentic abstracts articulation aboriginal comes up, OSPF routers aboriginal become neighbors application the Hello

message. At that point, they barter cartography advice application the added four OSPF messages.

Figure 9-1 outlines the all-embracing action amid two routers.

Figure 9-1 Overview of OSPF LSDB Exchange

Figure 9-1 shows the all-embracing bulletin flow, forth with the acquaintance accompaniment on anniversary router. An OSPF

router keeps a accompaniment apparatus for anniversary neighbor, advertisement the accepted acquaintance accompaniment in the achievement of

the appearance ip ospf acquaintance command. These acquaintance states change as the neighbors progress

through their messaging; in this example, the neighbors achieve into a abounding state, acceptation fully

adjacent, already the action is completed.

The “Foundation Summary” breadth at the end of this affiliate includes a advertence table

(Table 9-13) advertisement the acquaintance states and their meanings. The abutting few sections explain the

details abaft the action apparent in Amount 9-1.

Init

2-way

ExStart

DR Election,

if needed

DR Election,

if needed

Exchange

Loading

Full

Hello, Apparent [null], RID 1.1.1.1

RID 1.1.1.1

R1

RID 2.2.2.2

R2

Hello, Apparent [1.1.1.1], RID 2.2.2.2

Hello, Apparent [1.1.1.1, 2.2.2.2], RID 1.1.1.1

Hello, DR=z.z.z.z

DD (LSA Headers)

DD (LSA Headers)

DD (LSA Headers)

... LSR, LSU, LSAck (

Full LSAs)

...

Neighbor State

Down

(R1 to R2 Articulation comes up ...)

Init

2-way

ExStart

Exchange

Loading

Full

Neighbor State

Down

OSPF Database Barter 245

Becoming Neighbors: The Accost Process

Hello letters accomplish three aloft functions:

■ Ascertain added OSPF-speaking routers on accepted subnets

■ Analysis for acceding on some acceding parameters

■ Adviser bloom of the neighbors to accede if the acquaintance fails

To ascertain neighbors, Cisco OSPF routers accept for multicast Accost letters beatific to 224.0.0.5—

the All OSPF Routers multicast address—on any interfaces that accept been enabled for OSPF. The

Hellos are sourced from that router’s primary IP abode on the interface—in added words, Hellos

are not sourced from accessory IP addresses. (OSPF routers will acquaint accessory IP addresses,

but they will not accelerate Hellos from those IP addresses, and never anatomy acquaintance relationships using

secondary addresses.) Furthermore, OSPF neighbors will become absolutely adjoining if one or both of

the neighbors are application unnumbered interfaces for the affiliation amid them.

After two routers ascertain anniversary added by accepting Hellos from the added router, the routers

perform the afterward constant checks based on the accept Hellos:

■ Charge canyon the affidavit process

■ Charge be in the aforementioned primary subnet, including aforementioned subnet mask

■ Charge be in the aforementioned OSPF area

■ Charge be of the aforementioned breadth blazon (stub, NSSA, and so on)

■ Charge not accept alike RIDs

■ OSPF Accost and Asleep timers charge be equal

If any of these items do not match, the two routers artlessly do not anatomy a acquaintance relationship.

Also of agenda is one important account that does not accept to match: the OSPF action ID (PID), as

configured in the router ospf process-id command. Also, the MTU charge be according for the DD

packets to be auspiciously beatific amid neighbors, but this constant analysis is technically not part

of the Accost process.

The third important action for a Accost is to advance a baby action amid neighbors.

The neighbors accelerate Hellos every accost interval; abortion to accept a Accost aural the best dead

interval causes a router to accept that its acquaintance has failed. The accost breach defaults to

10 abnormal on LAN interfaces and 30 abnormal on T1 and slower WAN interfaces; the asleep interval

defaults to four times the accost interval.

Example 9-1 lists some basal OSPF command achievement accompanying to the acquaintance enactment with

Hellos, and the accost and asleep intervals.

246 Affiliate 9: OSPF

Flooding LSA Headers to Neighbors

When two routers apprehend Hellos, and the constant analysis passes, they do not anon accelerate packets

holding the LSAs. Instead, anniversary router creates and sends Database Description (DD, or sometimes

called DBD) packets, which accommodate the headers of anniversary LSA. The headers accommodate abundant information

to abnormally analyze anniversary LSA. Essentially, the routers barter a account of all the LSAs they anniversary know

about; the abutting footfall in the action is absolution a router appeal a new archetype of any old or alien LSAs.

The DD letters use an OSPF-defined simple error-recovery process. Anniversary DD packet, which

may accommodate several LSA headers, has an assigned arrangement number. The receiver acknowledges

a accustomed DD packet by sending an identical DD packet aback to the sender. The sender uses a

window admeasurement of one packet, again waits for the accepting afore sending the abutting DD packet.

Example 9-1 Accost Mismatches and Basal Acquaintance Parameters

! Below, alter letters appearance that this router disagrees with the accost and dead

! intervals on router 10.1.111.4; The “C” and “R” beggarly “configured” and “received,”

! respectively, acceptation that this router uses 30/120 for hello/dead, and the other

! router is aggravating to use 10/40.

R1# alter ip ospf hello

OSPF accost contest debugging is on

Jan 12 06:41:20.940: OSPF: Mismatched accost ambit from 10.1.111.4

Jan 12 06:41:20.940: OSPF: Asleep R 40 C 120, Accost R 10 C 30 Affectation R 255.255.255.0 C

255.255.255.0

! Below, R1’s accost and asleep intervals are listed for the aforementioned interface.

R1# appearance ip ospf int s 0/0.100

Serial0/0.100 is up, band acceding is up

Internet Abode 10.1.111.1/24, Breadth 0

Process ID 1, Router ID 1.1.1.1, Arrangement Blazon NON_BROADCAST, Cost: 64

Transmit Delay is 1 sec, Accompaniment DR, Antecedence 1

Designated Router (ID) 1.1.1.1, Interface abode 10.1.111.1

No advancement appointed router on this network

Timer intervals configured, Accost 30, Asleep 120, Delay 120, Retransmit 5

! Curve bare for brevity

! Below, R1 shows a acquaintance on S0/0.100, in the abounding state, acceptation the routers

! accept completed LSDB exchange. Agenda the accepted Asleep timer counts down, in this

! case from 2 minutes; the amount of 1:58 agency R1 aftermost accustomed a Accost from

! acquaintance 10.1.111.6 two abnormal ago.

R1# sh ip ospf acquaintance 6.6.6.6

Neighbor 6.6.6.6, interface abode 10.1.111.6

In the breadth 0 via interface Serial0/0.100

Neighbor antecedence is 0, Accompaniment is FULL, 8 accompaniment changes

DR is 10.1.111.1 BDR is 0.0.0.0

Poll breach 120

Options is 0x42

Dead timer due in 00:01:58

Neighbor is up for 00:17:22

! Curve bare for brevity

OSPF Database Barter 247

Database Descriptor Exchange: Master/Slave Relationship

As a acquaintance accord forms amid two routers (specifically, at the ExStart date of the

neighborship), the neighbors actuate which router is to be the adept and which is to be the

slave during the database barter amid them. The router with the college RID becomes

the adept and initiates the database exchange. At that point, the adept begins sending DD

packets to the slave, and the bondservant acknowledges them as they are received. Alone the adept can

increment arrangement numbers in the DD barter process.

Requesting, Getting, and Acknowledging LSAs

Once all LSA headers accept been exchanged application DD packets, anniversary adjoining router has a list

of LSAs accepted by the neighbor. Application that knowledge, a router needs to appeal a abounding archetype of

each LSA that is missing from its LSDB.

To apperceive whether a acquaintance has a added contempo archetype of a authentic LSA, a router looks at the

sequence cardinal of the LSA in its LSDB and compares it to the arrangement cardinal of that same

LSA abstruse from the DD packet. Anniversary LSA’s arrangement cardinal is incremented every time the

LSA changes. So, if a router accustomed (via a DD packet) an LSA attack with a afterwards sequence

number for a authentic LSA (as compared with the LSA in the LSDB), that router knows that the

neighbor has a added contempo LSA. For example, R1 beatific R2 an LSA attack for the blazon 1 LSA that

describes R1 itself, with arrangement cardinal 0x80000004. If R2’s database already captivated that LSA,

but with a arrangement cardinal of 0x80000003, again R2 would apperceive that it needs to ask R1 to send

the latest archetype (sequence cardinal 0x80000004) of that LSA.

Routers use Link-State Appeal (LSR) packets to appeal one or added LSAs from a neighbor. The

neighboring router replies with Link-State Amend (LSU) packets, which authority one or added full

LSAs. As apparent in Amount 9-1, both routers sit in a loading accompaniment while the LSR/LSA process

continues. Already the action is complete, they achieve into a abounding state, which agency that the two

routers should accept absolutely exchanged their databases, consistent in identical copies of the LSDB

entries for that breadth on both routers.

The LSR/LSA action uses a reliable acceding that has two options for acknowledging packets.

First, an LSU can be accustomed by the receiver of the LSU artlessly repeating the exact same

LSU aback to the sender. Alternatively, a router can accelerate aback an LSAck packet to acknowledge

the packet, which contains a account of accustomed LSA headers.

At the end of the action categorical in Amount 9-1, two neighbors accept exchanged their LSDBs. As a

result, their LSDBs should be identical. At this point, they can anniversary apart run the Dijkstra

Shortest Aisle Aboriginal (SPF) algorithm to account the best routes from their own perspectives.

NOTE New LSAs activate with arrangement cardinal 0x80000001, increase, and again blanket back

to 0x7FFFFFFF. If the LSA fabricated it to arrangement cardinal 0x80000000, the LSA charge be

reflooded throughout the network.

248 Affiliate 9: OSPF

Designated Routers on LANs

OSPF optimizes the LSA calamity action on multiaccess abstracts links by application the abstraction of a

designated router (DR). Afterwards the abstraction of a DR, anniversary brace of routers that allotment a data

link would become absolutely adjoining neighbors. Anniversary brace of routers would anon barter their

LSDBs with anniversary added as apparent in Amount 9-1. On a LAN with alone six routers, afterwards a DR,

15 altered pairs of routers would exist, and 15 altered instances of abounding database flooding

would occur. OSPF uses a DR (and advancement DR, or BDR) on a LAN or added multiaccess

network. The calamity occurs through the DR, decidedly abbreviation the accidental barter of

redundant LSAs.

The abutting breadth goes through the basics of the DR/BDR action on LANs, which is followed by

coverage of options of OSPF arrangement types and how they appulse OSPF calamity on Frame Relay

links.

Designated Router Access on LANs

Figure 9-2 depicts the DR calamity access that occurs with sending DD packets over

a LAN.

Figure 9-2 DR Access on a LAN

NOTE DRs accept one added aloft action besides convalescent the ability of LSA flooding

process. They additionally actualize a blazon 2 LSA that represents the subnet. LSA types are covered in the

next aloft section, “OSPF Architecture and LSAs.”

R2

R1

DROther (1.1.1.1)

Steps:

1. R1 sends DD to all DR Mcast abode (224.0.0.6)

2. DR sends unicast accepting by repeating aforementioned DD

3. DR sends DD with aforementioned advice as multicast to all SPF routers (224.0.0.5)

DROther (2.2.2.2) DR (8.8.8.8)

BDR (7.7.7.7)

DD, to 224.0.0.6

(All_DR)

DD, in

Acknowledgement,

to R1, Unicast

S1

S2

1

2

DD, to

224.0.0.5

(All_SPF)

3

Legend:

DR Appointed Router

BDR Advancement DR

DROther Neither the DR or BDR

OSPF Database Barter 249

Routers that are not the DR (including the BDR) accelerate DDs to the DR by sending them to multicast

address 224.0.0.6, the All OSPF DR Routers multicast address. The DR again acknowledges the

DDs with a unicast DD (Step 2 in Amount 9-2). The DR again floods a new DD packet to all OSPF

routers (multicast abode 224.0.0.5).

Figure 9-2 shows the three capital steps, but the non-DR routers additionally charge to accede the DD

packet beatific in Footfall 3. Typically, the acceptance occurs by the added routers anniversary replying

with a unicast DD packet.

Example 9-2 shows the achievement of a appearance ip ospf acquaintance command on R1 from Amount 9-2. Note

that R1 is in a abounding accompaniment with S2, which is the DR, with OSPF RID 8.8.8.8. R1 is additionally in a full

state with S1, the BDR, OSPF RID 7.7.7.7. However, R1 is in a 2WAY accompaniment with R2,

RID 2.2.2.2.

When a DR is acclimated on a link, routers end up as DR, BDR, or neither; a router that is neither

DR or BDR is alleged a DROther router. The DR and BDR anatomy abounding adjacencies with all other

neighbors on the link, so they ability a abounding accompaniment already the database barter action is complete.

However, two neighbors that are both DROthers do not become absolutely adjacent—they stop at the

2WAY state, as apparent in Archetype 9-2. Stopping at the 2WAY accompaniment amid two DROther routers

is normal; it artlessly agency that the Accost parameter-match analysis worked, but the neighbors do not

need to advance to the point of exchanging DD packets, because they do not charge to aback a DR

is present.

To call the actuality that some neighbors do not anon barter DD and LSU packets, OSPF

makes a acumen amid the agreement neighbors and adjacent, as follows:

■ Neighbors—Two routers that allotment a accepted abstracts link, that barter Accost messages, and

the Hellos charge bout for assertive parameters.

■ Adjoining (fully adjacent)—Two neighbors that accept completed the action of fully

exchanging DD and LSU packets anon amid anniversary other.

NOTE In topologies afterwards a DR, the DD and LSU packets are about beatific to the

224.0.0.5 All OSPF Routers multicast IP address.

Example 9-2 The appearance ip ospf acquaintance Command

R1# sh ip ospf acquaintance fa 0/0

Neighbor ID Pri Accompaniment Asleep Time Abode Interface

2.2.2.2 1 2WAY/DROTHER 00:00:35 10.1.1.2 FastEthernet0/0

7.7.7.7 1 FULL/BDR 00:00:38 10.1.1.3 FastEthernet0/0

8.8.8.8 1 FULL/DR 00:00:34 10.1.1.4 FastEthernet0/0

250 Affiliate 9: OSPF

Note that although DROther routers do not barter DD and LSU packets anon with each

other, like R1 and R2 in Amount 9-2, the DROther routers do end up with an identical archetype of the

LSDB entries by exchanging them with the DR.

DR Acclamation on LANs

As acclaimed in Amount 9-1, if a DR is elected, the acclamation occurs afterwards the routers accept become

neighbors, but afore they accelerate DD packets and ability the ExStart acquaintance state. Aback an OSPF

router alcove the 2-way accompaniment with the aboriginal acquaintance on an interface, it has already accustomed at least

one Accost from that neighbor. If the Accost letters accompaniment a DR of 0.0.0.0—meaning none has been

elected—the router waits afore attempting to accept a DR. This about occurs afterwards a abortion on

the LAN. OSPF routers delay with the ambition of giving all the routers on that subnet a adventitious to finish

initializing afterwards a abortion so that all the routers can participate in the DR election—otherwise,

the aboriginal router to become alive would consistently become the DR. (The time aeon is alleged the

OSPF delay time, which is set to the aforementioned amount as the Asleep timer.)

However, if the accustomed Hellos already account the DR’s RID, the router does not accept to delay before

beginning the acclamation process. This about occurs aback one router absent its affiliation to the

LAN, but added routers remained and affiliated to work. In this case, the newly-connected router

does not attack to accept a new DR, bold the DR listed in the accustomed Accost is absolutely the

current DR.

The acclamation action allows for the achievability of abounding altered scenarios for which routers may

and may not become the DR or BDR. Generally speaking, the afterward rules administer the DR/BDR

election process:

■ Any router with its OSPF antecedence set to amid 1–255 across-the-board can try to become DR by

putting its own RID into the DR acreage of its beatific Hellos.

■ Routers appraise accustomed Hellos, attractive at added routers’ antecedence settings, RIDs, and

whether anniversary acquaintance claims to appetite to become the DR.

■ If a accustomed Accost implies a “better” abeyant DR, the router stops claiming to appetite to be DR

and asserts that the bigger applicant should be the DR.

■ The aboriginal belief for “better” is the router with the accomplished priority.

■ If the priorities tie, the router with the college RID is better.

■ The router not claiming to be the DR, but with the college antecedence (or college RID, in case

priority is a tie) becomes the BDR.

OSPF Database Barter 251

■ If a new router arrives afterwards the election, or an absolute router improves its priority, it cannot

preempt the absolute DR and booty over as DR (or as BDR).

■ Aback a DR is elected, and the DR fails, the BDR becomes DR, and a new acclamation is captivated for

a new BDR.

After the DR is elected, LSA calamity continues as illustrated ahead in Amount 9-2.

Designated Routers on WANs and OSPF Arrangement Types

Using a DR makes acceptable faculty on a LAN because it improves LSA calamity efficiency.

Likewise, not application a DR on a point-to-point WAN articulation additionally makes sense, because with only

two routers on the subnet, there is no disability aloft which to improve. However, on

nonbroadcast multiaccess (NBMA) networks, arguments can be fabricated apropos whether a DR

is helpful. So, OSPF includes several options that accommodate a best of whether to use a DR on

WAN interfaces.

Cisco router interfaces can be configured to use, or not use, a DR, added a brace of added key

behaviors, based on the OSPF arrangement blazon for anniversary interface. The OSPF arrangement blazon determines

that router’s behavior apropos the following:

■ Whether the router tries to accept a DR on that interface

■ Whether the router charge statically configure a acquaintance (with the acquaintance command), or find

neighbors application the archetypal multicast Accost packets

■ Whether added than two neighbors should be accustomed on the aforementioned subnet

For instance, LAN interfaces absence to use an OSPF arrangement blazon of broadcast. OSPF broadcast

networks accept a DR, use Hellos to dynamically acquisition neighbors, and acquiesce added than two routers

to be in the aforementioned subnet on that LAN. For HDLC and PPP links, OSPF uses a arrangement blazon of

point-to-point, acceptation that no DR is elected, alone two IP addresses are in the subnet, and

neighbors can be activate through Hellos.

Table 9-3 summarizes the OSPF interface types and their meanings. Agenda that the interface type

values can be set with the ip ospf arrangement blazon interface subcommand; the aboriginal cavalcade in the

table lists the exact keyword according to this command. Also, for cases in which a DR is not

elected, all routers that become neighbors additionally attack to become adjoining by the absolute exchange

of DD, LSR, and LSU packets.

252 Affiliate 9: OSPF

Caveats Apropos OSPF Arrangement Types over NBMA Networks

When configuring OSPF over Frame Relay, the OSPF arrangement blazon abstraction can become a bit

troublesome. In fact, abounding CCIE Acquisition and Switching lab alertness texts and lab books focus

on the array of combinations of OSPF arrangement types acclimated with Frame Relay for various

interfaces/subinterfaces. The afterward account contains abounding of the key items you should analysis when

looking at an OSPF acceding over Frame Relay, aback the OSPF arrangement types acclimated on the

various routers do not match:

■ Accomplish abiding the absence Hello/Dead timers do not account the Accost constant analysis to fail. (See

Table 9-3 for the defaults for anniversary OSPF arrangement type.)

■ If one router expects a DR to be elected, and the added does not, the neighbors may appear up,

and abounding LSAs be communicated. However, appearance command achievement may appearance odd information,

and next-hop routers may not be reachable. So, accomplish abiding all routers in the aforementioned NBMA

subnet use an OSPF arrangement blazon that either does use a DR or does not.

■ If a DR is used, the DR and BDR charge accept a abiding basic ambit (PVC) to every other

router in the subnet. If not, not all routers will be able to apprentice routes, because the DR must

forward the DD and LSU packets to anniversary of the added routers. Routers that do not accept a PVC

to every added router should not be acceptable to become a DR/BDR.

■ If one router requires a changeless acquaintance command, about the added router on the other

end of the PVC does not crave a acquaintance command. For clarity, however, it is bigger to

configure acquaintance commands on both routers.

Table 9-3 OSPF Arrangement Types

Interface Type

Uses DR/

BDR?

Default

Hello

Interval

Requires a

neighbor

Command?

More than Two

Hosts Allowed

in the Subnet?

Broadcast Yes 10 No Yes

Point-to-point1 No 10 No No

Nonbroadcast2 (NBMA) Yes 30 Yes Yes

Point-to-multipoint No 30 No Yes

Point-to-multipoint nonbroadcast No 30 Yes Yes

Loopback No — — No

1 Absence on Frame Relay point-to-point subinterfaces.

2 Absence on Frame Relay concrete and multipoint subinterfaces.

OSPF Database Barter 253

Two absolute simple options abide for authoritative OSPF assignment over Frame Relay—both of which do

not crave a DR and do not crave acquaintance commands. If the architecture allows for the use of pointto-

point subinterfaces, use those, booty the absence OSPF arrangement blazon of point-to-point, and no

additional assignment is required. If multipoint subinterfaces are needed, or if the acceding charge not

use subinterfaces, abacus the ip ospf arrangement point-to-multipoint command on all the routers

works, afterwards acute added accomplishment to manually ascertain neighbors or anguish about which

router becomes the DR.

Example of OSPF Arrangement Types and NBMA

On NBMA networks with an OSPF arrangement blazon that requires that a DR be elected, you must

take affliction to accomplish abiding the absolute DR is elected. The acumen is that the DR and BDR charge each

have a PVC abutting it to all the DROther routers—otherwise, LSA calamity will not be possible.

So, with fractional meshes, the acclamation should be afflicted by configuring the routers’ antecedence and

RIDs such that the hub armpit of a hub-and-spoke fractional cobweb becomes the DR. Amount 9-3 shows

an archetype arrangement for which R1 should be the alone router accustomed to become DR or BDR.

Figure 9-3 Arrangement Acclimated in the Frame Relay Antecedence and Arrangement Blazon Example

Example 9-3 depicts the afterward scenarios apropos to DR acclamation in Amount 9-3:

■ The R1, R3, and R5 acceding is absolute for operating with absence OSPF arrangement type

nonbroadcast in a fractional mesh.

■ R6 has bare the ip ospf antecedence interface subcommand, causing it to inadvisably become

the DR.

■ R4 will be acclimated as an archetype of what not to do, in allotment to point out some absorbing facts

about OSPF appearance commands.

RID 1.1.1.1

10.3.1.3/23

S0/0.1 Mpt

S0/0.1 P-P

S0/0

S0.1 Mpt Phy.

S0.1 Mpt

E0/0

R1

R4

R5

R6

R3

10.3.1.4/23

10.1.111.0/24

FR

E0/0

10.5.1.5/24

E0/0

10.6.1.6/24

E0/0

254 Affiliate 9: OSPF

Example 9-3 shows alone the nondefault OSPF acceding settings; also, the routers accept an

obvious RID abacus arrangement (1.1.1.1 for R1, 2.2.2.2 for R2, and so on).

NOTE Amount 9-3 and Archetype 9-3 do not characterize a adapted architecture for Frame Relay and

OSPF. With this topology, application point-to-point subinterfaces in all cases, application four baby (/30)

subnets, and behind to OSPF arrangement blazon point-to-point would assignment well. Such a design,

however, would not crave any anticipation apropos the OSPF arrangement type. So, this example

is agilely advised to accommodate a accomplishments from which to appearance how the OSPF network

types work.

Example 9-3 Ambience Antecedence on NBMA Networks

! R1 configuration—the acquaintance commands absence to a antecedence amount of 0,

! acceptation R1’s acumen of that acquaintance is antecedence 0.

router ospf 1

log-adjacency-changes detail

network 0.0.0.0 255.255.255.255 breadth 0

neighbor 10.1.111.3

neighbor 10.1.111.4

neighbor 10.1.111.5

neighbor 10.1.111.6

! R3 configuration—R3’s interface antecedence is set to 0; R1 will use the higher

! of R3’s appear antecedence 0 (based on R3’s ip ospf antecedence interface

! subcommand) and the antecedence amount on R1’s acquaintance command, which defaulted

! to 0. So, R3 will not anytime become a DR/BDR.

interface Serial0/0.1 multipoint

ip abode 10.1.111.3 255.255.255.0

ip ospf antecedence 0

frame-relay interface-dlci 100

! R4 configuration—note from Amount 9-3 that R4 is application a point-to-point

! subinterface, with all defaults. This is not a archetypal use of a point-to-point

! subinterface, and is apparent to accomplish a few credibility afterwards in the example.

router ospf 1

network 0.0.0.0 255.255.255.255 breadth 0

! R5’s acceding is agnate to R3 in affiliation to the OSPF arrangement type

! and its implications.

interface Serial0.1 multipoint

ip abode 10.1.111.5 255.255.255.0

ip ospf antecedence 0

frame-relay interface-dlci 100

!

router ospf 1

network 0.0.0.0 255.255.255.255 breadth 0

! R6 configuration—R6 forgot to set the interface antecedence with the ip ospf

! antecedence 0 command, behind to antecedence 1.

router ospf 1

network 0.0.0.0 255.255.255.255 breadth 0

OSPF Database Barter 255

! Below, the after-effects of R6’s absence interface antecedence of 1—R6, with RID

! 6.6.6.6, and an appear antecedence of 1, wins the DR election. Agenda that the

! command is issued on R1.

R1# appearance ip ospf neighbor

Neighbor ID Pri Accompaniment Asleep Time Abode Interface

6.6.6.6 1 FULL/DR 00:01:52 10.1.111.6 Serial0/0

3.3.3.3 0 FULL/DROTHER 00:01:46 10.1.111.3 Serial0/0

N/A 0 ATTEMPT/DROTHER — 10.1.111.4 Serial0/0

5.5.5.5 0 FULL/DROTHER 00:01:47 10.1.111.5 Serial0/0

! Next, R1’s acquaintance command was automatically afflicted to “priority 1” based on

! the Hello, with antecedence 1, that R1 accustomed from R6. To anticipate this dynamic

! reconfiguration, you could add an ip ospf antecedence 0 command beneath R6’s s0/0.1

! interface.

R1# appearance run | beg router ospf 1

router ospf 1

network 0.0.0.0 255.255.255.255 breadth 0

neighbor 10.1.111.6 antecedence 1

neighbor 10.1.111.3

neighbor 10.1.111.4

neighbor 10.1.111.5

! curve bare for brevity

! Below, R4 is OSPF arrangement blazon “point to point,” with Hello/dead of 10/40.

! R1’s settings, based on Table 9-3, would be nonbroadcast, 30/120.

R4# appearance ip ospf int s 0/0.1

Serial0/0.1 is up, band acceding is up

Internet Abode 10.1.111.4/24, Breadth 0

Process ID 1, Router ID 4.4.4.4, Arrangement Blazon POINT_TO_POINT, Cost: 1562

Transmit Delay is 1 sec, Accompaniment POINT_TO_POINT,

Timer intervals configured, Accost 10, Asleep 40, Delay 40, Retransmit 5

! curve bare for brevity

! Below, R4 changes its arrangement blazon to yet a altered value, one that expects

! acquaintance commands, but does not apprehend a DR to be used.

R4# conf t

Enter acceding commands, one per line. End with CNTL/Z.

R4(config)# int s 0/0.1

R4(config-subif)# ip ospf arrangement point-to-multipoint non-broadcast

! Next, R1 and R4 become neighbors now that the Accost ambit match. Agenda that

! R1 believes that R4 is DROther.

R1# appearance ip ospf neighbor

Neighbor ID Pri Accompaniment Asleep Time Abode Interface

! curve bare for brevity

4.4.4.4 1 FULL/DROTHER 00:01:56 10.1.111.4 Serial0/0

! Below, R4 agrees it is in a abounding accompaniment with R1, but does not account R1 as DR,

! because R4 is not application the abstraction of a DR at all due to R4’s arrangement type.

R4# sh ip ospf neigh

Neighbor ID Pri Accompaniment Asleep Time Abode Interface

1.1.1.1 0 FULL/ — 00:01:42 10.1.111.1 Serial0/0.1

Example 9-3 Ambience Antecedence on NBMA Networks (Continued)

256 Affiliate 9: OSPF

The aboriginal and best important point from Archetype 9-3 is the absolute behavior of the two means to set

the antecedence in the example. The Cisco IOS Acceding Guide at Cisco.com states that the OSPF

neighbor command defines the antecedence of the neighbor. However, in practice, a router’s neighbor

priority ambience is compared with the antecedence central the Accost it receives from that neighbor—

and the beyond of the two ethics is used. In this example, R1’s acquaintance 10.1.111.6 command

(with absence antecedence of 0) was overridden by R6’s Hello, which was based on R6’s absence OSPF

interface antecedence of 1. So, during DR election, R1 and R6 angry on OSPF priority, and R6 won due

to its beyond (6.6.6.6 against 1.1.1.1) RID. R1 alike automatically afflicted its acquaintance command

dynamically to acquaintance 10.1.111.6 antecedence 1 to reflect the absolute antecedence for R6.

Also agenda that, although neighbors charge be statically configured for some arrangement types, the

neighbor command needs to be configured on alone one router. R3 and R5, with absolute working

configurations, did not absolutely charge a acquaintance command.

Finally, it ability assume that all is now accomplished amid R1 and R4 by the end of the example, but even

though the neighbors are absolutely adjacent, R4 cannot avenue packets to R3, R5, or R6 over the Frame

Relay network. For instance, R5 could accept some routes that point to 10.1.111.4 (R4’s Frame

Relay IP address) as the abutting hop. However, because R5 is application a multipoint subinterface, R5 will

not apperceive what PVC to use to ability 10.1.111.4. (Chapter 6, “IP Forwarding (Routing),” covers how

Frame Relay mapping occurs, and the argumentation acclimated on multipoint and point-to-point subinterfaces.) In

this case, the routers with multipoint subinterfaces would charge to add frame-relay map commands;

for example, R5 would charge a frame-relay map ip 10.1.111.4 100 advertisement command, causing

packets to next-hop 10.1.111.4 to go over DLCI 100 to R1, which would again avenue the packet

on to R4. Keep in apperception that R4’s acceding is not a recommended configuration.

SPF Calculation

So far, this affiliate has covered a lot of arena accompanying to the barter of LSAs. Regardless of the

OSPF arrangement blazon and whether DRs are used, already a router has new or altered advice in its

LSDB, it uses the Dijkstra SPF algorithm to appraise the LSAs in the LSDB and acquire the mathequivalent

of a amount of a network. This algebraic archetypal has routers, links, costs for anniversary link,

and the accepted (up/down) cachet of anniversary link. Amount 9-4 represents the SPF archetypal of a sample

network.

Figure 9-4 Single-Area SPF Calculation: Conceptual View

C 100

C 100

R5 R2 S2

VLAN 1

Route S2 – R1 – R5 : Amount 1 + 100 + 10 = 111

Route S2 – R2 – R5 : Amount 1 + 64 + 10 = 75

10.5.1.0/24 10.5.25.0/24

10.5.15.0/24

C 10 C 50

C 1

C 64

C 1 C 1

10.1.1.0/24

S1

OSPF Architecture and LSAs 257

Humans can calmly see the cessation that the SPF algorithm will reach, alike admitting the

algorithm itself is adequately complicated. SPF on a router finds all accessible routes to anniversary subnet,

adds the amount for anniversary approachable interface in that route, and again picks the aisle with the atomic cost.

OSPF again places those atomic (shortest) amount routes into the acquisition table. For example, S2

calculates two accessible routes to subnet 10.5.1.0/24, with the bigger avenue actuality out S2’s VLAN

1 interface, with R2 as the next-hop router. Additionally agenda in Amount 9-4 that the amount ethics are per

interface, and it is anniversary approachable interface’s amount that SPF adds to appear up with the absolute amount of

the route.

Steady-State Operation

Even afterwards a arrangement has stabilized, all routers in the aforementioned breadth accept the exact aforementioned LSAs, and

each router has alleged its best routes application SPF, the afterward is still authentic of routers running

OSPF:

■ Anniversary router sends Hellos, based on per-interface accost intervals.

■ Anniversary router expects to accept Hellos from neighbors aural the asleep breach on each

interface; if not, the acquaintance is advised to accept failed.

■ Anniversary router originally announcement an LSA refloods anniversary LSA (after incrementing its sequence

number by 1) based on a per-LSA Link-State Refresh (LSRefresh) breach (default

30 minutes).

■ Anniversary router expects to accept its LSA active aural anniversary LSA’s Maxage timer (default

60 minutes).

OSPF Architecture and LSAs

This breadth covers two aloft topics:

■ OSPF design

■ OSPF LSA types

Although these ability assume to be abstracted concepts, best OSPF architecture choices anon appulse the

LSA types in a arrangement and appoint restrictions on which neighbors may barter those LSAs.

This breadth starts with an OSPF architecture and analogue review, and again moves on to LSA types.

Toward the end of the section, OSPF breadth types are covered, including how anniversary aberration changes

how LSAs breeze through the altered types of OSPF chubby areas.

258 Affiliate 9: OSPF

OSPF Architecture Terms

OSPF architecture calls for alignment links into abutting areas. Routers that affix to links in

different areas are Breadth Border Routers (ABRs). ABRs charge affix to breadth 0, the courage area,

and one or added added areas as well. Autonomous System Boundary Routers (ASBRs) inject routes

external to OSPF into the OSPF domain, accepting abstruse those routes from absolute sources

from the Border Gateway Acceding (BGP) on bottomward to simple redistribution of changeless routes.

Figure 9-5 shows the agreement in the ambience of a simple OSPF design.

Figure 9-5 OSPF Architecture Terminology

Networks can use a distinct OSPF area, but application OSPF areas helps acceleration aggregation and reduce

overhead in an OSPF network. Application areas provides the afterward benefits:

■ Generally abate per-area LSDBs, acute beneath memory.

■ Faster SPF ciphering due to the sparser LSDB.

■ A articulation abortion in one breadth alone requires a fractional SPF ciphering in added areas.

■ Routes may alone be abbreviated at ABRs (and ASBRs); accepting areas allows summarization,

again shrinking the LSDB and convalescent SPF abacus performance.

When comparing the use of one breadth against application abounding areas, the cardinal of routers or subnets

does not shrink, but the admeasurement of the LSDB on best routers should shrink. The LSDB shrinks

because an ABR does not canyon denser and added abundant blazon 1 and 2 LSAs from one breadth to

Transit Network

Area x

Internal Router

Area y

R3

R2

R5

R4

R1

Stub Network

Area Border

Router

Area Border

Router

Backbone

Router

Backbone

Router

Area 0

Backbone

Area

Autonomous System

Border Router

ABR1 BB2 ASBR1

ABR2

BB2

Another

Routing

Protocol

OSPF Architecture and LSAs 259

another—instead, it passes blazon 3 arbitrary LSAs. LSA types 1 and 2 can be anticipation of as the

detailed cartography advice that causes best of the computing-intensive genitalia of the SPF

algorithm; by apery these abundant blazon 1 and 2 LSAs in a altered way in added areas,

OSPF achieves its ambition of abbreviation the furnishings of SPF.

OSPF Aisle Selection Process

OSPF has specific rules for selecting a aisle that crosses areas. Afore belief the capacity of OSPF

LSAs, it ability advice at this point to accept those rules:

■ Booty the beeline aisle to breadth 0.

■ Booty the beeline aisle beyond breadth 0 afterwards traversing a nonzero area.

■ Booty the beeline aisle to the destination afterwards traversing breadth 0.

Note that these altitude can aftereffect in both agee acquisition and suboptimal acquisition across

multiarea OSPF networks. For example, if the beeline aisle to a destination in breadth 0 is not also

the least-cost path, OSPF behaves added like ambit agent protocols than the link-state protocol

that it is, which can account headaches in both architecture and troubleshooting.

LSA Types and Arrangement Types

Table 9-4 lists the LSA types and their descriptions for reference; afterward the table, anniversary blazon is

explained in added detail, in the ambience of a alive network.

Table 9-4 OSPF LSA Types

LSA

Type

Common

Name Description

1 Router One per router, advertisement RID and all interface IP addresses. Represents stub

networks as well.

2 Arrangement One per alteration network. Created by the DR on the subnet, and represents the

subnet and the router interfaces affiliated to the subnet.

3 Net Arbitrary Created by ABRs to represent one area’s blazon 1 and 2 LSAs aback being

advertised into addition area. Defines the links (subnets) in the agent area,

and cost, but no cartography data.

4 ASBR Arbitrary Like a blazon 3 LSA, except it advertises a host avenue acclimated to ability an ASBR.

5 AS Alien Created by ASBRs for alien routes injected into OSPF.

6 Group

Membership

Defined for MOSPF; not authentic by Cisco IOS.

7 NSSA Alien Created by ASBRs central an NSSA area, instead of a blazon 5 LSA.

8 External

Attributes

Not implemented in Cisco routers.

9–11 Opaque Acclimated as all-encompassing LSAs to acquiesce for accessible approaching addendum of OSPF; for

example, blazon 10 has been acclimatized for MPLS cartage engineering.

260 Affiliate 9: OSPF

Before diving into the advantage of LSA types, two added definitions are needed:

■ Alteration network—A arrangement over which two or added OSPF routers accept become neighbors,

so cartage can alteration from one to the other.

■ Butt network—A subnet on which a router has not formed any acquaintance relationships.

Now on to the LSA types!

LSA Types 1 and 2

Each router creates and floods a blazon 1 LSA for itself. These LSAs call the router, its interfaces

(in that area), and a account of adjoining routers (in that area) on anniversary interface. The LSA itself

is articular by a link-state ID (LSID) according to that router’s RID.

Type 2 LSAs represent a alteration subnet for which a DR has been elected. The LSID is the RID of

the DR on that subnet. Agenda that blazon 2 LSAs are not created for subnets on which no DR has been

elected.

Armed with an LSDB with all the blazon 1 and 2 LSAs central an area, a router’s SPF algorithm

should be able to actualize a topological blueprint of the network, account the accessible routes, and

finally accept the best routes. For example, Amount 9-6 shows a sample internetwork that is used

in several accessible examples. Amount 9-7 shows a graphical appearance of the blazon 1 and blazon 2 LSAs

created in breadth 3.

Figure 9-6 Arrangement Acclimated in LSA Examples

R33

R3

Transit, with DR

10.3.0.0/23 Transit, no DR

10.3.13.0/24

C 1

E0/0

C 10

C 64

C 64

RID 10.3.3.33 C 1

Stub 10.3.2.0/23 Breadth 3

RID 3.3.3.3

Area 4

Area 5

E0/0 R4 C 1562

RID 4.4.4.4

10.4.1.4/23 10.4.14.0/24

E0/0 R5 C 50

C 100

C 64

RID 5.5.5.5 RID

2.2.2.2

10.5.1.5/24 10.5.25.0/24

10.5.15.0/24 C 100

S2

Area 0

RID

8.8.8.8

RID

1.1.1.1

ASBR

RID

7.7.7.7

10.1.1.0/24 Externals:

192.168.1.0/24 (E1)

192.168.2.0/24 (E2)

R1

R2

S1

OSPF Architecture and LSAs 261

Figure 9-7 Blueprint of Blazon 1 and 2 LSAs for Breadth 3

For subnets afterwards a DR, the blazon 1 LSAs authority abundant advice for the SPF algorithm to

create the algebraic archetypal of the topology. For example, R1 and R3 use point-to-point subinterfaces,

and the OSPF point-to-point arrangement type. SPF can bout up the advice apparent in the type

1 LSAs for R1 and R3 in Amount 9-7 to apperceive that the two routers are connected.

For alteration networks with DRs, OSPF uses a blazon 2 LSA to archetypal the subnet as a bulge in the SPF

mathematical model. Because the SPF action treats the blazon 2 LSA as a bulge in the graph, this

LSA is sometimes alleged a pseudonode. The blazon 2 LSA includes references to the RIDs of all

routers that are currently neighbors of the DR on that subnet. That information, accumulated with the

type 1 LSAs for anniversary router affiliated to the subnet represented by the blazon 2 LSA, allows SPF

to assemble an authentic account of the network.

Example 9-4 shows the LSAs in breadth 3 (Figures 9-6 and 9-7) via appearance commands.

Example 9-4 LSA Types 1 and 2 in Breadth 3

! R3’s LSDB is shown, with blazon 1 LSAs listed as “Router Articulation States” and

! blazon 2 LSAs as “Net Articulation States.” The command achievement shows a breadth for anniversary LSA

! type, in consecutive order.

R3# appearance ip ospf database

OSPF Router with ID (3.3.3.3) (Process ID 1)

Router Articulation States (Area 3)

continues

LSA Blazon 1

RID 10.3.3.33

E0/0

Stub 10.3.2.33/23

Cost 1

Represents

R33

Represents Transit

Net 10.3.0.0/23

Represents R3 Represents R1

E0/0

10.3.1.33

To Alteration with DR 10.3.1.3

Cost 1

E0/0

10.3.1.3

Transit with DR 10.3.1.3

Cost 10

S0/0.1

Stub 10.3.13.2/24

To RID 1.1.1.1

Cost 64

S0/0.3

Stub 10.3.13.1/24

To RID 3.3.3.3

Cost 64

To RID 10.3.3.33

Interface 10.3.3.33

To RID 3.3.3.3

Interface 10.3.1.3

LSA Blazon 2

DR 10.3.1.3

Subnet

10.3.0.0/23

LSA Blazon 1

RID 3.3.3.3

LSA Blazon 1

RID 1.1.1.1

262 Affiliate 9: OSPF

Link ID ADV Router Age Seq# Checksum Articulation count

1.1.1.1 1.1.1.1 1203 0x80000025 0x0072C3 2

3.3.3.3 3.3.3.3 779 0x80000027 0x003FB0 3

10.3.3.33 10.3.3.33 899 0x80000020 0x002929 2

Net Articulation States (Area 3)

Link ID ADV Router Age Seq# Checksum

10.3.1.3 3.3.3.3 1290 0x8000001F 0x00249E

! Curve bare for brevity

! Next, the specific LSA’s articulation ID is included in the appearance command, advertisement detail

! for the one LSA blazon 2 central breadth 3. Agenda that the “Link ID” is the DR’s

! interface abode on the subnet. The arrangement keyword refers to the arrangement LSAs (type 2 LSAs).

R3# appearance ip ospf database arrangement 10.3.1.3

OSPF Router with ID (3.3.3.3) (Process ID 1)

Net Articulation States (Area 3)

Routing Bit Set on this LSA

LS age: 1304

Options: (No TOS-capability, DC)

LS Type: Arrangement Links

Link Accompaniment ID: 10.3.1.3 (address of Appointed Router)

Advertising Router: 3.3.3.3

LS Seq Number: 8000001F

Checksum: 0x249E

Length: 32

Network Mask: /23

Attached Router: 3.3.3.3

Attached Router: 10.3.3.33

! Next, the blazon 1 LSA for R3 is listed. The articulation ID is the RID of R3. Agenda that

! the LSA includes advertence to anniversary butt and alteration articulation affiliated to R3. The router

! keyword refers to the router LSAs (type 1 LSAs).

R3# appearance ip ospf database router 3.3.3.3

OSPF Router with ID (3.3.3.3) (Process ID 1)

Router Articulation States (Area 3)

LS age: 804

Options: (No TOS-capability, DC)

LS Type: Router Links

Link Accompaniment ID: 3.3.3.3

Advertising Router: 3.3.3.3

LS Seq Number: 80000027

Checksum: 0x3FB0

Length: 60

Number of Links: 3

Link affiliated to: addition Router (point-to-point)

(Link ID) Adjoining Router ID: 1.1.1.1

(Link Data) Router Interface address: 10.3.13.3

Number of TOS metrics: 0

TOS 0 Metrics: 64

Example 9-4 LSA Types 1 and 2 in Breadth 3 (Continued)

OSPF Architecture and LSAs 263

The appearance ip ospf database command lists the LSAs in that router’s LSDB, with LSA blazon 1 LSAs

(router LSAs) first, again blazon 2 (network articulation states), continuing sequentially through the LSA

types. Additionally agenda that the LSDB for breadth 3 should be identical on R33, R3, and R1. However, on

R1, the appearance ip ospf database command lists all of R1’s LSDB entries, including LSAs from

other areas, so application an centralized router to attending at the LSDB may be the best abode to begin

troubleshooting a problem. Additionally agenda the costs for the routes on R3 and R1 at the end of the

example—the SPF algorithm artlessly added the approachable costs forth the routes, from anniversary router’s

perspective.

LSA Blazon 3 and Inter-Area Costs

ABRs do not advanced blazon 1 and 2 LSAs from one breadth to another. Instead, ABRs acquaint type

3 LSAs into one breadth in adjustment to represent subnets declared in both the blazon 1 and 2 LSAs in

another area. Anniversary blazon 3 arbitrary LSA describes a simple vector—the subnet, mask, and the

ABR’s amount to ability that subnet, as apparent in Amount 9-8.

Link affiliated to: a Butt Network

(Link ID) Network/subnet number: 10.3.13.0

(Link Data) Arrangement Mask: 255.255.255.0

Number of TOS metrics: 0

TOS 0 Metrics: 64

! Agenda that R3’s LSA refers to a alteration arrangement next, based on its DR RID –

! these curve acquiesce OSPF to apperceive that this router (R3) connects to the transit

! arrangement whose blazon 2 LSA has LSID 10.3.1.3.

Link affiliated to: a Alteration Network

(Link ID) Appointed Router address: 10.3.1.3

(Link Data) Router Interface address: 10.3.1.3

Number of TOS metrics: 0

TOS 0 Metrics: 10

! Below, the routes from R3 and R1 to 10.3.2.0/23 are shown. Agenda the amount values

! for anniversary reflect the accumulative costs of the approachable interfaces acclimated to reach

! the subnet—for instance, R3’s amount is the sum of its approachable interface cost

! (10) added R33’s approachable interface amount (1). R1’s amount is based on three outgoing

! links: R1 (cost 64), R3 (cost 10), and R33 (cost 1), for a absolute of 75. Also

! agenda that the time listed in the avenue is the time aback this LSA aboriginal arrived

! at the router, alike if the LSA has been active due to the LSRefresh interval.

R3# appearance ip avenue ospf 1 | accommodate 10.3.2.0

O 10.3.2.0/23 [110/11] via 10.3.1.33, 17:08:33, Ethernet0/0

R1# appearance ip avenue ospf | accommodate 10.3.2.0

O 10.3.2.0/23 [110/75] via 10.3.13.3, 17:10:15, Serial0/0.3

NOTE To announce a arrangement that is down, the adapted blazon 1 or 2 LSA is afflicted to show

a metric of 16,777,215 (224 – 1), which is advised to be an absolute metric to OSPF.

Example 9-4 LSA Types 1 and 2 in Breadth 3 (Continued)

264 Affiliate 9: OSPF

Figure 9-8 Representation of Breadth 3 Subnets as Blazon 3 LSAs in Breadth 0

Example 9-5 focuses on the three subnets central breadth 3, attractive at the blazon 3 arbitrary LSAs

created for those subnets by ABR R1. Agenda that the archetype shows commands on S2; S2 has

identical breadth 0 LSDB entries as compared with R1.

Example 9-5 LSA Blazon 3 Created by R1 for Breadth 3’s Subnets

! S2, centralized to breadth 0, does not accept the blazon 1 and 2 LSAs apparent by R3 aback in

! Archetype 9-4. However, blazon 3 LSAs (listed as “Summary Net Links”) appearance all

! three subnets central breadth 3. R1 is listed as the announcement router because it

! created the blazon 3 LSAs.

S2# appearance ip ospf database

! Curve bare for brevity

Summary Net Articulation States (Area 0)

Link ID ADV Router Age Seq# Checksum

10.3.0.0 1.1.1.1 257 0x80000001 0x00A63C

10.3.2.0 1.1.1.1 257 0x80000001 0x009A45

10.3.13.0 1.1.1.1 261 0x80000021 0x007747

! Curve bare for brevity

! Below, agenda that the arbitrary keyword is acclimated to appearance blazon 3 LSAs. The metric

! reflects R1’s amount to ability the subnet central breadth 3.

S2# appearance ip ospf database arbitrary 10.3.0.0

OSPF Router with ID (8.8.8.8) (Process ID 1)

Summary Net Articulation States (Area 0)

Routing Bit Set on this LSA

LS age: 341

Options: (No TOS-capability, DC, Upward)

LS Type: Arbitrary Links(Network)

Link Accompaniment ID: 10.3.0.0 (summary Arrangement Number)

Advertising Router: 1.1.1.1

LS Seq Number: 80000001

Checksum: 0xA63C

Length: 28

Network Mask: /23

TOS: 0 Metric: 74

! Next, S2’s routes to all three subnets are listed. S2 calculates its cost

! based on its amount to ability R1, added the amount listed in the blazon 3 LSA. For

R1 S2

Area 0

R2’s Three Blazon 3 LSAs:

Routing Table:

Add: My amount to reach

R1 (cost 1) to Blazon 3

LSA’s costs

Subnet 10.3.2.0/23, Amount 75

Subnet 10.3.0.0/23, Amount 74

Subnet 10.3.13.0/24, Amount 64

10.3.2.0/23: Amount 76

10.3.0.0/23: Amount 75

10.3.13.0/24: Amount 65

OSPF Architecture and LSAs 265

Example 9-5 shows how S2 affected its amount to the breadth 3 subnets. Routers account the amount for

a avenue to a subnet authentic in a blazon 3 LSA by abacus the afterward items:

1. The affected amount to ability the ABR that created and advertised the blazon 3 LSA.

2. The amount as listed in the blazon 3 LSA.

You can see the amount of the blazon 3 LSA with the appearance ip ospf database arbitrary link-id

command, and the amount to ability the announcement ABR with the appearance ip ospf border-routers

command, as apparent in Archetype 9-5.

The adorableness of this two-step amount abacus action is that it allows a cogent abridgement in

the cardinal of SPF calculations. Aback a blazon 1 or 2 LSA changes in some way that affects the

underlying routes—for instance, a articulation failure—each router in the breadth runs SPF, but routers inside

other areas do not. For instance, if R3’s E0/0 is shut down, all three routers in breadth 3 run SPF inside

that area, and the adverse for breadth 3 in the appearance ip ospf statistics command increments. However,

routers not central breadth 0 do not run SPF, alike admitting they amend their acquisition tables—a process

called a fractional run, fractional SPF, or fractional calculation.

For example, brainstorm that R3’s LAN interface fails. R33 again updates its blazon 2 LSA, advertisement a

metric of 16,777,215. R1 in about-face updates its blazon 3 LSA for 10.3.0.0/23, calamity that throughout

! example, the amount (above) in the blazon 3 LSA for 10.3.0.0/23 is 74; S2 adds

! that to S2’s amount to ability ABR R1 (cost 1), for a metric of 75.

S2# appearance ip avenue ospf | accommodate 10.3

O IA 10.3.13.0/24 [110/65] via 10.1.1.1, 00:16:04, Vlan1

O IA 10.3.0.0/23 [110/75] via 10.1.1.1, 00:05:08, Vlan1

O IA 10.3.2.0/23 [110/76] via 10.1.1.1, 00:05:12, Vlan1

! Next, S2’s amount to ability RID 1.1.1.1 is listed as amount 1.

S2# appearance ip ospf border-routers

OSPF Action 1 centralized Acquisition Table

Codes: i—Intra-area route, I—Inter-area route

i 1.1.1.1 [1] via 10.1.1.1, Vlan1, ABR, Breadth 0, SPF 18

i 2.2.2.2 [1] via 10.1.1.2, Vlan1, ABR, Breadth 0, SPF 18

i 7.7.7.7 [1] via 10.1.1.3, Vlan1, ASBR, Breadth 0, SPF 18

! Below, the appearance ip ospf statistics command lists the cardinal of SPF calculations.

R1# appearance ip ospf stat

OSPF action ID 1

------------------------------------------

Area 0: SPF algorithm accomplished 6 times

Area 3: SPF algorithm accomplished 15 times

Area 4: SPF algorithm accomplished 6 times

Area 5: SPF algorithm accomplished 5 times

! Curve bare for brevity

Example 9-5 LSA Blazon 3 Created by R1 for Breadth 3’s Subnets (Continued)

266 Affiliate 9: OSPF

area 0. The abutting footfall shows the computational savings: S2, application the two-step calculation, simply

adds its amount to R1 (still 1) to 16,777,215, finds the cardinal out of range, and removes the avenue from

the IP acquisition table. S2 did not accept to absolutely run the SPF algorithm to ascertain a new SPF tree.

Of authentic accent is that fractional calculations appear afterwards any avenue summarization. With

OSPF, avenue summarization does advice abate the all-embracing cardinal of routes that crave SPF

calculations, but avenue summarization is not adapted for fractional calculations to occur.

Removing Routes Advertised by Blazon 3 LSAs

When a router wants to abolish a avenue advertised by a blazon 3 LSA from the LSDBs of its

neighbors, it could artlessly abolish that avenue from its LSDB and stop announcement it. The trouble

with that access is that the avenue ability stick about for a while in added routers’ LSDBs. Clearly,

it is bigger to actively abolish the bootless avenue instead. As a result, the router that was advertising

the bootless avenue sets the route’s age to the Maxage, as declared in RFC 2328, and refloods it

throughout the acquisition domain. This removes the avenue as bound as accessible from the domain,

rather than cat-and-mouse for it to age out slowly.

LSA Types 4 and 5, and Alien Avenue Types 1 and 2

OSPF allows for two types of alien routes, appropriately called types 1 and 2. The blazon determines

whether alone the alien metric is advised by SPF aback acrimonious the best routes (external blazon 2,

or E2), or whether both the alien and centralized metrics are added calm to compute the metric

(external blazon 1, or E1).

When an ASBR injects an E2 route, it creates a blazon 5 LSA for the subnet. The LSA lists the metric.

The ASBR again floods the blazon 5 LSA throughout all areas. The added routers artlessly use the metric

listed in the LSA; no charge exists to add any amount on any links centralized to the OSPF domain.

To abutment E1 routes, the ASBR creates and floods a blazon 5 LSA. Aback an ABR again floods the

type 5 LSA into addition area, the ABR creates a blazon 4 LSA, advertisement the ABR’s metric to ability the

ASBR that created the blazon 5 LSA. Added routers account their costs to ability E1 routes in a

manner agnate to how metrics for LSA blazon 3 routes are calculated—by artful the amount to

reach the ASBR, and again abacus the amount listed in the blazon 5 LSA. Amount 9-9 outlines the

mechanics of how the LSAs are propagated, and how the metrics are calculated.

Figure 9-9 LSA Types 4 and 5 Propagation and the Effect on Blazon 1 Alien Routes

R3

Area 3

R1

• Amount to E2 Route: Metric in

LSA Blazon 5

• Amount to E1 Route: Add:

My Amount to ABR R1, Plus

the LSA Blazon 4’s Cost, Plus

the LSA Blazon 5’s Cost

2 1

3

• Change/Flood Blazon 4:

List R1’s Metric to Reach

the ASBR

• Flood Blazon 5’s, Metric

Unchanged

Area 0

S1

• Create/Flood Blazon 4 (7.7.7.7)

• Create/Flood Blazon 5’s, Metric 20

ASBR

RID 7.7.7.7

ABR

RID 1.1.1.1

Internal

Router

Note: Arrows Appearance Propagation of LSAs.

Externals:

192.168.1.0/24 (E1)

192.168.2.0/24 (E2)

OSPF Architecture and LSAs 267

E1 routes by analogue accommodate the amount as assigned aback the ASBR injected the avenue into OSPF,

plus any amount central the OSPF domain. To account the amount for the E1 route, a router central a

different breadth charge use two accomplish to account the centralized cost, and a third footfall to add the external

cost. For example, aback R3, centralized to breadth 3, calculates the amount to ability 192.168.2.0/24 (an E1

route), R3 adds the following:

■ R3’s affected breadth 3 amount to ability ABR R1 (RID 1.1.1.1).

■ R1’s amount to ability the ASBR that advertised the avenue (S2, RID 7.7.7.7). R1 announces this

cost in the forwarded LSA blazon 4 that describes a host avenue to ability ASBR 7.7.7.7.

■ The alien metric for the route, as listed in the blazon 5 LSA created by the ASBR.

Example 9-6 shows the apparatus of the metrics and LSAs for two alien routes: 192.168.1.0/

24 E1 with metric 20, and 192.168.2.0/24 E2, additionally with metric 20.

Example 9-6 Artful the Metric for Alien Types 1 and 2

! R3 has abstruse the two LSA blazon 5s.

R3# appearance ip ospf database | activate Type-5

Type-5 AS Alien Articulation States

Link ID ADV Router Age Seq# Checksum Tag

192.168.1.0 7.7.7.7 1916 0x8000002B 0x0080EF 0

192.168.2.0 7.7.7.7 1916 0x80000028 0x00FEF2 0

! Next, the detail for E2 192.168.2.0 is listed, with “metric type” referring

! to the alien avenue blazon E2. (192.168.1.0, not shown, is blazon 1.)

R3# appearance ip ospf database alien 192.168.2.0

OSPF Router with ID (3.3.3.3) (Process ID 1)

Type-5 AS Alien Articulation States

Routing Bit Set on this LSA

LS age: 1969

Options: (No TOS-capability, DC)

LS Type: AS Alien Link

Link Accompaniment ID: 192.168.2.0 (External Arrangement Number)

Advertising Router: 7.7.7.7

LS Seq Number: 80000028

Checksum: 0xFEF2

Length: 36

Network Mask: /24

Metric Type: 2 (Larger than any articulation accompaniment path)

TOS: 0

Metric: 20

Forward Address: 0.0.0.0

External Avenue Tag: 0

! Next, R1’s advertised amount of 1 amid itself and the ASBR is listed. Note

! that S1’s RID (7.7.7.7) is listed, with the ABR that forwarded the LSA into

continues

! breadth 3, R1 (RID 1.1.1.1) additionally listed.

R3# appearance ip ospf database asbr-summary

OSPF Router with ID (3.3.3.3) (Process ID 1)

Summary ASB Articulation States (Area 3)

Routing Bit Set on this LSA

LS age: 923

Options: (No TOS-capability, DC, Upward)

LS Type: Arbitrary Links(AS Boundary Router)

Link Accompaniment ID: 7.7.7.7 (AS Boundary Router address)

Advertising Router: 1.1.1.1

LS Seq Number: 8000000A

Checksum: 0x12FF

Length: 28

Network Mask: /0

TOS: 0 Metric: 1

! Below, R3’s affected amount to R1 (64) and again to S2 (7.7.7.7) are listed. Note

! that the absolute of 65 is the amount 64 to ability the ABR, added the amount 1 for the

! ABR to ability the ASBR.

R3# appearance ip ospf border-routers

OSPF Action 1 centralized Acquisition Table

Codes: i—Intra-area route, I—Inter-area route

i 1.1.1.1 [64] via 10.3.13.1, Serial0/0.1, ABR, Breadth 3, SPF 30

I 7.7.7.7 [65] via 10.3.13.1, Serial0/0.1, ASBR, Breadth 3, SPF 30

! Below, anniversary avenue is acclaimed as E1 or E2, with the E1 route’s metric including

! the alien amount (20), added amount to ability the ASBR (65).

R3# appearance ip avenue | accommodate 192.168

O E1 192.168.1.0/24 [110/85] via 10.3.13.1, 00:50:34, Serial0/0.1

O E2 192.168.2.0/24 [110/20] via 10.3.13.1, 00:50:34, Serial0/0.1