Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016....

193
Chapter 3: Configuring the Open Shortest Path First Protocol Shortest Path First Protocol CCNP ROUTE: Implementing IP Routing © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public ROUTE v6 Chapter 3 1

Transcript of Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016....

Page 1: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol

CCNP ROUTE: Implementing IP Routing

© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco PublicROUTE v6 Chapter 3

1

Page 2: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3 Objectives

Describe OSPF terminology and operation within various enterprise environments (3)enterprise environments. (3) Describe the function and operation of packets in OSPF

routing. (26)g ( ) Configure and verify basic OSPF. (53) Describe and configure OSPF in various WAN network

types. (74) Describe each common LSA types and how they form the

layout of the OSPF LSDB (108)layout of the OSPF LSDB. (108) Explain the relationship between and how to interpret the

OSPF LSDB and routing table. (117)OSPF LSDB and routing table. (117) Configure and verify advanced OSPF features. (127) Configure and verify OSPF authentication. (168)

Chapter 32© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

g y ( )

Page 3: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

UnderstandingUnderstanding OSPF Terminology andTerminology and Operation

Chapter 33© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 4: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Open Shortest Path First (OSPF)

OSPF is a standards-based link-state IP routing protocol d ib d i RFC 2328described in RFC 2328.• It was developed to meet RIP’s inability to scale beyond 15 routers.• Proposed by IETF in 1988 and formalized in 1991• Proposed by IETF in 1988 and formalized in 1991.• There are 2 versions; OSPFv2 is for IPv4 and OSPFv3 is for IPv6.

Chapter 34© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 5: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Features

OSPF features include:• Fast convergence• Supports VLSM• Efficient use of bandwidth Routing changes trigger routing updates• Efficient use of bandwidth - Routing changes trigger routing updates

(no periodic updates)• Supports large network size• Routing based on best path selection• Grouping of members into Areas

Chapter 35© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 6: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Link-State Protocol Characteristics

With link-state routing protocols, each router has the full i t f th t k t l d i d d tlpicture of the network topology, and can independently

make a decision based on an accurate picture of the network topologynetwork topology. To do so, each link-state router keeps a record of:

• Its immediate neighbor routers.Its immediate neighbor routers.• All the other routers in the network, or in its area of the network, and

their attached networks.• The best paths to each destination.

Chapter 36© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 7: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Link-State Protocol Advantages

Respond quickly to network changes. Send triggered updates when a network change occurs. Send periodic updates (link-state refresh), at long intervals,

h 30 i tsuch as every 30 minutes.• Uses LSAs to confirm topology information before the information

ages out of the link-state databaseages out of the link state database.

Chapter 37© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 8: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Terminology OSPF databases / tables:

• OSPF adjacency database = Neighbor tableOSPF adjacency database Neighbor table• OSPF link-state database = Topology table• OSPF forwarding database = Routing table Link state advertisements (LSAs) Link-state advertisements (LSAs) Link-State Database (LSDB) Shortest-Path First (SPF) Routing Algorithm( ) g g

• Dijkstra algorithm SPF Tree OSPF Areas OSPF Areas

• Backbone (transit) and standard areas. Types of OSPF routers:

• Internal router, backbone router, Area Border Router (ABR), Autonomous System Boundary Router (ASBR)

• Designated Router (DR) and Backup Designated Router (BDR)

Chapter 38© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 9: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Router Tables / Databases

OSPF maintains three databases which are used to create th t blthree tables.

Database Table Description

Adjacency Database

Neighbor Table

• List of all neighbors routers to which a router has established bidirectional communication.

• This table is unique for each router.C b i d i th h i f i hb d• Can be viewed using the show ip ospf neighbor command.

Link-state Database

Topology Table

• List of information about all other routers in the network.• The database shows the network topology.• All routers within an area have identical link state databasesDatabase Table • All routers within an area have identical link-state databases.• Can be viewed using the show ip ospf database command.• List of routes generated when an algorithm is run on the link-

state database.Forwarding Database

Routing Table

state database• Each router’s routing table is unique and contains

information on how and where to send packets to other routers.

• Can be viewed using the show ip route command

Chapter 39© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

• Can be viewed using the show ip route command.

Page 10: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Link-State Advertisements (LSAs)

When a change occurs in the network topology thethe network topology, the router experiencing the change creates a link-state advertisement (LSA) concerning that link.• LSAs are also called link state• LSAs are also called link-state

protocol data units (PDUs). The LSA is multicasted to

all neighboring devices using either 224.0.0.5 or 224.0.0.6.224.0.0.6. Routers receiving the LSA

immediately forward it to

Chapter 310© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

all neighboring routers.

Page 11: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Link-State Database (LSDB)

Routers receiving add the LSA t th i li k t tLSA to their link-state database (LSDB). The LSDB is used to The LSDB is used to

calculate the best paths through the network.through the network. OSPF best route

calculation is based on Edsger Dijkstra's shortest path first (SPF) algorithm.

Chapter 311© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 12: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

SPF Routing Algorithm

The SPF algorithm l laccumulates costs along

each path, from source to destinationdestination. • The accumulated costs is then

used by the router to build a topology table.

Chapter 312© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 13: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

SPF Tree and Routing Table

The topology table is ti ll SPF tessentially an SPF tree

which contains a listing of all OSPF networks and theall OSPF networks and the costs to reach them. The resulting best routesThe resulting best routes

are then considered to be added to the routing table.

Chapter 313© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 14: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Areas

To minimize processing and memory requirements, OSPF di id th ti t l i t t l hi hcan divide the routing topology into a two-layer hierarchy

called areas. Characteristics of OSPF areas include: Characteristics of OSPF areas include:

• Minimizes routing table entries.• Localizes impact of a topology change within an areaLocalizes impact of a topology change within an area.• Detailed LSA flooding stops at the area boundary.• Requires a hierarchical network design.

Chapter 314© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 15: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Two-Layer Hierarchy

Backbone AreaR f d t A 0• Referred to as Area 0

• Also known as the Transit Area. Regular (Standard) Areasegu a (Sta da d) eas

• Also known as a nonbackbone areas.• All regular areas must connect to the

b kbbackbone area. • Standard areas can be further

defined as stub areas, totally stubby areas, and Not-so-stubby areas (NSSAs).

Th ti l b f t i b d f t h The optimal number of routers per area varies based on factors such as network stability, but Cisco recommends:• An area should have no more than 50 routers.

Chapter 315© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

• A router should not be in more than 3 areas.

Page 16: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Router Types

How OSPF routers exchange information is based on:• The function of the router.• The type of LSAs it can forward.• The type of area it resides in• The type of area it resides in.

OSPF routers may function as either:• Internal router• Internal router• Backbone router• Area Border Router (ABR)( )• Autonomous System Boundary Router (ASBR)

Note:• A router can exist as more than one router type.

Chapter 316© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 17: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Router Types

All All Backbone Backbone RoutersRouters

ABR and ABR and Backbone Backbone

RouterRouter

ABR and ABR and Backbone Backbone

RouterRouter

Internal Internal RoutersRouters

InternalInternal

RoutersRoutersRouterRouter RouterRouter

Internal Internal RouterRouter

Internal Internal RouterRouter

ASBR and ASBR and Backbone Backbone

RouterRouter

Chapter 317© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 18: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Internal Router

Routers that have all their interfaces within the same area. Internal routers in the same area:

• Have identical LSDBs.R i l f th ti l ith• Run a single copy of the routing algorithm.

Chapter 318© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 19: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Backbone Router

OSPF design rules require that all areas be connected to a i l b kb (A 0)single backbone area (Area 0).

• Area 0 is also known as Area 0.0.0.0

An Area 0 router is referred to as a backbone router An Area 0 router is referred to as a backbone router. • Depending on where it resides in Area 0, it may also be called an

Internal router, an ABR, or an ASBR., ,

Chapter 319© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 20: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Area Border Router (ABR)

Routers with interfaces attached to multiple areas and ibl fresponsible for:

• Joining areas together. • Maintaining separate link state databases for each area• Maintaining separate link-state databases for each area.• Routing traffic destined to/arriving from other areas.• Summarizing information about each area connected and flooding the g g

information through area 0 to the other areas connected.• An area can have one or more ABR.

ABR cannot send LSU’s to other areas until the entire intra-area is synchronized.

Chapter 320© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 21: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Autonomous System Boundary Router (ASBR)

Routers that have at least one interface connected to th AS h OSPF t kanother AS, such as a non-OSPF network.

Routers support redistribution.Th i t OSPF t k i f ti t th OSPF t k• They can import non-OSPF network information to the OSPF network.

Should reside in the backbone area.

Chapter 321© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 22: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Router Types

Routers A, B, C, D and E are backbone routers.B kb t k A 0• Backbone routers make up Area 0.

Routers C, D and E are area border routers (ABRs).• ABRs attach all other areas to Area 0• ABRs attach all other areas to Area 0. Routers A, B, F, G, and H are internal routers.

• Internal routers are completely within an area and do not interconnect

Chapter 322© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

p yto any other area or autonomous system (AS).

Page 23: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

DR and BDR Routers

To reduce the amount of OSPF traffic on multiaccess b d t t k h Eth t OSPF l tbroadcast networks such as Ethernet, OSPF elects:• A Designated Router (DR)• A Backup Designated Router (BDR)• A Backup Designated Router (BDR)

The DR is responsible for updating all other OSPF routers (called DROTHERs) when a change occurs inrouters (called DROTHERs) when a change occurs in the multiaccess network. • The BDR monitors the DR and takes over should the DR fail.

A router connected to multiple broadcast networks can be a DR on one segment and a regular (DROTHER) router on another segment.

Chapter 323© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 24: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Metric Calculation

The OSPF metric calculation is b d t

Lower CostLower Cost

based on cost. Cost is an indication of the overhead

required to send packets across a

HighHigh

required to send packets across a certain interface. The cost of an interface is inversely w

idth

The cost of an interface is inversely proportional to the bandwidth of that interface.

Ban

dw

• A higher bandwidth is attributed a lower cost.

B

• A lower bandwidth is attributed a higher cost.

LowLow

Higher CostHigher Cost

Chapter 324© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Higher CostHigher Cost

Page 25: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Cost Formula Cost = 100,000,000 / Bandwidth (bps)

F l For example: • 10BaseT = 100,000,000 / 10,000,000 = 10 • T1 = 100 000 000 / 1 544 000 = 64• T1 = 100,000,000 / 1,544,000 = 64The cost is based on an Reference Bandwidth that can be changed to acommodate faster speeds.

Chapter 325© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 26: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Packets

Chapter 326© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 27: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Packet

OSPF packets are used to perform several functions, i l diincluding:• Neighbor discovery, to form adjacencies.• Flooding link state information to facilitate LSDBs being built in each• Flooding link-state information, to facilitate LSDBs being built in each

router.• Running SPF to calculate the shortest path to all known destinations.• Populating the routing table with the best routes to all known

destinations.

Chapter 327© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 28: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Packet

F H d

Frame Payload

CRCFrame Header CRCIP Header

Protocol Number(OSPF = 89)

OSPFHeader

OSPFMessage

On a LAN, the OSPF packet is encapsulated

f

The destination multicast IP address is set to either: The OSPF header

f

The OSPF message

in an Ethernet frame with a destination multicast MAC address of either:

01 00 E 00 00 0

address is set to either:• 224.0.0.5 (All OSPF routers

listen to this address.)• 224.0.0.6 (All DR and BDR

routers listen to this address

identifies the type of OSPF packet, the router ID and the area number.

contains the packet type specific message i f i• 01-00-5E-00-00-05

• 01-00-5E-00-00-06

routers listen to this address.The OSPF protocol field is 89. information.

Chapter 328© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 29: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Header

Chapter 329© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 30: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Packet Types

Chapter 330© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 31: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Packet Types

Five packet types make OSPF capable of sophisticated and l i ticomplex communications.

Type Packet Name Description

1 Hello Discovers neighbors and builds adjacencies between them.Database description

2 DBDp

Checks for database synchronization between routers.Link-state request

3 LSR Requests specific link-state records from another router.Link-state update

4 LSU Sends specifically requested link-state records.

5 LSA k Link-State Acknowledgment

Chapter 331© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

5 LSAck Link State AcknowledgmentAcknowledges the other packet types.

Page 32: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF MessageFrame Payload

ProtocolFrame Header CRCIP

Header

Protocol Number

(OSPF = 89)OSPF Header OSPF MessageOSPF Message

The OSPF message contains different information, depending on the packet type:g , p g p yp

Packet Type Contains

Type 1 Hello Contains a list of known neighborsType 1 - Hello Contains a list of known neighbors.

Type 2 - DBD Contains a summary of the LSDB, which includes all known router IDs and their last sequence number, among a number of other fields.

Type 3 - LSR Contains the type of LSU needed and the router ID of the router that has the needed LSU.

Type 4 - LSU Contains the full LSA entries. Multiple LSA entries can fit in one OSPF update packet.

Chapter 332© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Type 5 - LSAck Data field is empty.

Page 33: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Type 1 - OSPF Hello Packet

Hello packets are used to:• Discover directly connected OSPF neighbors.• Establish and maintain neighbor adjacencies with these directly

connected neighborsconnected neighbors.• Advertise parameters on which two routers must agree to become

neighbors.• Elect the Designated Router (DR) and Backup Designated Router

(BDR) on multi-access networks like Ethernet and Frame Relay.

Chapter 333© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 34: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Type 1 - OSPF Hello Packet

Hello packets are used to:• Discover neighborsDiscover neighbors.• Establish and maintain neighbor

adjacencies.Advertise parameters on which two• Advertise parameters on which two routers must agree to become neighbors.Elect the Designated Router (DR)• Elect the Designated Router (DR) and Backup Designated Router (BDR) on multi-access networks like Ethernet and Frame Relay

Chapter 334© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

like Ethernet and Frame Relay.

Page 35: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Type 1 - OSPF Hello Packet

Hello packet fields must match on neighboring routers for them to establish an adjacency:establish an adjacency:• Hello interval• Dead interval• Network type.• Area id• Authentication passwordAuthentication password• Stub area flag

Two routers on the same network segment may not form an OSPF adjacency if:• They are not in the same area• The subnet masks do not match, causing the routers to be on separate networks.The subnet masks do not match, causing the routers to be on separate networks.• The OSPF Hello or Dead Timers do not match.• The OSPF network types do not match.

Th OSPF d i i i i t

Chapter 335© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

• The OSPF network command is missing or incorrect.

Page 36: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Type 1 - OSPF Hello Packet

By default, OSPF Hello packets are transmitted to 224.0.0.5 (all OSPF routers) every:(all OSPF routers) every: • 10 seconds (Default on multiaccess and point-to-point networks). • 30 seconds (Default on NBMA networks – Frame Relay). ( y) The Dead interval is the period, expressed in seconds, that

the router will wait to receive a Hello packet before declaring the neighbor "down "declaring the neighbor "down." • If the Dead interval expires before the routers receive a Hello packet,

OSPF will remove that neighbor from its link-state database. • The router floods the link-state information about the "down" neighbor

out all OSPF enabled interfaces. Cisco uses a default of 4 times the Hello interval Cisco uses a default of 4 times the Hello interval.

• 40 seconds (Default on multiaccess and point-to-point networks). • 120 seconds (Default on NBMA networks – Frame Relay).

Chapter 336© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

( y)

Page 37: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Type 2 - OSPF DBD Packet

The Database Description (DBD) packets contain an bb i t d li t f th di t ' li k t t d t babbreviated list of the sending router's link-state database

and is used by receiving routers to check against the local link-state databaselink state database. The link-state database must be identical on all link-state

routers within an area to construct an accurate SPF tree.oute s t a a ea to co st uct a accu ate S t ee

Chapter 337© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 38: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Type 3 - OSPF LSR Packet

The Link State Request (LSR) packet is used by the i i t t t i f ti b treceiving routers to request more information about any

entry in the DBD.

Chapter 338© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 39: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Type 4 - OSPF LSU Packet

The Link-State Update (LSU) packets are used for OSPF ti d trouting updates.

• They reply to LSRs as well as to announce new information.

LSUs contain seven different types of LSAs (Link State LSUs contain seven different types of LSAs (Link-State Advertisements 109 ). LSUs contains the full LSA entries LSUs contains the full LSA entries.

• Multiple LSA entries can fit in one OSPF update packet.

Chapter 339© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 40: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Type 5 - OSPF LSAck Packet

LSAck - Link-State Acknowledgement Packet:• When an LSU is received, the router sends a LSAck to confirm receipt

of the LSU.• The LSAck data field is emptyThe LSAck data field is empty.

Chapter 340© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 41: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF States Neighbor Discovery – Hello Protocol

When an OSPF router is initially connected to

Down State

Init State

No Hello packets received = DownSend Hello PacketsTransit to Init state

Hello packets received from the neighbor and is initially connected to a network it attempts to create adjacencies with neighbors

Init State

Two-Way State

it contains the initial router’s router ID.Transit to two-way state

(Optional) DR and BDR electionTransit to ExStart state

with neighbors. To do so, it progresses

through these various ExStart State

Database Synchronization

Negotiate master / slave relationship and DBD packet sequence numberg

states using the 5 OSPF packet types. More LSAs

requiredNo

Exchange StateDBD exchanged as LSAs are requested and sentTransit to either Loading or Full state after completing the database description

Yes

Loading State Newly learned routes are asked for and current database is being processed

Route Calculations

Chapter 341© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Full State

Route CalculationsRouter is synchronized with the neighbor and route calculations using the SPF algorithm begins

Page 42: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Neighbor Discovery – Hello Protocol

R1 R2172.16.5.0 /24

Fa0/0

.1 .2

Fa0/1

Down State

Attempt State

Init State Hello! I’m router ID 172.16.5.1. Is there anyone else on this link?

(multicast to 224.0.0.5)Hello

Hello! I’m router ID 172.16.5.2 and I see 172.16.5.1. R2 neighbor list:172 16 5 1 int Fa0/1

Hello172.16.5.1, int Fa0/1

Unicast to R1

R1 neighbor list:172.16.5.2, int Fa0/0

Two-Way State

Chapter 342© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 43: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Database Synchronization & Route Calc

R1 R2172.16.5.0 /24

Fa0/0

.1 .2

Fa0/1

ExStart State I will start the exchange because I have router ID 172.16.5.1.

HelloNo, I will start the exchange because I have a higher router ID.

HelloHello

Here is a summary of my link-state database. DBD

Exchange State

Here is a summary of my link-state database.

DBD

Thanks for the information! LSAck LSAck

Loading State I need more information on the 172.16.6.0 network.LSR

Here is the entry for 172.16.6.0/24.LSU

Thanks for the information!

Chapter 343© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

LSAck

Full State

Page 44: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Adjacent OSPF Neighbors

Once neighbors adjacencies have been established, the H ll k t ti t b t itt d 10 dHello packet continues to be transmitted every 10 seconds (default) between neighbors. • As long as the other routers keep receiving the Hello packets the• As long as the other routers keep receiving the Hello packets, the

transmitting router and its networks reside in the topology database.

After the topological databases are synchronized, updates p g y p(LSUs) are sent only to neighbors when:• A change is perceived (Incremental updates)• Every 30 minutes (Condensed version is forwarded).

Chapter 344© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 45: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Link-State Data Structures

Each LSA entry has its own aging timer, which the link-state fi ld iage field carries.

The default aging timer value for OSPF is 30 minutes (1800 seconds)seconds). After an LSA entry ages, the router that originated the entry

sends the LSA with a higher sequence number in a link-sends the LSA, with a higher sequence number, in a link-state update (LSU), to verify that the link is still active. • The LSU can contain one or more LSAs. • This LSA validation method saves on bandwidth compared to

distance-vector routers, which send their entire routing table at short, periodic intervalsperiodic intervals.

Chapter 345© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 46: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Link-State Data Structures

Chapter 346© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 47: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Administrative Distance

Route Source Administrative DistanceC t d 0Connected 0Static 1EIGRP Summary 5EIGRP Summary 5External BGP 20Internal EIGRP 90IGRP 100OSPF 110IS IS 115IS IS 115RIP 120External EIGRP 170External EIGRP 170Internal BGP 200

Chapter 347© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 48: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Planning OSPF Routing Implementations

Chapter 348© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 49: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Planning to Deploy OSPF

Prior to deploying an OSPF routing solution, the following h ld b id dshould be considered:

• IP addressing plan• Network topology• Network topology• OSPF areas

Once the requirements have been assessed theOnce the requirements have been assessed, the implementation plan can be created.

Chapter 349© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 50: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Implementing OSPF The information necessary to implement OSPF routing includes

the following:the following:• The IP addresses to be configured on individual router interfaces.• A list of routers on which OSPF is to be enabled, along with the OSPF

b t d th t d t k th t t OSPFprocess number to use and the connected networks that are to run OSPF and that need to be advertised (per individual router).

• The area in which each interface is to be configured.• Metrics that need to be applied to specific interfaces, or OSPF traffic

engineering. In the implementation plan, OSPF tasks include the following:p p , g

• Enabling the OSPF routing protocol, directly on an interface or by using the correct network command under the OSPF routing process configuration mode.co gu a o ode

• Assigning the correct area id to the interface, via the OSPF configuration on the interface or under the OSPF routing process configuration mode.

• Optionally configuring the metric to appropriate interfaces

Chapter 350© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

• Optionally configuring the metric to appropriate interfaces.

Page 51: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying OSPF

After implementing OSPF, verification should confirm proper d l t h tdeployment on each router. Verification tasks include verifying:

V if i th t th i t OSPF i hb l ti hi d• Verifying that the appropriate OSPF neighbor relationships and adjacencies are established

• Verifying that the OSPF LSDB is populated with the necessary y g p p yinformation.

• Verifying that IP routing table is populated with the necessary informationinformation.

• Verifying that there is connectivity in the network between routers and to other devices.

• Verifying that OSPF behaves as expected in a case of a topology change, by testing link failure and router failure events.

Chapter 351© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 52: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Documenting

After a successful OSPF deployment, the solution and verification process and results should be documented for future reference.

Documentation should include:• A topology mapp gy p

• The IP addressing plan

• The area hierarchyThe area hierarchy

• The networks and interfaces included in OSPF on each router

• The default and any special metrics configuredThe default and any special metrics configured

• The verification results.

Chapter 352© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 53: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring and Verifying Basic OSPF

Chapter 353© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 54: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Enable OSPF Routing Define OSPF as the IP routing protocol.

Router(config)#

router ospf process-id

The process-id is an internally used number that identifies the OSPF routing process.

The process-id does not need to match process IDs on other routers

It can be any positive integer in the range from 1 to 65535.

Chapter 354© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 55: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Identify OSPF Networks Define OSPF networks to advertise to OSPF neighbors.

Router(config-router)#

network ip-address [wildcard-mask] area area-id

The ip-address parameter can be a network, a subnet, or the address of a directly connected interface.

The wildcard-mask is an inverse mask used to determine how to interpret the address.

• The mask has wildcard bits, where 0 is a match and 1 is “don’t care.”

• For example 0 0 255 255 indicates a match in the first 2 octets• For example, 0.0.255.255 indicates a match in the first 2 octets.

• The area-id parameter specifies the OSPF area to be associated with the address.

Chapter 355© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 56: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

The Wildcard Mask

Recall that a wildcard mask is the inverse of a subnet mask. An easy way to calculate the inverse of the subnet mask, is

to subtract the subnet mask from 255.255.255.255.F l th i f b t k For example, the inverse of subnet mask255.255.255.252 is 0.0.0.3.

255.255.255.255

– 255.255.255.252

0. 0. 0. 3

Chapter 356© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 57: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Identify OSPF Networks Optional method to enable OSPF explicitly on an interface.

Router(config-if)#

ip ospf process-id area area-id

The process-id parameter can be a network, a subnet, or the address of a directly connected interface. y

• The area-id parameter specifies the OSPF area to be associated with the address.

• Because this command is configured explicitly for the interface, it takes precedence over the network area command.

Chapter 357© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 58: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Define the Interface Bandwidth Defines the interface’s bandwidth (optional).

Router(config-if)#

bandwidth kilobits

The kilobits parameter indicates the intended bandwidth in kbps.

For example to set the bandwidth to 512 000 bps use the For example, to set the bandwidth to 512,000 bps, use the bandwidth 512 command.

The configured bandwidth is used by routing protocols in the metric calculation.

The command does not actually change the speed of the interface.

Chapter 358© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 59: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring Single-Area OSPF ExampleOSPF Area 0

10 64 0 0 /24

R2 R3S0/0/1S0/0/1

64 kbps10.2.1.0 /24

.2.1R1 Fa0/0

.1

Fa0/0

.2

10.64.0.0 /24

R1(config)# interface Fa0/0R1(config-if)# ip address 10.64.0.1 255.255.255.0R1(config-if)# no shutR1(config-if)# exit

R2(config)# interface Fa0/0R2(config-if)# ip address 10.64.0.2 255.255.255.0R2(config-if)# no shut

R1(config)#

R2(config-if)# interface S0/0/1R2(config-if)# ip address 10.2.1.2 255.255.255.0R2(config-if)# bandwidth 64R2(config-if)# no shutR2(config-if)# exit

#R2(config)#

R3(config)# interface S0/0/1R3(config-if)# ip address 10.2.1.1 255.255.255.0R3(config-if)# bandwidth 64R3( fi if)# h t

Chapter 359© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R3(config-if)# no shutR3(config-if)# exitR3(config)#

Page 60: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring Single-Area OSPF ExampleOSPF Area 0

10 64 0 0 /24

R2 R3S0/0/1S0/0/1

64 kbps10.2.1.0 /24

.2.1R1 Fa0/0

.1

Fa0/0

.2

10.64.0.0 /24

R1(config)# router ospf 1R1(config-router)# network 10.0.0.0 0.255.255.255 area 0R1(config-router)#

R2(config)# router ospf 50R2(config-router)# network 10.2.1.2 0.0.0.0 area 0R2(config-router)# network 10.64.0.2 0.0.0.0 area 0R2(config-router)#

R3(config)# router ospf 100R3(config-router)# network 10.2.1.1 0.0.0.0 area 0R3(config-router)#

Chapter 360© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 61: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring Multi-Area OSPF ExampleOSPF Area 0

10 64 0 0 /24

OSPF Area 1

R2 R3S0/0/1S0/0/1

64 kbps10.2.1.0 /24

.2.1R1 Fa0/0

.1

Fa0/0

.2

10.64.0.0 /24

R1(config)# router ospf 1R1(config-router)# network 10.0.0.0 0.255.255.255 area 0R1(config-router)#

R2(config)# router ospf 50R2(config-router)# network 10.2.1.2 0.0.0.0 area 1R2(config-router)# network 10.64.0.2 0.0.0.0 area 0R2(config-router)#

Ahora es área 1

R3(config)# router ospf 100R3(config-router)# network 10.2.1.1 0.0.0.0 area 1R3(config-router)#

Ahora es área 1

Chapter 361© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 62: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Alternate Multi-Area OSPF ConfigurationOSPF Area 0

10 64 0 0 /24

OSPF Area 1

R2 R3S0/0/1S0/0/1

64 kbps10.2.1.0 /24

.2.1R1 Fa0/0

.1

Fa0/0

.2

10.64.0.0 /24

R1(config)# router ospf 1R1(config-router)# network 10.0.0.0 0.255.255.255 area 0R1(config-router)#

R2(config)# interface S0/0/1R2(config-if)# ip ospf 50 area 1R2(config-if)# exitR2(config)#

Se configuró en la interfaz

R2(config)#R2(config)# router ospf 50R2(config-router)# network 10.64.0.2 0.0.0.0 area 0R2(config-router)#

R3(config)# router ospf 100R3(config-router)# network 10.2.1.1 0.0.0.0 area 1R3(config-router)#

Chapter 362© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 63: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Router ID

A router is known to OSPF by the OSPF router ID number.• LSDBs use the OSPF router ID to differentiate one router from the

next.

By default the router ID is the highest IP address on an By default, the router ID is the highest IP address on an active interface at the moment of OSPF process startup.• However, for stability reason, it is recommended that theyrouter-id command or a loopback interface be configured.

Chapter 363© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 64: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Router ID

Router ID explicitly

configured?Use that as

the Router-IDYesYesNoNo

Loopback interface

configured?

YesYes Use the highest configured loopback IP

address

NoNo

Use the highest active configured IP address

Chapter 364© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 65: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Define the Router ID

Assign a specific router ID to the router.Router(config-router)#

router-id ip-address

Any unique arbitrary 32-bit value in an IP address format (dotted decimal) can be used.

If this command is used on an OSPF process that is already active, then the new router ID takes effect:

After the next router reload.

After a manual restarting of the OSPF process using the clear ip ospf process privileged EXEC commandip ospf process privileged EXEC command.

Chapter 365© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 66: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying the Router-IDOSPF Area 0

10 64 0 0 /24

OSPF Area 1

R2 R3S0/0/1S0/0/1

64 kbps10.2.1.0 /24

.2.1R1 Fa0/0

.1

Fa0/0

.2

10.64.0.0 /24

R2# show ip ospfRouting Process “ospf 50” with ID 10.64.0.2<output omitted><output omitted>

Chapter 366© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 67: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying OSPF

Command Description

show ip protocols Displays OSPF process ID, router ID, networks router is advertising & administrative distance

show ip ospf neighbors Displays OSPF neighbor relationships.

show ip route Displays the routing table.

show ip ospf interface Displays hello interval and dead interval

Displays OSPF process ID, router ID, OSPF show ip ospf area information & the last time SPF algorithm

calculated

Chapter 367© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 68: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying OSPF: show ip protocols

Verify routing protocol information on the router.

R1# show ip protocolsRouting Protocol is “ospf 1”Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRouter ID 10.64.0.1Number of areas in this router is 1. 1 normal 0 stub 0 nssaMaximum path: 4Routing for Networks:10.0.0.0 0.255.255.255 area 0

Reference bandwidth unit is 100 mbpsReference bandwidth unit is 100 mbps<output omitted>

Chapter 368© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 69: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying OSPF: show ip ospf neighbors

Display OSPF neighbors.The interface on which thi t h f d

R2# show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

this router has formed adjacency with the neighbor.

Neighbor ID Pri State Dead Time Address Interface10.64.0.1 1 FULL/DROTHER 00:00:30 10.64.0.1 FastEthernet0/010.2.1.1 1 FULL/ - 00:00:34 10.2.1.1 Serial0/0/1

Lists the neighbors in the order they were learned

The OSPF state of the interface. FULL state means that the router and its neighbor have identical

The IP address of the neighbor's interface to which this router iswere learned.

The OSPF priority of the interface.

and its neighbor have identical OSPF link-state databases.

The amount of time remaining that the router will wait to receive an OSPF Hello packet from the

interface to which this router is directly connected.

neighbor before declaring the neighbor down.

Chapter 369© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 70: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying OSPF: show ip route ospf

Verify that the router recognizes OSPF routes.

R1# show ip route ospf10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

/ / /O IA 10.2.1.0/24 [110/782] via 10.64.0.2, 00:03:05, FastEthernet0/0R1#

Chapter 370© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 71: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Clearing the OSPF Routing Table

To clear all routes from the IP routing table, use:#Router# clear ip route *

To clear a specific route from the IP routing table, use:R t # l i t A B C DRouter# clear ip route A.B.C.D

Chapter 371© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 72: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying OSPF: show ip ospf interface

Verify OSPF configured interfaces.

R1# show ip ospf interface fastEthernet 0/0FastEthernet0/0 is up, line protocol is upInternet Address 10 64 0 1/24 Area 0Internet Address 10.64.0.1/24, Area 0Process ID 1, Router ID 10.64.0.1, Network Type BROADCAST, Cost: 1Transmit Delay is 1 sec, State DROTHER, Priority 0Designated Router (ID) 10.64.0.2, Interface address 10.64.0.2No backup designated router on this networkNo backup designated router on this networkTimer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5oob-resync timeout 40Hello due in 00:00:04

Supports Link-local Signaling (LLS)Supports Link-local Signaling (LLS)Index 1/1, flood queue length 0Next 0x0(0)/0x0(0)Last flood scan length is 1, maximum is 4Last flood scan time is 0 msec maximum is 4 msecLast flood scan time is 0 msec, maximum is 4 msecNeighbor Count is 1, Adjacent neighbor count is 1Adjacent with neighbor 10.64.0.2 (Designated Router)

Suppress hello for 0 neighbor(s)

Chapter 372© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 73: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying OSPF: show ip ospf

Verify general OSPF information.

R2# show ip ospfRouting Process “ospf 50” with ID 10.64.0.2<output omitted><output omitted>Area BACKBONE(0)

Area has no authenticationSPF algorithm last executed 00:01:25.028 agoSPF algorithm executed 7 timesSPF algorithm executed 7 times

<output omitted>Area 1

Number of interfaces in this area is 1Area has no authenticationArea has no authenticationSPF algorithm last executed 00:00:54.636 agoSPF algorithm executed 3 times

<output omitted>R2#R2#

Chapter 373© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 74: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Understanding OSPF Network Types

Chapter 374© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 75: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Network Types

OSPF defines three types of network:Network Type Description Example

Broadcast • A multiaccess broadcast network.• DR / BDR required.

All Ethernet networks

Point-to-point • A network that joins a single pair of routers.• No DR / BDR required.

Serial link using PPP / HDLC

• A network that interconnects more than two routers but that has no broadcast capability.

• DR / BDR may or may not be required.• There are five modes of OSPF operation available for

NBMA networks:

Nonbroadcastmultiaccess

(NBMA)

• RFC-compliant modes:• non-broadcast• point-to-multipoint

• Cisco proprietary modes:

Frame RelayATMX.25• Cisco proprietary modes:

• broadcast • point-to-multipoint non-broadcast• point-to-point

Chapter 375© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

• The choice of mode depends on the topology of the NBMA network.

Page 76: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Broadcast DR /BDR election required since there could be many devices.

• Establishing adjacencies with all routers in a broadcast network would easilyEstablishing adjacencies with all routers in a broadcast network would easily overload a router due to the overhead of maintaining those adjacencies.

• Instead, OSPF routers form full adjacencies with the DR and BDR only. Packets to all OSPF routers are forwarded to 224 0 0 5 Packets to all OSPF routers are forwarded to 224.0.0.5. Packets to the DR / BDR are forwarded to 224.0.0.6.

Chapter 376© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 77: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Broadcast Challenge: Multiple Adjacencies

A challenge of broadcast network is the number of dj i th t ld b i dadjacencies that would be required.

• One adjacency for every pair of routers.• This would increase network traffic and load on each router to• This would increase network traffic and load on each router to

manage each individual adjacency.

Chapter 377© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 78: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Broadcast Challenge: Extensive LSAs

Another challenge is the increase in network LSAs.• Every LSA sent out also requires an acknowledgement.

Consequence: L t f b d idth d• Lots of bandwidth consumed

• Chaotic traffic

Chapter 378© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 79: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Solution: Designated Router

A designated router (DR) and backup designated router (BDR) l th h ll b th(BDR) solve these challenges because they:• Reduce routing update traffic• Manage link state synchronization• Manage link-state synchronization

Chapter 379© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 80: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Designated Router (DR)

The DR is elected and becomes responsible for maintaining th t l t bl f th tthe topology table for the segment. This DR has two main functions:

T b dj t t ll th t th t k t• To become adjacent to all other routers on the network segment.• To act as a spokesperson for the network.

As spokesperson the DR becomes the focal point for As spokesperson the DR becomes the focal point for collecting and sending routing information (LSAs).

Chapter 380© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 81: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Backup Designated Router (BDR)

For fault tolerance, a second router is elected as the BDR.• The BDR must also become adjacent to all routers on the network

and must serve as a second focal point for LSAs.• However the BDR is not responsible for updating the other routers orHowever, the BDR is not responsible for updating the other routers or

sending network LSAs.

The BDR keeps a timer on the DR's update activity to ensure that it is operational. • If the BDR does not detect activity from the DR after the timer expires,

the BDR immediately becomes the DR and a new BDR is electedthe BDR immediately becomes the DR and a new BDR is elected.

Chapter 381© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 82: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

DR/BDR

DRs and BDRs are elected on a per-network basis and th f h t k t h it DR d BDRtherefore each network segment has its own DR and BDR.• For example, a router connected to multiple multiaccess broadcast

networks can be a DR on one segment and a regular (DROTHER)networks can be a DR on one segment and a regular (DROTHER) router on another segment.

The election process is accomplished dynamically using the Hello protocol.• However, the election can be manually manipulated thei f i i i t f fi ti dip ospf priority number interface configuration command.

After a DR and BDR have been selected, any router added to the broadcast network establishes full adjacencies withto the broadcast network establishes full adjacencies with the DR and BDR only.

Chapter 382© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 83: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Assigning Router Priority

Assign a specific OSPF priority to the router.Router(config-if)#

ip ospf priority number

A router interface can have a priority number between 0 - 255: 0 = DROTHER - Router cannot be a DR

1 F bl D f l f ll 1 = Favorable - Default for all routers 255 = Very favorable - Ensures at least of a tie.

The priority must be configured before the election takes place to figureThe priority must be configured before the election takes place to figure into the election.

To display an interface's priority value and other key information use thedshow ip ospf interface command.

Chapter 383© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 84: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

The Election of the DR

1. All neighbors with a priority > 0 are listed.2. The router with highest priority is elected BDR.

If there is a tie, the highest router IDs are used.

3 If th i DR th BDR i t d DR3. If there is no DR, the BDR is promoted as DR.4. The neighbor with the next highest priority is elected BDR.

Chapter 384© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 85: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Manipulating the Election Process

The DR / BDR maintain these roles until they fail even when t ith hi h i iti h th t kmore routers with higher priorities show up on the network.

To influence the election of DR & BDR, do one of the following:following:• Boot up the DR first, followed by the BDR, and then boot all other

routers. OR• Shut down the interface on all routers, followed by a no shutdown

th DR th th BDR d th ll th ton the DR, then the BDR, and then all other routers.

Chapter 385© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 86: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Point-to-Point

Both routers become fully adjacent to each another. U ll i l i t f i ith PPP HDLC Usually a serial interface running either PPP or HDLC.• May also be a point-to-point subinterface running Frame Relay or ATM.

No DR /BDR election required since there are only two devices No DR /BDR election required since there are only two devices. OSPF autodetects this type of network. Packets are sent to 224 0 0 5 Packets are sent to 224.0.0.5.

Chapter 386© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 87: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF over MPLS

Multi-Protocol Label Switching (MPLS) is an Internet E i i T k F (IETF) t d d hit t th tEngineering Task Force (IETF) standard architecture that combines the advantages of Layer 3 routing with the benefits of Layer 2 switchingbenefits of Layer 2 switching. A unique feature of MPLS is its capability to perform label

stacking, in which multiple labels can be carried in a packet. stac g, c u t p e abe s ca be ca ed a pac et The top label, which is the last one in, is always processed

first. • Label stacking enables multiple LSPs to be aggregated, thereby

creating tunnels through multiple levels of an MPLS network.

Chapter 387© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 88: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF over Layer 3 MPLS VPN

The customer and provider edge routers are running OSPF. • However the internal provider routers do not.

The customer has to agree upon OSPF parameters with the service provider (SP) to ensure connectivityservice provider (SP) to ensure connectivity. • These parameters are often governed by the SP.

Chapter 388© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 89: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF over Layer 2 MPLS VPN

The Layer 2 MPLS VPN backbone and the provider routers t i ibl t th t tare not visible to the customer routers.

• A neighbor relationship is established directly between OSPF enabled routers over the MPLS backbone, and behaves in the same way asrouters over the MPLS backbone, and behaves in the same way as on an Ethernet broadcast network therefore DR and BDR routers are elected.

Chapter 389© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 90: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Nonbroadcast Multiaccess (NBMA)

Frame Relay, ATM, and X.25 are examples of NBMA t knetworks.

The default OSPF hello and dead intervals on NBMA interfaces are 30 seconds and 120 seconds respectivelyinterfaces are 30 seconds and 120 seconds, respectively. Although NBMA networks can support more than two

routers they have no inherent broadcast capabilityrouters, they have no inherent broadcast capability. • This can create reachability issues.

To implement broadcasting or multicasting the routerTo implement broadcasting or multicasting, the router replicates the packets to be broadcast or multicast and sends them individually on each PVC (permanent virtual circuit) to all destinations.• This process is CPU and bandwidth intensive.

Chapter 390© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 91: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

DR Election in an NBMA Topology

By default, OSPF cannot automatically build adjacencies ith i hb t NBMA i t fwith neighbor routers over NBMA interfaces.

OSPF considers the NBMA environment to function similarly to other multiaccess media such as Ethernetsimilarly to other multiaccess media such as Ethernet. • However, NBMA networks are usually hub-and-spoke (star)

topologies using PVCs or switched virtual circuits (SVCs). p g g ( )• In these cases, the physical topology does not provide the

multiaccess capability on which OSPF relies.

The election of the DR becomes an issue in NBMA topologies because the DR and BDR need to have full Layer 2 connectivity with all routers in the NBMA networkLayer 2 connectivity with all routers in the NBMA network. The DR and BDR also need to have a list of all the other

routers so that they can establish adjacencies

Chapter 391© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

routers so that they can establish adjacencies.

Page 92: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF over NBMA Topology

Depending on the network topology, several OSPF fi ti h i il bl f F R lconfiguration choices are available for a Frame Relay

network.

Chapter 392© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 93: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF over NBMA Topology

There are five NBMA topology modes of operation:T o official OSPF modes described in RFCs• Two official OSPF modes described in RFCs

• Three customized Cisco modes. RFC 2328-compliant modes are as follows:RFC 2328 compliant modes are as follows:

• Nonbroadcast (NBMA)• Point-to-multipoint Cisco modes are as follows:

• Point-to-multipoint nonbroadcastBroadcast• Broadcast

• Point-to-point OSPF NBMA topology modes are configured using theOSPF NBMA topology modes are configured using theip ospf network interface configuration command.

• Some modes require that a neighbor be manually configured using

Chapter 393© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

the neighbor router configuration command.

Page 94: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Assign an NBMA Topology Mode

Define an OSPF network type on an interface.Router(config-if)#

ip ospf network [{non-broadcast | point-to-multipoint [non-broadcast] | broadcast | point to point}]broadcast] | broadcast | point-to-point}]

The choice of mode depends on the NBMA topology. The default OSPF mode on a Frame Relay:

• Interface is non-broadcast mode.

• Point-to-point subinterface is point-to-point mode.• Multipoint subinterface is non-broadcast mode.

Chapter 394© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 95: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

NBMA Topology Modes of OperationNBMA Modes Description

• One IP subnet

non-broadcast(RFC-compliant)

• One IP subnet. • Neighbors must be manually configured. • DR and BDR are elected. • DR and BDR need to have full connectivity with all other routers. • Typically used in a full- or partial-mesh topology.

point-to-multipoint(RFC-compliant)

• One IP subnet. • Uses a multicast OSPF hello packet to automatically discover the neighbors. • DR and BDR are not required. The router sends additional LSAs with more information about

neighboring routers. • Typically used in a partial mesh or star topology• Typically used in a partial-mesh or star topology.

point-to-multipoint nonbroadcast

(Ci i t )

• If multicast and broadcast are not enabled on the VCs, the RFC-compliant point-to-multipoint mode cannot be used, because the router cannot dynamically discover its neighboring routers using the hello multicast packets; this Cisco mode should be used instead. N i hb t b ll fi d(Cisco proprietary) • Neighbors must be manually configured.

• DR and BDR election is not required.

broadcast

• Makes the WAN interface appear to be a LAN. • One IP subnet. broadcast

(Cisco proprietary) • Uses a multicast OSPF hello packet to automatically discover the neighbors. • DR and BDR are elected. • Full- or partial-mesh topology.

point to point• Different IP subnet on each subinterface. • No DR or BDR election

Chapter 395© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

point-to-point(Cisco proprietary)

• No DR or BDR election. • Used when only two routers need to form an adjacency on a pair of interfaces. • Interfaces can be either LAN or WAN.

Page 96: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Identify a Neighboring Router

Statically define adjacent relationships in NBMA networks.Router(config-router)#

neighbor ip-address [priority number] [poll-interval number] [cost number] [database-filter all]number] [cost number] [database-filter all]

Parameter Description

ip-address • Specifies the IP address of the neighboring routerip address • Specifies the IP address of the neighboring router.

priority number • (Optional) Specifies priority of neighbor. The default is 0, which means that the neighboring router does not become the DR or BDR.

ll i t l b• (Optional) Specifies how long an NBMA interface waits before

di h ll t th i hb if th i hb i i ti Thpoll-interval number sending hellos to the neighbors even if the neighbor is inactive. The poll interval is defined in seconds.

• (Optional) Assigns a cost to the neighbor in the form of an integer from 1 to 65535. Neighbors with no specific cost configured assume th t f th i t f b d th i f d

cost numberthe cost of the interface based on the ip ospf cost command.

• For point-to-multipoint interfaces, the cost keyword and thenumber argument are the only options that are applicable. This keyword does not apply to nonbroadcast mode.

Chapter 396© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

y pp ydatabase-filter all • (Optional) Filters outgoing LSAs to an OSPF neighbor.

Page 97: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Non-Broadcast Mode Example (Full-Mesh)

Characteristics of the RFC-compliant non-broadcastcompliant non broadcast parameter include: • A full-mesh topology is typically

d th f th DR d BDRused therefore the DR and BDR are dynamically elected.• DR / BDR require full connectivity

ith ll th twith all other routers.

• One IP subnet.• OSPF neighbors must be g

manually configured.

R1(config)# interface S0/0/0R1(config)# interface S0/0/0R1(config-if)# ip ospf network non-broadcastR1(config-if)# exitR1(config)# router ospf 1R1(config-router)# network 192.168.1.0 0.0.0.255 area 0

Chapter 397© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R1(config-router)# neighbor 192.168.1.2R1(config-router)# neighbor 192.168.1.3

Page 98: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Non-Broadcast Mode Example (Partial-Mesh)

Characteristics of the RFC-compliant non-broadcastcompliant non broadcastparameter include: • If a partial-mesh topology is used

th th DR d BDR l t dthen the DR and BDR are elected manually using the priorityparameter on the hub router.

• One IP subnet.• OSPF neighbors must be

manually configured.y g

R1(config)# interface S0/0/0R1(config)# interface S0/0/0R1(config-if)# ip ospf network non-broadcastR1(config-if)# exitR1(config)# router ospf 1R1(config-router)# network 192.168.1.0 0.0.0.255 area 0

Chapter 398© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R1(config-router)# neighbor 192.168.1.2 priority 0R1(config-router)# neighbor 192.168.1.3 priority 0 Garantiza a R1 ser el DR

Page 99: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Point-to-multipoint Mode Example

Characteristics of the RFC-compliant point-to-compliant point tomultipoint parameter include: • Used with partial-mesh or hub-

and-spoke (star) topology. • One IP subnet.• DR and BDR not required.• Uses multicast OSPF hello

packets to dynamically discoverpackets to dynamically discoverneighbors.

R1(config)# interface S0/0/0R1(config)# interface S0/0/0R1(config-if)# ip ospf network point-to-multipointR1(config-if)# exitR1(config)# router ospf 1R1(config-router)# network 192.168.1.0 0.0.0.255 area 0

Chapter 399© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R1(config-router)#

Page 100: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Point-to-multipoint non-broadcast Mode Characteristics of Cisco’spoint-to-multipoint non-point to multipoint nonbroadcast parameter include: • DR and BDR not required.• OSPF neighbors must be

manually configured. • Used in special cases where p

neighbors cannot be automatically discovered.

R1(config)# interface S0/0/0R1(config)# interface S0/0/0R1(config-if)# ip ospf network point-to-multipoint non-broadcastR1(config-if)# exitR1(config)# router ospf 1R1(config-router)# network 192.168.1.0 0.0.0.255 area 0

Chapter 3100© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R1(config-router)# neighbor 192.168.1.2 cost 10R1(config-router)# neighbor 192.168.1.3 cost 20 Se configuró también el costo para el BW usado

Page 101: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Broadcast Mode Example Characteristics of Cisco’sbroadcast parameter include:broadcast parameter include: • DR and BDR are elected and

require full connectivity with all other routersother routers.

• Can be configured for a full-mesh topology or a static election of the DR b d th i t f i itDR based on the interface priority.

• One IP subnet.• Uses multicast OSPF hello Uses u t cast OS e o

packets to dynamically discover neighbors.

R1(config)# interface S0/0/0R1(config)# interface S0/0/0R1(config-if)# ip ospf network broadcastR1(config-if)# exitR1(config)# router ospf 1R1(config-router)# network 192.168.1.0 0.0.0.255 area 0

Chapter 3101© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R1(config-router)#

Page 102: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Point-to-point Mode Example Characteristics of Cisco’spoint-to-point parameterpoint to point parameter include: • Partial mesh or star topology.• DR and BDR not required.• Only IP subnet.

R1(config)# interface S0/0/0R1(config)# interface S0/0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.0R1(config-if)# encapsulation frame-relayR1(config-if)# ip ospf network point-to-pointR1(config-if)# exitR1( fi )# t f 1

Chapter 3102© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R1(config)# router ospf 1R1(config-router)# network 192.168.1.0 0.0.0.255 area 0R1(config-router)#

Page 103: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Subinterfaces

OSPF can also be run over subinterfaces.• A subinterface is a physical interface that can be split into multiple

logical interfaces.• Each subinterface requires an IP subnetEach subinterface requires an IP subnet.

Subinterfaces can be defined as either a point-to-point or multipoint interface. p• A point-to-point subinterface has similar properties to a physical point-

to-point interface.

Note: The ip ospf network command is not required.

Chapter 3103© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 104: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Define a Subinterface

Define a subinterface.Router(config)#

interface serial number.subinterface-number {multipoint

| point-to-point}

Parameter DescriptionParameter Description

number subinterface-

Specifies the interface number and subinterface number. The subinterface number is in the range of 1 to 4294967293number.subinterface

number4294967293.

The interface number that precedes the period (.) is the interface number to which this subinterface belongs.

multipoint Specifies that the subinterface is multipoint; on multipoint subinterfaces routing IP, all routers are in the same subnet.

point to pointSpecifies that the subinterface is point-to-point; on point-to-point subinterfaces routing IP each pair of point to point

Chapter 3104© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

point-to-point point subinterfaces routing IP, each pair of point-to-point routers is in its own subnet.

Page 105: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Using Point-to-point Subinterfaces

Characteristics: Same properties as any physical• Same properties as any physical point-to-point physical interface

• DR and BDR not required.• One IP subnet per subinterface

pair.• Used when only 2 routers need toUsed when only 2 routers need to

form an adjacency on a pair of interfaces.

R1(config)# interface S0/0/0R1(config-if)# encapsulation frame-relayR1(config-if)# interface S0/0/0.1 point-to-point( g ) / / p pR1(config-subif)# ip address 10.1.1.1 255.255.255.0R1(config-subif)# interface S0/0/0.2 point-to-pointR1(config-subif)# ip address 10.2.2.1 255.255.255.0R1(config-subif)# router ospf 1R1(config-router)# network 10 1 1 0 0 0 0 255 area 0

Chapter 3105© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R1(config-router)# network 10.1.1.0 0.0.0.255 area 0R1(config-router)# network 10.2.2.0 0.0.0.255 area 0

Page 106: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Using Multipoint Subinterfaces The example has one point-to-point

subinterface and one multipointsubinterface and one multipoint subinterface. • The multipoint subinterface supports two

other routers in a single IP subnet

Multipoint Frame Relay subinterfaces default to OSPF nonbroadcast mode, which requires , qneighbors to be statically configured and a DR and BDR election.

R1(config)# interface S0/0/0R1(config-if)# encapsulation frame-relayR1(config-if)# interface S0/0/0.1 point-to-point( g ) / / p pR1(config-subif)# ip address 10.1.1.1 255.255.255.0R1(config-subif)# interface S0/0/0.2 multipointR1(config-subif)# ip address 10.2.2.1 255.255.255.0R1(config-subif)# router ospf 1R1(config-router)# network 10 0 0 0 0 255 255 255 area 0

Chapter 3106© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R1(config-router)# network 10.0.0.0 0.255.255.255 area 0R1(config-router)# neighbor 10.2.2.3 priority 0R1(config-router)# neighbor 10.2.2.4 priority 0 Garantiza a R1 ser el DR

Page 107: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF over NBMA Topology Summary

OSPF ModeNBMA

Preferred Topology

Subnet Address Hello Timer Adjacency RFC or

Cisco Examplep gy

Non-broadcast Full or partial mesh Same 30 sec

Manual configuration

DR/BDR electedRFC

Frame Relay configured on a serial interface

Point-to-multipoint

Partial mesh or star Same 30 sec Automatic

No DR/BDR RFC

OSPF over Frame Relay mode that eliminates the need for a DR; used when VCs support multicast andmulticast and broadcast

OSPF over Frame

Point-to-multipoint

nonbroadcastPartial mesh or

star Same 30 secManual

configuration No DR/BDR

Cisco

Relay mode that eliminates the need for a DR; used when VCs do not support multicast and broadcastbroadcast

Broadcast Full or partial mesh Same 10 sec Automatic

DR/BDR elected Cisco LAN interface such as Ethernet

Chapter 3107© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Point-to-pointPartial mesh or

star, using subinterfaces

Different for each

subinterface10 sec Automatic

No DR/BDR CiscoSerial interface with point-to-point subinterfaces

Page 108: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Understanding OSPF LSAsOSPF LSAs

Chapter 3108© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 109: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSAs

LSAs are the building blocks of the OSPF LSDB. • Individually, LSAs act as database records. • When combined, they describe the entire topology of an OSPF area.

There are several types of OSPF network LSAs There are several types of OSPF network LSAs• Not all are in use.

LSA Type Description1 Router LSA

2 Network LSA

3 and 4 Summary LSAs

5 AS external LSA

6 Multicast OSPF LSA6 Multicast OSPF LSA

7 Defined for NSSAs

8 External attributes LSA for Border Gateway Protocol (BGP)

9 10 11 O LSA

Chapter 3109© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

9, 10, or 11 Opaque LSAs

Page 110: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSA Type 1: Router LSA Generated by all routers in an area to describe their directly

attached links (Intra-area routes)attached links (Intra area routes). • Floods within its area only and cannot cross an ABR.• LSA includes list of directly attached links and is identified by the router

ID f th i i ti tID of the originating router• Routing Table Entry = O Link

Type Description Link-state ID

1Point-to-point connection to another router

Neighboring router ID

2Connection to a transit network

IP address of DR

IP3 Connection to

a stub network

IP network/subnet number

4 Virtual link Neighboring

Chapter 3110© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

4 Virtual link g grouter ID

Page 111: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSA Type 1: Link Types

Link Type Description Link-state ID

1 Point-to-point connection to another router Neighboring router ID

2 Connection to a transit network IP address of DR

3 Connection to a stub network IP network/subnet number

4 Virtual link Neighboring router ID4 Virtual link Neighboring router ID

Chapter 3111© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 112: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSA Type 2: Network LSA

Advertised by the DR of the broadcast network.• Floods within its area only; does not cross ABR.• Link-state ID is the IP interface address of the DR.• Routing Table Entry = O• Routing Table Entry = O

Chapter 3112© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 113: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSA Type 3: Summary LSA Advertised by the ABR of originating area.

• Regenerated by subsequent ABRs to flood throughout the autonomousRegenerated by subsequent ABRs to flood throughout the autonomous system.

• By default, routes are not summarized, and type 3 LSA is advertised for every subnet.

• Link-state ID is the network or subnet advertised in the summary LSA• Routing Table Entry = O IA

Chapter 3113© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 114: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSA Type 4: Summary LSA

Generated by the ABR of the originating area to advertise an ASBR to all other areas in the autonomous systeman ASBR to all other areas in the autonomous system.• They are regenerated by all subsequent ABRs to flood throughout the

autonomous system.• Link-state ID is the router ID of the ASBR.• Routing Table Entry = O IA

Chapter 3114© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 115: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSA Type 5: External LSA

Used by the ASBR to advertise networks from othert tautonomous systems.

• Type 5 LSAs are advertised and owned by the originating ASBR.• The Link state ID is the external network number• The Link-state ID is the external network number.• Routing Table Entry = O E1 (cumulative) or O E2 (static, default)

Chapter 3115© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 116: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSA Type 7: NSSA LSA

Generated by an ASBR inside a Not-So-Stubby area (NSSA) to describe routes redistributed into the NSSA(NSSA) to describe routes redistributed into the NSSA. • LSA 7 is translated into LSA 5 as it leaves the NSSA. • Routing Table Entry = O N1 or O N2g y• Much like LSA 5, N2 is a static cost while N1 is a cumulative cost that

includes the cost up to the ASBR.

ABR

Chapter 3116© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 117: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Interpreting theInterpreting the OSPF LSDBand Routingand Routing Table

Chapter 3117© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 118: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Interpreting the OSPF Database

Use the show ip ospf database command to gather link state informationR1# show ip ospf database

OSPF Router with ID (10.0.0.11) (Process ID 1)Router Link States (Area 0)

state information.

Router Link States (Area 0)Link ID ADV Router Age Seq# Checksum Link count10.0.0.11 10.0.0.11 548 0x80000002 0x00401A 110.0.0.12 10.0.0.12 549 0x80000004 0x003A1B 1100 100 100 100 100 100 100 100 548 0x800002D7 0x00EEA9 2 p2p100.100.100.100 100.100.100.100 548 0x800002D7 0x00EEA9 2

Net Link States (Area 0)Link ID ADV Router Age Seq# Checksum172.31.1.3 100.100.100.100 549 0x80000001 0x004EC9

Summary Net Link States (Area 0)

p2p

Summary Net Link States (Area 0)Link ID ADV Router Age Seq# Checksum10.1.0.0 10.0.0.11 654 0x80000001 0x00FB1110.1.0.0 10.0.0.12 601 0x80000001 0x00F516<output omitted><output omitted>

Chapter 3118© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 119: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSA Sequence Numbering

Each LSA in the LSDB maintains a sequence number.Th b i h i 4 b t b th t b i ith• The sequence numbering scheme is a 4-byte number that begins with 0x80000001 and ends with 0x7FFFFFFF.

OSPF floods each LSA every 30 minutes to maintain proper y p pdatabase synchronization. • Each time the LSA is flooded, the sequence number is incremented by

one.

Ultimately, an LSA sequence number will wrap around to 0x80000001.0x80000001. • When this occurs, the existing LSA is prematurely aged to maxage (one

hour) and flushed.

When a router encounters two instances of an LSA, it must determine which is more recent. • The LSA having the newer (higher) LS sequence number is more recent

Chapter 3119© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

• The LSA having the newer (higher) LS sequence number is more recent.

Page 120: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Route Designator in Routing TableRoute Designator Description

O OSPF i ( LSA) d k LSA• Networks from within the router’s

Ad i d b fO OSPF intra-area (router LSA) and network LSA area. Advertised by way of router LSAs and network LSAs.

O IA OSPF interarea (summary LSA)• Networks from outside the router’s

area but within the OSPF AS. Advertised by way of summary LSAs.y y y

O E1 Type 1 external routes (cumulative)• Networks from outside the router’s

AS, advertised by way of external LSAs.

O E2 Type 2 external routes (static)• Networks from outside the router’s

AS advertised by way of externalO E2 Type 2 external routes (static) AS, advertised by way of external LSAs.

R1# show ip route<output omitted>G t f l t t i t tGateway of last resort is not set172.31.0.0/24 is subnetted, 2 subnetsO IA 172.31.2.0 [110/1563] via 10.1.1.1, 00:12:35, FastEthernet0/0O IA 172.31.1.0 [110/782] via 10.1.1.1, 00:12:35, FastEthernet0/010.0.0.0/8 is variably subnetted, 6 subnets, 2 masksC 10.200.200.13/32 is directly connected, Loopback0C 10.1.3.0/24 is directly connected, Serial0/0/0O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:12:35, Serial0/0/0C 10.1.1.0/24 is directly connected, FastEthernet0/0O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:12:37, FastEthernet0/0

Chapter 3120© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:12:37, FastEthernet0/0O E2 10.254.0.0/24 [110/50] via 10.1.1.1, 00:12:37, FastEthernet0/0

Page 121: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Best Path Calculation

1. All routers calculate the best paths to destinations within th i (i t ) d dd th t i t th titheir area (intra-area) and add these entries to the routing table. • Includes type 1 and 2 LSAs noted with a designator of O• Includes type 1 and 2 LSAs, noted with a designator of O.

2. All routers calculate the best paths to the other areas. • Includes type 3 and 4 LSAs noted with a designator of O IAIncludes type 3 and 4 LSAs, noted with a designator of O IA.

3. All routers (except stub areas) calculate the best paths to the external autonomous system (type 5) destinations. y ( yp )• Includes either external type 1 (E1), indicated with an O E1 or

external type 2 (E2), indicated with an O E2.

Chapter 3121© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 122: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

ASBR – Type 1 and 2 Routes

The cost of an external route varies, depending on the t l t fi d th ASBRexternal type configured on the ASBR.

An ASBR can be configured to send out two types of external routes into OSPFexternal routes into OSPF.• Denoted in the routing table as E1 for Type 1• Denoted in the routing table as E2 for Type 2Denoted in the routing table as E2 for Type 2.

Depending on the type, OSPF calculates the cost of external routes differently.y

Chapter 3122© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 123: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

ASBR – Type 1 and 2 Routes

O E1 Routes• The metric is calculated by adding the external cost to the internal

cost of each link that the packet crosses. • Use this packet type when there are multiple ASBRs advertising a route toUse this packet type when there are multiple ASBRs advertising a route to

the same autonomous system to avoid suboptimal routing.

O E2 Routes • The packet will always have the external cost assigned, no matter

where in the area it crosses.• Default setting on ASBRsDefault setting on ASBRs. • Use this packet type if only one router is advertising a route to the

autonomous system.

Chapter 3123© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 124: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

E2 Routes

By default, RTA uses a Type 2 metrics to send external routing information.

RTB will receive the external RIP routes, including 9.0.0.0/8 from RTA. When RTB forwards this route the metric for the external route remains

Chapter 3124© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

When RTB forwards this route, the metric for the external route remains the same (in this case, 20).

Page 125: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

E1 Routes

If RTA is configured to use a Type 1 metric with externalIf RTA is configured to use a Type 1 metric with external routes, OSPF will increment the metric value of the external route according to its standard cost algorithm.

Chapter 3125© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 126: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring OSPF LSDB Overload Protection

Limit the processing of LSAs for a defined OSPF process.Router(config-router)#

max-lsa maximum-number [threshold-percentage] [warning-only] [ignore-time minutes] [ignore-count count-number] [reset-time minutes]

Parameter DescriptionParameter Description

maximum-number Maximum number of LSAs that the OSPF process can keep in the OSPF LSDB.

threshold-percentage(Optional) The percentage of the maximum LSA number, as specified by the maximum-number argument, at which a warning message is logged. The p g g , g g ggdefault is 75 percent.

warning-only(Optional) Specifies that only a warning message is sent when the maximum limit for LSAs is exceeded; the OSPF process never enters ignore state. Disabled by default.

ignore-time minutes (Optional) Specifies the time, in minutes, to ignore all neighbors after the maximum limit of LSAs has been exceeded. The default is 5 minutes.

ignore-count count-number

(Optional) Specifies the number of times that the OSPF process can consecutively be placed into the ignore state The default is five times

Chapter 3126© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

number consecutively be placed into the ignore state. The default is five times.

reset-time minutes (Optional) Specifies the time, in minutes, after which the ignore count is reset to 0. The default is 10 minutes.

Page 127: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring andConfiguring and Verifying Advanced OSPFAdvanced OSPF Features

Chapter 3127© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 128: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Passive-Interface

Prevent OSPF updates out a specified router interface.Router(config-router)#

passive-interface type number [default]

Set a particular interface or all router interfaces to passive.

The defa lt option sets all router interfaces to passive The default option sets all router interfaces to passive.

For OSPF, the command: The specified interface appears as a stub network in the OSPF

domain

Th OSPF ti i f ti i ith t i d th h The OSPF routing information is neither sent nor received through the specified router interface.

Prevents neighbor relationships from being established

Chapter 3128© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Prevents neighbor relationships from being established.

Page 129: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Passive-Interface Example

64 kbps192.168.1.96 /27

Fa0/0Fa0/0R1 R2 Internet

192.168.1.0 /27

64 kbps

.101.102

S0/0/1

S0/0/0S0/0/0

.1

.1.1

R1(config)# router ospf 1R1(config-router)# passive-interface fa0/01( fi )#

172.16.1.0 /24 172.17.2.0 /24

R1(config-router)#

R2(config)# router ospf 10R2(config-router)# passive-interface fa0/0R2(config-router)#( g )

Alternate configuration:R1(config)# router ospf 1R1( fi t )# i i t f d f ltR1(config-router)# passive-interface defaultR1(config-router)# no passive-interface S0/0/0

R2(config)# router ospf 10R2(config-router)# passive-interface default

Chapter 3129© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R2(config router)# passive interface defaultR2(config-router)# no passive-interface S0/0/0R2(config-router)# no passive-interface S0/0/1

Page 130: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Propagating a Default Route

To propagate a default route in OSPF, use the default-i f ti i i t router configurationinformation originate router configuration command.• A default static route also needs to be configured on the originating• A default static route also needs to be configured on the originating

router (0.0.0.0 0.0.0.0)

Once configured, the default route has to be propagated g p p ginto the OSPF domain.

Chapter 3130© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 131: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

default-information originate Command

Configures a router to generate a default external route into an OSPF routing domain.routing domain.Router(config-router)#

default-information originate [always] [metric metric-value]default information originate [always] [metric metric value] [metric-type type-value] [route-map map-name]

Parameter Descriptionp

always (Optional) Specifies that OSPF always advertises the default route regardless of whether the router has a default route in the routing table.(Optional) A metric used for generating the default route. If you omit a value

d d t if l i th d f lt t i t fi timetric

metric-value

and do not specify a value using the default-metric router configuration command, the default metric value is 1. Cisco IOS Software documentation indicates that the default metric value is 10; testing shows that it is actually 1. (O ti l) Th t l li k t th t i i t d ith th d f lt t

metric-type

type-value

(Optional) The external link type that is associated with the default route that is advertised into the OSPF routing domain. It can be one of the following values: 1—Type 1 external route 2—Type 2 external route. The default is type 2 external route (indicated by O*E2 in the routing table).

route map

Chapter 3131© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

route-map

map-name(Optional) Specifies that the routing process generates the default route if the route map is satisfied.

Page 132: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

default-information originate Example

172.16.1.0 /240.0.0.0 Cost 10

R1OSPF Domain

ISP A.1 .210.1.1.1

10 2 1 1172.17.1.0 /24

2R2 ISP B10.2.1.1

.1 .2

0.0.0.0 Cost 100

R1(config)# router ospf 1R1(config-router)# network 10.1.1.1 0.0.0.0 area 0R1(config-router)# default-information originate metric 10R1( fi t )# itR1(config-router)# exitR1(config)# ip route 0.0.0.0 0.0.0.0 172.16.1.2R1(config)#

R2( fi )# t f 1R2(config)# router ospf 1R2(config-router)# network 10.2.1.1 0.0.0.0 area 0R2(config-router)# default-information originate metric 100R2(config-router)# exitR2(config)# ip route 0.0.0.0 0.0.0.0 172.17.1.2

Chapter 3132© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R2(config)#

Page 133: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Route Summarization

Route summarization involves consolidating multiple routes i t i l d ti tinto a single advertisement. Proper route summarization directly affects the bandwidth,

memory and CPU that are consumed by the OSPFmemory and CPU, that are consumed by the OSPF process. • If a network link fails or flaps, the topology change will not beIf a network link fails or flaps, the topology change will not be

propagated into the backbone or other areas. • It protects routers from needless routing table recalculations. • Because the SPF calculation places a significant demand on the

router's CPU, proper summarization is an imperative part of OSPF configuration.g

Chapter 3133© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 134: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Using Route Summarization

IA 172 16 8 0 255 255 248 0IA 172.16.8.0 255.255.248.0

IA 172.16.16.0 255.255.252.0

Chapter 3134© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 135: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Types of Route Summarization

Inter-area summarization• Performed at the ABR and creates Type 3 LSAs.

External summarizationP f d t th ASBR d t T 5 LSA• Performed at the ASBR and creates Type 5 LSAs.

Both have the same fundamental requirement of contiguous addressingaddressing. If summarization is not configured correctly and there are

multiple ASBRs or multiple ABRs in an area suboptimalmultiple ASBRs, or multiple ABRs in an area, suboptimal routing is possible. • For example, summarizing overlapping ranges from two different p g pp g g

routers can cause packets to be sent to the wrong destination.

Chapter 3135© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 136: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Intra-Area Summarization

Configure an ABR to summarize routes for a specific area.Router(config-router)#

area area-id range address mask [advertise | not-advertise] [cost cost][cost cost]

Parameter Description

area area-id Identifies the area subject to route summarization.

address The summary address designated for a range of addresses.

mask The IP subnet mask used for the summary routemask The IP subnet mask used for the summary route.

advertise (Optional) Sets the address range status to advertise and generates a type 3 summary LSA.(Optional) Sets the address range status to DoNotAdvertise. The type

not-advertise(Optional) Sets the address range status to DoNotAdvertise. The type 3 summary LSA is suppressed, and the component networks remain hidden from other networks.

t t(Optional) Metric or cost for this summary route, which is used during th OSPF SPF l l ti t d t i th h t t th t th

Chapter 3136© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

cost cost the OSPF SPF calculation to determine the shortest paths to the destination. The value can be 0 to 16777215.

Page 137: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Intra-Area Summarization Example

Area 0Area 0172.16.96.0 /24 - 172.16.127.0 /24

R1 R2

Area 1172.16.32.0 /24 - 172.16.63.0 /24

Area 2172.16.64.0 /24 - 172.16.95.0 /24

R1(config)# router ospf 100R1(config-router)# network 172.16.32.1 0.0.0.0 area 1R1(config-router)# network 172 16 96 1 0 0 0 0 area 0R1(config router)# network 172.16.96.1 0.0.0.0 area 0R1(config-router)# area 0 range 172.16.96.0 255.255.224.0R1(config-router)# area 1 range 172.16.32.0 255.255.224.0R1(config-router)#

R2(config)# router ospf 100R2(config-router)# network 172.16.64.1 0.0.0.0 area 2R2(config-router)# network 172.16.127.1 0.0.0.0 area 0R2(config-router)# area 0 range 172.16.96.0 255.255.224.0R2(config-router)# area 2 range 172 16 64 0 255 255 224 0

Chapter 3137© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R2(config router)# area 2 range 172.16.64.0 255.255.224.0R2(config-router)#

Page 138: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

External Summarization

Configure an ASBR to summarize external routes.Router(config-router)#

summary-address ip-address mask [not-advertise] [tag tag]

Parameter Description

ip-address The summary address designated for a range of addresses.

mask The IP subnet mask used for the summary route.

not-advertise (Optional) Used to suppress routes that match the address/mask pairnot advertise (Optional) Used to suppress routes that match the address/mask pair.

tag tag (Optional) A tag value that can be used as a “match” value to controlredistribution via route maps.

Chapter 3138© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 139: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

External Summarization

External AS – RIPv2172.16.32.0 /24 – 172.16.63.0 /24

OSPF Area 1172.16.64.0 /24 OSPF Area 0

R1 R2

ABR

.1

R1(config)# router ospf 100R1(config-router)# network 172.16.64.1 0.0.0.0 area 1R1(config-router)# summary-address 172.16.32.0 255.255.224.0R1(config-router)#

Chapter 3139© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 140: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Virtual Links

Virtual links are used to connect a discontiguous area to garea 0. A logical connection is built between router A and router B. Virtual links are recommended for backup or temporary, not

permanent connections.

Chapter 3140© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 141: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

LSAs on Virtual Links

LSAs usually age out after 30 minutes.y g• However, LSAs learned across virtual links have the DoNotAge (DNA)

option set.R i d t t i fl di i t l li k• Required to prevent excessive flooding over virtual links.

To identify an area as a virtual link, use the area area-idvirtual-link router configuration command

Chapter 3141© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

virtual-link router configuration command.

Page 142: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring Virtual Links Define an OSPF virtual link.

Router(config-router)#

area area-id virtual-link router-id [authentication [message-digest | null]] [hello-interval seconds] [retransmit-interval seconds] [transmit-delay seconds] [dead-interval seconds] [[authentication-key key] | [message-digest-keyseconds] [[authentication key key] | [message digest key key-id md5 key]]

Parameter Descriptionarea id Specifies the area ID of the transit area for the virtual linkarea-id Specifies the area ID of the transit area for the virtual link.

router-id Specifies the router ID of the virtual link neighbor.

authentication (Optional) Specifies an authentication type.

message-digest (Optional) Specifies the use of MD5 authentication.g g ( p ) p

null (Optional) Overrides authentication if configured.

hello-interval seconds (Optional) Specifies the time between the hello packets (default 10).

retransmit-interval seconds (Optional) Specifies the time between LSA retransmissions (default 5).( p ) p ( )

transmit-delay seconds (Optional) Specifies the time to send an LSU packet (default 1).

dead-interval seconds (Optional) Specifies the dead-interval time (default 40).

th ti ti k k (O ti l) S ifi th d f i l d th ti ti

Chapter 3142© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

authentication-key key (Optional) Specifies the password for simple password authentication.

message-digest-key key-id md5 key (Optional) Identifies the key ID and key for MD5 authentication.

Page 143: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Virtual-Link Example

Router-ID Router-IDArea 1

172.16.0.0

R1 R2

10.1.1.1 10.2.2.2

Area 010.0.0.0

Area 010.0.0.0

R1 R2

R1(config)# router ospf 100R1(config-router)# network 172 16 0 0 0 0 255 255 area 1R1(config-router)# network 172.16.0.0 0.0.255.255 area 1R1(config-router)# network 10.0.0.0 0.0.255.255 area 0R1(config-router)# area 1 virtual-link 10.2.2.2R1(config-router)#

R2(config)# router ospf 100R2(config-router)# network 172.16.0.0 0.0.255.255 area 1R2(config-router)# network 10.0.0.0 0.0.255.255 area 0R2(config-router)# area 1 virtual-link 10.1.1.1

Chapter 3143© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

( g )R2(config-router)#

Page 144: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying a Virtual-Link Example

Area 1Router-ID10 1 1 1

Router-ID10 2 2 2Area 1

172.16.0.0

R1 R2

10.1.1.1 10.2.2.2

Area 010.0.0.0

Area 010.0.0.0

R1# show ip ospf virtual-linksVirtual Link OSPF_VL0 to router 10.2.2.2 is up

Run as demand circuitRun as demand circuitDoNotAge LSA allowed.Transit area 1, via interface Serial0/0/1, Cost of using 781Transmit Delay is 1 sec, State POINT_TO_POINT,Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

Hello due in 00:00:07Adjacency State FULL (Hello suppressed)Index 1/2, retransmission queue length 0, number of retransmission 1First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)Last retransmission scan length is 1, maximum is 1

Chapter 3144© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

g ,Last retransmission scan time is 0 msec, maximum is 0 msec

R1#

Page 145: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Changing the Reference Bandwidth

The reference bandwidth defaults to 108 (100,000,000 bps or 100 Mbps). • This can be a problem when using interfaces faster than 100 Mbps

and higher since they would all have the same OSPF cost of 1.and higher since they would all have the same OSPF cost of 1. The reference bandwidth can be modified using the auto-cost reference-bandwidth router configuration

Chapter 3145© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

command.

Page 146: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Changing the Reference Bandwidth Change the reference bandwidth for faster interfaces.

Router(config-router)#

auto-cost reference-bandwidth ref-bw

The rf-bw parameter is the reference bandwidth in megabits per second. The range is from 1 to 4,294,967. The default is 100.

Use this command if interfaces are faster than 100 Mbps Use this command if interfaces are faster than 100 Mbps. The command must be configured on all OSPF routers to ensure accurate

route calculations.

Chapter 3146© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 147: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Modifying the Cost of a Link

The cost of a link can be modified using either the:f• bandwidth interface command

• ip ospf cost interface command

The configured bandwidth l is used by the SPF The configured bandwidth value is used by the SPF algorithm to calculate the cost.• For example configuring the bandwidth 128 command on a serialFor example, configuring the bandwidth 128 command on a serial

interface would generate a cost of 1,562.• Cost = 100,000,000 / 128,000 = 1,562.

Using the ip ospf cost interface command achieves the same result without the calculation.• For example, the interface cost could be statically configured using

the ip ospf cost 1562 command.

Chapter 3147© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 148: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Override the Default Interface Cost Manually define the cost of an interface.

Router(config-if)#

ip ospf cost interface-cost

The interface-cost is an integer from 1 to 65,535. The lower the number, the better (and more preferred) the link.The lower the number, the better (and more preferred) the link.

Can be used as an alternative to the bandwidth command.

Chapter 3148© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 149: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Two-Layer Hierarchy - Review

Backbone Area• Referred to as Area 0• Also known as the Transit Area.

Regular (Standard) Areas• Also known as a nonbackbone areas.

Chapter 3149© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

• All regular areas must connect to the backbone area.

Page 150: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Special Area Types

The OSPF standard area can be further divided into four types of stub areas:types of stub areas:• Stub area (no ASBRs)• Totally stubby area (cisco, no ASBRs)y y ( )• NSSA ( with ASBRs)• Totally stubby NSSA (cisco, with ASBRs)

Chapter 3150© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 151: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Area Types

Accepts Accepts Accepts Area Type routes within

area(O)

routes from other areas

(O IA)

external routes

(O E1 and O E2)

Allows ASBR Cisco proprietary

Standard Yes Yes Yes Yes No

Backbone Yes Yes Yes Yes No

Stub Yes YesNo

(uses default No Noroute)

Totally stubby YesNo

(uses default route)

No(uses default

route)No Yes

NSSA Yes YesNo

(uses default route)

Yes No

Totally stubby YNo

( d f lNo

( d f l Y Y

Chapter 3151© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

y yNSSA Yes (uses default

route)(uses default

route)Yes Yes

Page 152: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Stub and Totally Stub Area Characteristics

An area qualifies as stub or totally stubby area if it has the f ll i h t i tifollowing characteristics:• The area is not the backbone area (area 0).• There is a single exit point from that area• There is a single exit point from that area.

• If there are multiple exits, one or more ABRs should inject a default route into the stub area however suboptimal routing paths might occur.

• There is no ASBR inside the area. • The area is not used as a transit area for virtual links.

Chapter 3152© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 153: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Stub and Totally Stub Area Characteristics

All OSPF routers inside the stub area, including ABRs, are configured as stub routers using the idconfigured as stub routers using the area area-id stub router configuration command. By default the ABR of a stubby or totally stubby area By default, the ABR of a stubby or totally stubby area

advertises a default route with a cost of 1. • To change the cost of the default route, use the area area-idTo change the cost of the default route, use the area area iddefault-cost cost router configuration command.

Chapter 3153© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 154: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configure a Stub Area

Identify an area as a stub network.Router(config-router)#

area area-id stub

The area-id parameter is the identifier for the stub area and can be either a decimal value or a value in dotted-decimal format, like an IP address.

Chapter 3154© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 155: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Change the Default Cost Define the cost of the default route injected into the stub stubby area.

Router(config-router)#

area area-id default-cost cost

The cost parameter is for the default summary route. The acceptable values are 0 through 16777215. The default is 1.

If this command has not been configured, the ABR will advertise 0.0.0.0 with a default cost metric of 1 plus any internal costswith a default cost metric of 1 plus any internal costs.

Chapter 3155© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 156: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Stub Area Typically used in a hub-and-spoke network. Area does not accept external summary routes from non OSPF Area does not accept external summary routes from non-OSPF

sources (e.g., RIP, EIGRP).• Specifically, it does not accept Types 4 and 5 LSAs. • A default route (0.0.0.0) is propagated throughout the area to send a

packet to an external network.

Chapter 3156© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 157: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring a Stub Area

OSPF Area 0 Stub Area 2

External ASR3

ABR.1

R4.1 .2

Fa0/0 S0/0/0 S0/0/0

192.168.15.0 /30192.168.14.0 /24

0 0 0 0 D f lt R t

R3( fi )# interface FastEthernet0/0

0.0.0.0 Default Route

R3(config)# interface FastEthernet0/0R3(config-if)# ip address 192.168.14.1 255.255.255.0R3(config-if)# interface Serial 0/0/0R3(config-if)# ip address 192.168.15.1 255.255.255.252R3(config-if)# router ospf 100R3(config-router)# network 192.168.14.0.0 0.0.0.255 area 0R3(config-router)# network 192.168.15.0.0 0.0.0.255 area 2R3(config-router)# area 2 stubR3(config-router)#

R3 (the ABR) will automatically advertise 0.0.0.0

R4(config-if)# interface Serial 0/0/0R4(config-if)# ip address 192.168.15.2 255.255.255.252R4(config-if)# router ospf 100R4(config-router)# network 192.168.15.0.0 0.0.0.255 area 2

i # 2 b

Chapter 3157© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R4(config-router)# area 2 stubR4(config-router)#

Page 158: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Totally Stubby Area

Cisco proprietary solution that is better than stub area. A d t t t l AS t i t t Area does not accept external AS routes or inter-area routes.• Specifically, it does not accept Types 3, 4 and 5 LSAs. • It recognizes only intra-area routes and the default route 0 0 0 0• It recognizes only intra-area routes and the default route 0.0.0.0. • A default route (0.0.0.0) is propagated throughout the area.

Chapter 3158© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 159: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configure a Totally Stubby Area

Identify an ABR as a totally stubby network.Router(config-router)#

area area-id stub no-summary

Command is only configured on the ABR. All other routers in the totally stubby area are configured as stub routers.All other routers in the totally stubby area are configured as stub routers.

The area-id parameter is the identifier for the stub area and can be either a decimal value or a value in dotted-decimal format, like an IP ddaddress.

The no-summary parameter stops summary LSAs, in addition to external LSAs, from flooding into the totally stubby area., g y y

Chapter 3159© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 160: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring a Totally Stubby Area

ABROSPF Area 0 Totally Stubby Area 2

External ASR3

ABR.1

R4.1 .2

Fa0/0 S0/0/0 S0/0/0

192.168.15.0 /30192.168.14.0 /24

0 0 0 0 D f lt R t

R3(config)# interface FastEthernet0/0

0.0.0.0 Default Route

R3(config)# interface FastEthernet0/0R3(config-if)# ip address 192.168.14.1 255.255.255.0R3(config-if)# interface Serial 0/0/0R3(config-if)# ip address 192.168.15.1 255.255.255.252R3(config-if)# router ospf 100R3(config-router)# network 192.168.14.0.0 0.0.0.255 area 0R3(config-router)# network 192.168.15.0.0 0.0.0.255 area 2R3(config-router)# area 2 stub no-summaryR3(config-router)#

R3 (the ABR) will automatically advertise 0.0.0.0

R4(config-if)# interface Serial 0/0/0R4(config-if)# ip address 192.168.15.2 255.255.255.252R4(config-if)# router ospf 100R4(config-router)# network 192.168.15.0.0 0.0.0.255 area 2R4( fi t )# 2 t b

Chapter 3160© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R4(config-router)# area 2 stubR4(config-router)#

Page 161: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Not-So-Stubby Area (NSSA)

Similar to a Stub Area, except that it is primarily used to t t ISP h di t ib ti i i dconnect to ISPs, or when redistribution is required.

• Specifically, it does not accept Types 4 and 5 LSAs. • Allows the importing of external routes as Type 7 LSAs and converts• Allows the importing of external routes as Type 7 LSAs and converts

them to Type 5 LSAs on the ABR. • Better than creating stub areas and also useful for spokes.

RIP AS172.16.20.0 /24

ABR 192.168.15.0 /30

NSSA Area 1 Area 0

R2 R3R1

RIP Type 7 LSA : 172.16.20.0/24 Type 5 LSA : 172.16.0.0/16

Chapter 3161© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 162: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configure an NSSA

Define an NSSA area.Router(config-router)#

area area-id nssa [no-redistribution] [default-information-originate] [metric metric-value] [metric-type type-value] [no-

]summary]

Parameter Description

area-id The identifier for the NSSA.

no-redistribution(Optional) Used when the router is an NSSA ABR and you want the redistribute command to import routes only into the standard areas, but not into the NSSA areainto the NSSA area.

default-information-originate

(Optional) Used to generate a type 7 default LSA into the NSSA area. This keyword takes effect only on an NSSA ABR or an NSSA ASBR.

(Optional) Metric that is used for generating the default route Acceptablemetric metric-value (Optional) Metric that is used for generating the default route. Acceptable values are 0 through 16777214.

metric-type type-value

(Optional) OSPF metric type for default routes. It can be one of the following values: type 1 external route or 2: type 2 external route

Chapter 3162© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

no-summary (Optional) Allows an area to be a totally stubby NSSA, which is like an NSSA but does not have summary routes injected into it.

Page 163: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring a NSSA Area

NSSA Area 1 Area 0

RIP AS172.16.10.0172.16.11.0 R2

ABR.2

Fa0/0

172.17.0.0 172.17.20.0 /24

NSSA Area 1 Area 0

R1.1

Fa0/0

0.0.0.0 Default Route

R1(config)# router ospf 10R1(config-router)# redistribute rip subnetsR1(config-router)# default metric 150R1(config-router)# network 172.17.0.0 0.0.255.255 area 1R1(config-router)# area 1 nssaR1(config-router)#

R2(config)# router ospf 10R2(config-router)# summary-address 172.16.0.0 255.255.0.0R2(config-router)# network 172.17.20.0 0.0.0.255 area 1R2(config-router)# network 172.17.0.0 0.0.255.255 area 0R2(config-router)# area 1 nssa default-information-originate R2 (the ABR) advertises 0 0 0 0

Chapter 3163© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

(co g oute )# a ea ssa de au t o at o o g ateR2(config-router)#

R2 (the ABR) advertises 0.0.0.0

Page 164: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Totally Stubby NSSA

Cisco proprietary solution to NSSA. Area does not accept external AS routes or inter-area

routes.S ifi ll it d t t T 3 4 d 5 LSA• Specifically, it does not accept Types 3, 4 and 5 LSAs.

• It recognizes only intra-area routes and the default route 0.0.0.0. • A default route (0 0 0 0) is propagated throughout the areaA default route (0.0.0.0) is propagated throughout the area.

The ABR of a totally stubby NSSA must be configured with the no-summary keyword to prevent the flooding of y y p gsummary routes for other areas into the NSSA area.

Chapter 3164© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 165: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring a Totally Stubby NSSA Area

NSSA Area 1 Area 0

RIP AS172.16.10.0172.16.11.0 R2

ABR.2

Fa0/0

172.17.0.0 172.17.20.0 /24

R1.1

Fa0/0

0.0.0.0 Default Route

R1(config)# router ospf 10R1(config-router)# redistribute rip subnetsR1(config-router)# default metric 150R1(config router)# default metric 150R1(config-router)# network 172.17.0.0 0.0.255.255 area 1R1(config-router)# area 1 nssaR1(config-router)#

R2(config)# router ospf 10R2(config-router)# summary-address 172.16.0.0 255.255.0.0R2(config-router)# network 172.17.20.0 0.0.0.255 area 1R2(config-router)# network 172.17.0.0 0.0.255.255 area 0R2(config router)# area 1 nssa no summary R2 (the ABR) will automatically advertise 0 0 0 0

Chapter 3165© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

R2(config-router)# area 1 nssa no-summaryR2(config-router)#

R2 (the ABR) will automatically advertise 0.0.0.0

Page 166: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

How Does OSPF Generate Default Routes? Depends on the type of area. In a standard area: In a standard area:

• Routers do not automatically generate default routes.• The default-information originate command must be used. In a stub and totally stubby area:

• The ABR automatically generates a summary LSA with the link-state ID 0 0 0 0ID 0.0.0.0.

• The default-information originate command is not required.• This is true even if the ABR does not have a default route. In an NSSA area:

• The ABR generates the default route, but not by default. • To force the ABR to generate the default route use the area area-id• To force the ABR to generate the default route, use the area area-id nssa default-information-originate command.

In a totally stubby NSSA:

Chapter 3166© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

• The ABR automatically generates a default route.

Page 167: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Example OSPF Area Types in a Network

Chapter 3167© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 168: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring andConfiguring and Verifying Advanced OSPFAdvanced OSPF Authentication

Chapter 3168© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 169: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Authentication

Purpose is to authenticate routing information.• This is an interface specific configuration.• Routers will only accept routing information from other routers that

have been configured with the same authentication informationhave been configured with the same authentication information.

Chapter 3169© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 170: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

OSPF Authentication Types

Router generates and checks each packet and th ti t th f h d t k t it iauthenticates the source of each update packet it receives

Requires a pre-defined “key” (password) N t All ti i ti i hb t h th k fi d• Note: All participating neighbors must have the same key configured

OSPF supports 2 types of authentication:• Simple password authentication (plain text)• Simple password authentication (plain text)

• Less secure• MD5 authentication

• More secure and recommended

Chapter 3170© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 171: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Planning for OSPF

The following key parameters must be defined in enough d t il b f fi i OSPF th ti tidetail before configuring OSPF authentication:• The authentication mode (simple password versus MD5)• The definition of one or more keys to authenticate OSPF packets• The definition of one or more keys to authenticate OSPF packets,

according to the network security plan.

Once defined, the following steps may be implemented:, g p y p1. Assign a password (key) to be used.

• The actual command varies depending on the authentication mode used.2. Specify the authentication mode (simple password or MD5).

Chapter 3171© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 172: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configure A Key for Simple Authentication

Define a password to use for simple password authentication.

Router(config-if)#

ip ospf authentication-key password

The password parameter can be entered up to 8 bytes in length. This command is used in conjunction with the ip ospfThis command is used in conjunction with the ip ospf authentication command.

Chapter 3172© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 173: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configure the MD5 Key-ID and Key Define a password to use for MD5 authentication (recommended).

Router(config-if)#

ip ospf message-digest-key key-id md5 key

The key-id parameter is an identifier in the range from 1 to 255.

Th k t b t d t 16 b t i l th The key parameter can be entered up to 16 bytes in length.

All neighboring routers on the same network must have the samekey-id and the same key valuekey id and the same key value.

This command is used in conjunction with the ip ospfauthentication message-digest command.g g

Chapter 3173© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 174: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configure the Authentication Mode for OSPF

Specify the authentication type.Router(config-if)#

ip ospf authentication [message-digest | null]

Before using this command, configure a password. The command without any parameters specifies that simple password The command without any parameters specifies that simple password

authentication will be used. The message-digest parameter specifies that MD5 authentication

will be used. The null parameter specifies that no authentication is used.

This can be useful for overriding simple password or MD5 This can be useful for overriding simple password or MD5 authentication.

Chapter 3174© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 175: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring Simple Password Authentication

R1# show running-config! Area 0!<output omitted> !interface Fa0/0ip address 10.1.1.1 255.255.255.0 R1 R2S0/0/1

S0/0/1

192.168.1.96 /27

.101.102

!<output omitted>!interface Serial0/0/1ip address 192.168.1.101 255.255.255.224

Fa0/0Fa0/0R1 R2

10.1.1.0 /24 10.2.2.0 /24

S0/0/1S0/0/1

.1.1

pip ospf authenticationip ospf authentication-key PLAINPAS

!<output omitted>!!router ospf 10log-adjacency-changesnetwork 10.1.1.1 0.0.0.0 area 0network 192.168.1.0 0.0.0.255 area 0

!!<output omitted>

Chapter 3175© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 176: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring Simple Password Authentication

R2# show running-config!<output omitted>

Area 0

192 168 1 96 /27 <output omitted> !interface Fa0/0ip address 10.2.2.1 255.255.255.0

!Fa0/0Fa0/0

R1 R2S0/0/1S0/0/1

192.168.1.96 /27

.101.102

11 <output omitted>!interface Serial0/0/1ip address 192.168.1.102 255.255.255.224ip ospf authentication

Fa0/0Fa0/0

10.1.1.0 /24 10.2.2.0 /24

.1.1

p pip ospf authentication-key PLAINPAS

!<output omitted>!router ospf 10router ospf 10log-adjacency-changesnetwork 10.2.2.1 0.0.0.0 area 0network 192.168.1.0 0.0.0.255 area 0

!<output omitted>

Chapter 3176© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 177: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying Simple Password Authentication

Displays adjacency-related events of a successful connection.

R1# debug ip ospf adjOSPF adjacency events debugging is onR1#R1#<output omitted>

*Feb 17 18:42:01.250: OSPF: 2 Way Communication to 10.2.2.1 on Serial0/0/1, state 2WAYstate 2WAY*Feb 17 18:42:01.250: OSPF: Send DBD to 10.2.2.1 on Serial0/0/1 seq 0x9B6 opt 0x52 flag 0x7 len 32*Feb 17 18:42:01.262: OSPF: Rcv DBD from 10.2.2.1 on Serial0/0/1 seq 0x23ED opt0x52 flag 0x7 len 32 mtu 1500 state EXSTARTopt0x52 flag 0x7 len 32 mtu 1500 state EXSTART*Feb 17 18:42:01.262: OSPF: NBR Negotiation Done. We are the SLAVE*Feb 17 18:42:01.262: OSPF: Send DBD to 10.2.2.1 on Serial0/0/1 seq 0x23ED opt 0x52 flag 0x2 len 72<output omitted><output omitted>

R1# show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface10 2 2 1 0 FULL/ - 00:00:34 192 168 1 102 Serial0/0/1

Chapter 3177© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

10.2.2.1 0 FULL/ 00:00:34 192.168.1.102 Serial0/0/1

Page 178: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Troubleshooting Simple Password Problems

Simple authentication on R1, no authentication on R2:R1#*Feb 17 18:51:31.242: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 : Mismatch Authentication type. Input packet specified type 0, we use type 1use type 1

R2#*Feb 17 18:50:43.046: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 : Mismatch Authentication type. Input packet specified type 1, we use type 0

Authentication types

null: type 0null: type 0simple password: type 1MD5: type 2

Chapter 3178© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 179: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Troubleshooting Simple Password Problems

Simple authentication on R1 and R2, but different dpasswords.

R1#*Feb 17 18:54:01 238: OSPF: Rcv pkt from 192 168 1 102 Serial0/0/1*Feb 17 18:54:01.238: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 : Mismatch Authentication Key - Clear Text

R2#*Feb 17 18:53:13.050: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 : Mismatch Authentication Key - Clear Text

Chapter 3179© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 180: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring MD5 Authentication

R1# show running-configA 0!

<output omitted> !interface Fa0/0ip address 10.1.1.1 255.255.255.0 R1

Area 0

192.168.1.96 /27

.101102ip address 10.1.1.1 255.255.255.0

!<output omitted>!interface Serial0/0/1i dd 192 168 1 101 255 255 255 224

Fa0/0Fa0/0R1 R2

10.1.1.0 /24 10.2.2.0 /24

S0/0/1S0/0/1

.102

.1.1

ip address 192.168.1.101 255.255.255.224ip ospf authentication message-digestip ospf message-digest-key 1 md5 SECRETPASS

!<output omitted>!router ospf 10log-adjacency-changesnetwork 10.1.1.1 0.0.0.0 area 0network 192.168.1.0 0.0.0.255 area 0network 192.168.1.0 0.0.0.255 area 0

!<output omitted>

Chapter 3180© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 181: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Configuring MD5 Authentication

R2# show running-config!Area 0 !<output omitted> !interface Fa0/0ip address 10.2.2.1 255.255.255.0R1 R2S0/0/1

192.168.1.96 /27

.101.102

!<output omitted>!interface Serial0/0/1ip address 192.168.1.102 255.255.255.224

Fa0/0Fa0/0R1 R2

10.1.1.0 /24 10.2.2.0 /24

S0/0/1S0/0/1

.1.1

pip ospf authentication message-digestip ospf message-digest-key 1 md5 SECRETPASS

!<output omitted>!!router ospf 10log-adjacency-changesnetwork 10.2.2.1 0.0.0.0 area 0network 192.168.1.0 0.0.0.255 area 0

!!<output omitted>

Chapter 3181© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 182: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying MD5 AuthenticationR1# show ip ospf interfaceSerial0/0/1 is up, line protocol is upInternet Address 192.168.1.101/27, Area 0Process ID 10, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 64Transmit Delay is 1 sec, State POINT_TO_POINT

<output omitted>output omittedNeighbor Count is 1, Adjacent neighbor count is 1Adjacent with neighbor 10.2.2.1

Suppress hello for 0 neighbor(s)M di t th ti ti bl dMessage digest authentication enabledYoungest key id is 1

<output omitted>R1# R1# show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface10.2.2.1 0 FULL/ - 00:00:31 192.168.1.102 Serial0/0/1

R1#

Chapter 3182© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 183: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Verifying MD5 AuthenticationR1# debug ip ospf adjOSPF adjacency events debugging is on<output omitted><output omitted>*Feb 17 17:14:06.530: OSPF: Send with youngest Key 1*Feb 17 17:14:06.546: OSPF: 2 Way Communication to 10.2.2.2 on Serial0/0/1, state 2WAY*Feb 17 17:14:06 546: OSPF: Send DBD to 10 2 2 2 on Serial0/0/1 seq 0xB37 opt*Feb 17 17:14:06.546: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0xB37 opt 0x52 flag 0x7 len 32*Feb 17 17:14:06.546: OSPF: Send with youngest Key 1*Feb 17 17:14:06.562: OSPF: Rcv DBD from 10.2.2.2 on Serial0/0/1 seq 0x32F opt 0x52 flag 0x7 len 32 mtu 1500 state EXSTARTopt 0x52 flag 0x7 len 32 mtu 1500 state EXSTART*Feb 17 17:14:06.562: OSPF: NBR Negotiation Done. We are the SLAVE*Feb 17 17:14:06.562: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0x32F opt 0x52 flag 0x2 len 72*Feb 17 17:14:06 562: OSPF: Send with youngest Key 1*Feb 17 17:14:06.562: OSPF: Send with youngest Key 1<output omitted>

R1# show ip ospf neighborNeighbor ID Pri State Dead Time Address InterfaceNeighbor ID Pri State Dead Time Address Interface10.2.2.2 0 FULL/ - 00:00:35 192.168.1.102 Serial0/0/1

Chapter 3183© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 184: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Troubleshooting MD5 Authentication

MD5 authentication on both R1 and R2, but R1 has key 1 and R2 has key 2 both with the same passwords:R1#*Feb 17 17:56:16.530: OSPF: Send with youngest Key 1*Feb 17 17:56:26 502: OSPF: Rcv pkt from 192 168 1 102 Serial0/0/1 : Mismatch

has key 2, both with the same passwords:

*Feb 17 17:56:26.502: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 : Mismatch Authentication Key - No message digest key 2 on interface*Feb 17 17:56:26.530: OSPF: Send with youngest Key 1

R2#R2#*Feb 17 17:55:28.226: OSPF: Send with youngest Key 2*Feb 17 17:55:28.286: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 : Mismatch Authentication Key - No message digest key 1 on interface*Feb 17 17:55:38 226: OSPF: Send with youngest Key 2*Feb 17 17:55:38.226: OSPF: Send with youngest Key 2

Chapter 3184© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 185: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3 Summary

The chapter focused on the following topics:Ch t i ti f li k t t ti t l Characteristics of link-state routing protocols.

OSPF's two-tier hierarchical area structure, with a backbone area 0 and regular areas. g

How OSPF routers use the Hello protocol to build adjacencies. The OSPF metric calculation, which is based on the link bandwidth. The five types of OSPF packets—hello, DBD, LSR, LSU, and LSAck. The neighbor states that OSPF interfaces may pass through: down, init,

two way exstart exchange loading and fulltwo-way, exstart, exchange, loading, and full.

Chapter 3185© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 186: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3 Summary (cont.)

The five fields in the hello packet must match on neighboring routers: hello interval dead interval area id authentication password and stubhello interval, dead interval, area id, authentication password, and stub area flag.

Planning OSPF implementations, including the IP addressing, network topology, and OSPF areas.

Basic OSPF configuration commands including:• router ospf process id global configuration command• router ospf process-id global configuration command• network ip-address wildcard-mask area area-id

interface configuration command• ip ospf process-id area area-id [secondaries none]

interface configuration commandb d idth kil bit interface configuration command• bandwidth kilobits interface configuration command

• router-id ip-address router configuration command

Chapter 3186© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 187: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3 Summary (cont.)

Commands for verifying OSPF operation:• show ip protocols• show ip protocols

• show ip ospf neighbor

• show ip route

• show ip route ospf

• show ip ospf interface

h i f• show ip ospf

• debug ip ospf events

• debug ip ospf adjg p p j

• debug ip ospf packet

Chapter 3187© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 188: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3 Summary (cont.) How the OSPF router ID is selected with the router-id ip-address router

configuration command, the highest IP address on any active loopbackconfiguration command, the highest IP address on any active loopback interface, or the highest IP address of any active physical interface when OSPF starts.

The three types of networks defined by OSPF: point-to-point broadcast and The three types of networks defined by OSPF: point-to-point, broadcast, and NBMA.

How a DR and BDR are selected. The five modes of OSPF operation available for NBMA networks: nonbroadcast

and point-to-multipoint RFC modes; and broadcast, point-to-multipoint nonbroadcast, and point-to-point Cisco modes.

The different types of OSPF routers: internal routers, backbone routers, ABRs, and ASBRs.

The 11 different OSPF LSA types. yp The three kinds of OSPF routes: intra-area (O), interarea (O IA), and external

(either O E1 or O E2). Configuring OSPF LSDB overload protection using the max lsa router

Chapter 3188© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring OSPF LSDB overload protection using the max-lsa router configuration command.

Page 189: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3 Summary (cont.) Using the passive-interface type number [default] router

configuration commandconfiguration command. Propagate an OSPF default route using the default-information originate [always] router configuration command.

OSPF summarization can be configured on an ABR using the area area-id range address mask [advertise | not-advertise] [cost cost] router configuration command, and onadvertise] [cost cost] router configuration command, and on an ASBR using the summary-address ip-address mask [not-advertise] [tag tag] router configuration command.Vi t l li k fi d ith th id i t l li k Virtual links are configured with the area area-id virtual-link router-id router configuration command, and verified with the show ip ospf virtual-links command.

The several area types defined in OSPF: standard areas, backbone (transit) areas, stub areas, totally stubby areas, NSSAs, and totally stubby NSSAs

Chapter 3189© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

stubby NSSAs.

Page 190: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3 Summary (cont.)

The types of OSPF authentication: null, simple password authentication (also called plain-text authentication) and MD5 authentication(also called plain-text authentication), and MD5 authentication.

The commands to configure OSPF simple password authentication:• ip ospf authentication-key password interface p p y

configuration command• ip ospf authentication interface configuration command or

the area area id authentication router configurationthe area area-id authentication router configuration command

The commands to configure OSPF MD5 authentication:• ip ospf message-digest-key key-id md5 key interface

configuration commandi f th ti ti di t interface• ip ospf authentication message-digest interface configuration command or the area area-id authentication message-digest router configuration command

Chapter 3190© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 191: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Resources

OSPF Deisgn Guide• http://www.cisco.com/en/US/tech/tk365/technologies_white_paper091

86a0080094e9e.shtml

Configuring OSPF Configuring OSPF• http://www.cisco.com/en/US/docs/ios/12_0/np1/configuration/guide/1c

ospf.html

OSPF Technology Page• http://www.cisco.com/en/US/tech/tk365/tk480/tsd_technology_support

_sub-protocol_home.html

OSPF Authenticationhtt // i / /US/t h/tk365/t h l i fi ti• http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml

Chapter 3191© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 192: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3 Labs

Lab 3-1 Single-Area OSPF Link Costs and Interface P i itiPriorities Lab 3-2 Multi-Area OSPF with Stub Areas and

AuthenticationAuthentication Lab 3-3 OSPF Virtual Links and Area Summarization Lab 3 4 OSPF over Relay Switch Lab 3-4 OSPF over Relay Switch Lab 3-5 OSPF Challenge Lab

L b 3 6 T bl h ti OSPF Lab 3-6 Troubleshooting OSPF Lab 3-7 OSPF Case Study

Chapter 3192© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Page 193: Chapter 3: Configuring the Open Shortest Path First ProtocolShortest Path First Protocol · 2016. 3. 14. · Chapter 3 Objectives Describe OSPF terminology and operation within various

Chapter 3193© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public