You are on page 1of 162

The OSPF Protocol

1
4.1 OSPF Protocol Overview
4.2 OSPF Packet Types
4.3 Configuring Basic OSPF
4.4 OSPF Network Types
4.5 Types of OSPF Routers and LSAs
4.6 OSPF Route Summarization Techniques
4.7 OSPF Special Area Types
4.8 OSPF Virtual Links
4.9 Troubleshooting OSPF

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-2 2


4.1 OSPF Protocol Overview

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-3 3


Objectives

Upon completing this lesson, you will be able to:


• Describe the concept of link-state routing protocol
• Identify the purpose of OSPF areas
• Describe the concept of OSPF adjacencies
• Explain the OSPF SPF calculation

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-4


Link-State Protocols

Cost, Type of Link, Network Information

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-5


Link-State Routing Protocols

• Link-state (LS) routers recognize much


more information about the network than
their distance-vector counterparts.
Consequently LS routers tend to make
more accurate decisions.
• Link-state routers keep track of the following:
– Their neighbours
– All routers within the same area
– Best paths toward a destination

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-6


Link-State Data Structures

• Neighbor table:
– Also known as the adjacency database
(list of recognized neighbors)
• Topology table:
– Typically referred to as LSDB (Link State Data Base)
(routers and links in the area or network)
– All routers within an area have an identical LSDB
• Routing table:
– Commonly named a forwarding database
(list of best paths to destinations)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-7


Link-State Data Structure:
Network Hierarchy

Link-state routing requires a hierachical


network structure that is enforced by OSPF.
This two-level hierarchy consists of the
following:
• Transit area (backbone or area 0)
• Regular areas (nonbackbone areas)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-8


OSPF Areas

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-9


Area Terminology

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-10


LS Data Structures: Adjacency
Database

• Routers discover neighbors by exchanging hello packets.


• Destination address of hello packets is multicast
• Routers declare neighbors to be up after checking
certain parameters or options in the hello packet.
• Point-to-point WAN links:
– Both neighbors become fully adjacent.
• LAN links:
– Neighbors form an adjacency with the DR and BDR.
– Maintain two-way state with the other routers (DROTHERs).
• Routing updates and topology information are only passed
between adjacent routers.
DR = Designated Router
BDR = Backup Designated Router

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-11


OSPF Adjacencies

Routers build logical adjacencies between each other


using the Hello Protocol. Once an adjacency is formed:
• LS database packets are exchanged to synchronize
each other’s LS databases.
• LSAs are flooded reliably throughout the area or network
using these adjacencies.
LS = Link State
LSA = Link State Advertisement
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-12
OSPF Calculation

Routers find the best paths to destinations


by applying Dijkstra’s SPF algorithm to the
link-state database as follows:
• Every router in an area has the identical
link-state database.
• Each router in the area places itself into
the root of the tree that is built.
• The best path is calculated with respect to the
lowest total cost of links to a specific destination.
• Best routes are put into the forwarding database.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-13


SPF Calculation

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-14


LS Data Structures: LSA Operation

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-15


LS Data Structures: LSA Operation (Cont.)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-16


LS Data Structures: LSA Operation (Cont.)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-17


LS Data Structures: LSA Operation

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-18


Summary

This lesson presented these key points:


• OSPF is a link-state routing protocol that builds three tables: neighbor
table, LS topology database, and routing table or forwarding database.
• A two-tier hierarchical network structure is used by OSPF in
which the network is divided into areas. This area structure
is used to separate the LSDB into more manageable sizes.
• Adjacencies are built by OSPF routers using the Hello Protocol.
Over these logical adjacencies, link-state updates are sent to
exchange database information between adjacent OSPF routers.
• Dijkstra’s SPF algorithm is used to calculate best
paths for all destinations. SPF is run against the LSDB,
and the outcome is a table of best paths known as the routing table.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-19


4.2 OSPF Packet Types

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-20 20


Objectives

Upon completing this lesson, you will be able to:


• List the types of OSPF packets
• Explain how neighbor adjacencies are established in OSPF
• Identify the exchange process and the neighbor adjacency
states of OSPF
• Define OSPF link state update sequence numbers
• Use the debug ip ospf packet command and debug ip ospf
adj command

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-21


OSPF Packet Types

Builds adjacencies between neighbors

Checks for database synchronization between routers

Requests specific link state records from routers

Sends specifically requested link state records

Acknowledges the other packet types

• OSPF packets are encapsulated directly into an IP payload


• OSPF packets do not use TCP or UDP

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-22


OSPF Packet Header Format

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-23


OSPF Packet Header Format
•Version Number – For OSPF version 2
•Packet Type – Differentiates the five OSPF packet types
•Packet Length – Length of OSPF packet in bytes
•Router ID – Defines which router is the source of the packet
•Area ID – Defines the area where the packet originated
•Checksum – Used for packet header error detection
•Authentication Type – Describes either clear text passwords or encrypted
MD5 formats for router authentication
•Data
•For Hello packet – a list of known neighbors
•For DBD packet – a summary of LSDB
•For LSR packet – the type of LSU needed and router ID
•For LSU packet – the full LSA entry
•For LSAck packet – empty

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-24


Neighborship (Hello Protocol)

Each interface participating in OSPF


uses IP multicast address 224.0.0.5 to
send hello packets periodically.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-25


OSPF Hello Packet

•Router ID = Highest IP address on an active interface unless a loop-back address


is configured

•Hello Interval = By default 10 seconds on multi-access networks

•Dead Interval = By default 4 times the hello interval

•Neighbors = List of adjacent routers with established bidirectional communication

•Area ID = Routers should belong to same area

•Router Priority = 8 bit number to set the priority of a router to decide DR and BDR

•DR/BDR = Designated Router and Backup Designated Router IP address

•Authentication Password = If enabled, should be same

•Stub Area Flag = Should be same for routers belonging to a stub area

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-26


OSPF DBD Packet

Interface MTU— This field contains the largest data size, in bytes, that can be send through the associated
interface.
Options— Represents the optional capabilities supported by the router
I Bit— When set to 1, this means that this is the first packet in DBD exchange.
M Bit— When set to 1, this means that more packets will follow.
MS Bit— Use this for master and slave. When this bit is set, it means that the router is a master in the DBD
exchange process. If this bit is set to 0, it means that the router is the slave.
DBD Sequence Number— This field contains a unique value set by the master. This sequence number is
used during database exchange. Only a master can increment the sequence number.
LSA Header— This field consists of a list of the link-state database headers.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-27
Establishing Bidirectional Communication

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-28


Establishing Bidirectional
Communication (Cont.)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-29


Establishing Bidirectional
Communication (Cont.)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-30


Establishing Bidirectional
Communication

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-31


Discovering the Network Routes

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-32


Discovering the Network Routes

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-33


Adding the Link-State Entries

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-34


Adding the Link-State Entries (Cont.)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-35


Adding the Link-State Entries

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-36


Maintaining Routing Information

• Router A notifies all OSPF DRs on 224.0.0.6

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-37


Maintaining Routing Information (Cont.)

• Router A notifies all OSPF DRs on 224.0.0.6


• DR notifies others on 224.0.0.5
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-38
Maintaining Routing Information (Cont.)

• Router A notifies all OSPF DRs on 224.0.0.6


• DR notifies others on 224.0.0.5
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-39
Maintaining Routing Information

• Router A notifies all OSPF DRs on 224.0.0.6


• DR notifies others on 224.0.0.5
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-40
LSA Sequence Numbering
• Each LSA record in the LSDB maintains a sequence
number.
• The sequence numbering scheme is a 4-byte number
that begins with 0x80000001 and ends with 0x7fffffff.
• OSPF floods each LSA record every 30 minutes to
maintain proper database synchronization. Each
time the LSA is flooded, the sequence number is
incremented by one.
• Ultimately, an LSA sequence number will wrap around
to 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) LSA sequence number is
more recent.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-41
LSA Database Sequence Numbers
and Maxage

RTC# show ip ospf database

OSPF Router with ID (203.250.15.67) (Process ID 10)


Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
203.250.15.67 203.250.15.67 48 0x80000008 0xB112 2
203.250.16.130 203.250.16.130 212 0x80000006 0x3F44 2

• Every OSPF router announces a router LSA for those


interfaces that it owns in that area.
• Link ID: Router ID that created the router LSA.
• ADV Router: Advertising router—the router ID of the OSPF
router that announced the router LSA. Generally the Link ID
and the ADV router for a router LSA are the same.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-42


debug ip ospf packet

Debug of a single packet


Router# debug ip ospf packet

OSPF: rcv. v:2 t:1 l:48 rid:200.0.0.117


aid:0.0.0.0 chk:6AB2 aut:0 auk:

v: version of OSPF
t: type of packet, 1 = hello, 2 = DBD, 3 = LSR, 4 = LSU, 5 = LSAck
l: packet length in bytes
rid: router ID
aid: area ID
chk: checksum
aut: authentication type, 0 = no authentication, 1 = simple password, 2 = MD5
auk: authentication key
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-43
Summary

This lesson presented these key points:


• There are five OSPF packet types: hello, DBD, LSU, LSR,
and LSAck.
• The Hello Protocol forms logical neighbor and adjacency
relationships. A designated router may be required to
coordinate adjacency formations.
• The exchange protocol passes through several states: init,
two-way, exstart, and exchange before finally reaching the
goal of full state. Full state means that databases are
synchronized with adjacent routers.
• Link-state records are advertised on change, but also sent
periodically every 30 minutes to ensure database integrity.
The maximum time an LSR will stay in the database, without
an update, is one hour. The LSR increments its sequence
number every time it is advertised.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-44
4.3 Configuring Basic OSPF

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-45 45


Objectives

Upon completing this lesson, you will be able to:


• Configure and verify a basic single area OSPF
configuration

• Use OSPF configuration commands to properly enable


the OSPF routing process

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-46


Configuring Basic OSPF: Single Area
Router(config)#
router ospf process-id

• Turns on one or more OSPF routing processes in the


IOS software.
• Process IDs do not need to match on different routers
Router(config-router)#
network address inverse-mask area [area-id]

• Router OSPF subordinate command that defines the


interfaces (either by network address or by interface
address) that OSPF will run on. Each network
number must be defined to a specific area.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-47


Configuring OSPF on Internal Routers of
a Single Area

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-48


Verifying OSPF Operation

Router#
show ip protocols

• Verifies the configured IP routing protocol


processes, parameters and statistics
Router#
show ip route ospf

• Displays all OSPF routes learned by the router


Router#
show ip ospf interface

• Displays the OSPF router ID, area ID and


adjacency information
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-49
Verifying OSPF Operation (Cont.)

Router#
show ip ospf

• Displays the OSPF router ID, timers, and statistics

Router#
show ip ospf neighbor [detail]

• Displays information about the OSPF neighbors,


including DR and BDR information on broadcast
networks

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-50


The show ip route ospf Command

RouterA# show ip route ospf

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,


B - BGP, D - EIGRP, EX - EIGRP external, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EGP, i - IS-IS, L1 - IS-IS
level-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is not set


10.0.0.0 255.255.255.0 is subnetted, 2 subnets
O 10.2.1.0 [110/10] via 10.64.0.2, 00:00:50, Ethernet0

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-51


The show ip ospf interface Command

RouterA# show ip ospf interface e0

Ethernet0 is up, line protocol is up


Internet Address 10.64.0.1/24, Area 0
Process ID 1, Router ID 10.64.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) 10.64.0.2, Interface address 10.64.0.2
Backup Designated router (ID) 10.64.0.1, Interface address 10.64.0.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:04
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.64.0.2 (Designated Router)
Suppress hello for 0 neighbor(s)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-52


The show ip ospf neighbor Command

RouterB# show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


10.64.1.1 1 FULL/BDR 00:00:31 10.64.1.1 Ethernet0
10.2.1.1 1 FULL/- 00:00:38 10.2.1.1 Serial0

DR and BDR are not used in serial interfaces

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-53


OSPF Router ID
• The router is known to OSPF by the 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 active
interface at the moment of OSPF process startup.
• A loopback interface can override OSPF router ID. It is the
highest IP address of any active loopback interface.
• An OSPF router-id command can override OSPF router ID.
• The loopback or router-id command is recommended
for stability.
• Once router ID is set, it does not change until router/OSPF
restarts
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-54
Loopback Interfaces

Router(config)#
interface loopback 0

Router(config-if)#
ip address 172.16.17.5 255.255.255.255

• If the OSPF process is already running, the OSPF


process must be cleared before the new router-id
command will take effect.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-55
OSPF router-id command
Router(config-router)#
router-id ip-address

• This command is subordinate to the router ospf


command.
• Any unique IP address can be used.
• If this command is used on an OSPF process that is
already active, then the new router ID is used at the next
reload or at a manual OSPF process restart using the
clear ip ospf process command.
Router(config)#
router ospf 1
Router(config-router)#
router-id 172.16.1.1
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-56
OSPF Router ID Verification

RouterA# show ip ospf

Routing Process "ospf 1" with ID 1.1.3.1


Supports only single TOS(TOS0) routes
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Number of DCbitless external LSA 0
Number of DoNotAge external LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Area BACKBONE(0) (Active)
Number of interfaces in this area is 2
Area has no authentication
SPF algorithm executed 10 times
Area ranges are
Link State Update Interval is 00:30:00 and due in 0:07:16
Link State Age Interval is 00:20:00 and due in 00:07:15
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-57


Summary

This lesson presented these key points:


• Configuration of OSPF in a single area is a two-step
process:
– Turn on OSPF with the router ospf command.
– Use the network statement to describe which interfaces
will run OSPF.
• OSPF configuration requires each interface to be
assigned to an area number.
• OSPF elects a router ID at startup time using the
following techniques:
– Highest IP address of all interfaces.
– IP address of the loopback address.
– A router-id command under the OSPF process.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-58


4.4 OSPF Network Types

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-59 59


Objectives

Upon completing this lesson, you will be able to:


• Describe adjacency behavior for a point-to-point link
• Describe adjacency behavior for a broadcast link
• Explain OSPF operations over NBMA networks
• Identify the different OSPF over Frame Relay
configuration options
• Compare common OSPF and Frame Relay configuration
strategies and examples
• Interpret debug output for IP OSPF adjacencies

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-60


Point-to-Point Links

• Usually a serial interface running either PPP


or HDLC
• May also be a point-to-point subinterface
running Frame Relay or ATM
• No DR or BDR election required
• OSPF autodetects this interface type
• OSPF packets are sent using multicast 224.0.0.5
• Default hello and dead intervals are 10 and 40 sec
respectively
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-61
Multiaccess Broadcast Network

• Generally LAN technologies like Ethernet and Token Ring


• DR and BDR selection required
• All neighbor routers form full adjacencies with the DR and
BDR only
• Packets to the DR use 224.0.0.6
• Packets from DR to all other routers use 224.0.0.5
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-62
Electing the DR and BDR

• Hello packets are exchanged via IP multicast.


• The router with the highest OSPF priority is
selected as the DR.
• Use the OSPF router ID as the tie breaker.
• The DR election is nonpreemptive.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-63
Setting Priority for DR Election

Router(config-if)#
ip ospf priority number

• This interface configuration command assigns the


OSPF priority to an interface.
• Different interfaces on a router may be assigned
different values.
• The default priority is 1. The range is from 0 to 255.
• 0 means the router is a DROTHER; it can’t be the
DR or BDR.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-64
NBMA Topology

• A single interface interconnects multiple sites.


• NBMA topologies support multiple routers, but without
broadcasting capabilities.
• OSPF neighbors are not automatically discovered by the
router.
• To implement broadcasting and multicasting, the router
replicates the packets and send them individually on each PVC
to each destination.
• Default hello and dead intervals are 30 and 120 sec
respectively
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-65
DR Election in NBMA Topology

• OSPF considers NBMA to be like other


broadcast media.
• DR and BDR need to have fully meshed
connectivity with all other routers, but NBMA
networks are not always fully meshed and do
not provide multi-access capabilities.
• DR and BDR need a list of neighbors, NBMA
interface does not automatically detect
neighbors, therefore the election of DR and BDR
becomes an issue in NBMA topologies.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-66


Frame Relay Topologies

•All to all
•Redundancy
•Most no. of PVCs
•For n nodes, n(n-1)/2
PVCs will be needed

•Hub and spoke


•Most common
•All to some •Least no. of PVCs
•Partial redundancy •Single interface to
•Average no. of PVCs multiple locations
•Compromise

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-67


OSPF Over NBMA Topology Modes of
Operation

• RFC-compliant modes are as follows: (RFC 2328)


– Nonbroadcast (NBMA)
– Point-to-multipoint
• NBMA mode simulates the broadcast, neighbors are
manually configured and DR/BDR election required, less
overhead traffic
• Point to multipoint mode treats the topology as collection
of point to point links, neighbors are automatically
identified but DR/BDR election is not done

RFC = Request for Comments

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-68


OSPF Over NBMA Topology Modes of
Operation

• Additional modes from Cisco are as


follows:
– Point-to-multipoint nonbroadcast
– Broadcast
– Point-to-point

RFC = Request for Comments

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-69


Selecting the OSPF Network Type

Router(config-if)#
ip ospf network [{broadcast | nonbroadcast | point-to-
multipoint | point-to-multipoint nonbroadcast}]

• This interface command defines OSPF network types.

broadcast (Cisco)
•Makes a WAN interface appear to be a LAN
•One IP subnet
•Neighbors are auto-discovered
•DR/BDR elected
•Requires full mesh

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-70


Selecting the OSPF Network Type
nonbroadcast (RFC)
• One IP subnet
• Neighbors are manually configured
• DR/BDR elected manually
• Used in partial mesh
point-to-multipoint (RFC)
• One IP subnet
• Neighbors are auto-discovered
• DR/BDR not required
• Used in partial mesh
point-to-multipoint nonbroadcast (Cisco)
• Neighbors are manually configured
• DR/BDR not required
point-to-point (Cisco)
• One IP subnet
• Only two neighbors
• DR/BDR not required

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-71


NBMA Mode (Nonbroadcast Mode)

• Treated as a broadcast
network by OSPF
(acts like a LAN)
• All serial ports are part of
the same IP subnet
• Frame Relay, X.25, and
ATM networks default to
NBMA operation
• Replicates LSA updates
•Neighbors are manually configured
• RFC 2328-compliant •If partial mesh DR/BDR elected
• Less overhead manually to have connectivity to all
other neighbor router

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-72


Using the Neighbor Command

• Router OSPF subordinate command


• Used to statically define neighbor relationships
in an NBMA network
Router(config-router)#
neighbor x.x.x.x [priority number] [poll-interval number]

IP address of the
neighboring router Time in seconds an NBMA
interface waits before sending
hello packets to the neighbor
Priority for neighboring even if the neighbor is inactive
router to become DR

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-73


Neighbor Command Example

RouterA(config)# router ospf 100


RouterA(config-router)# network 140.140.0.0 0.0.255.255 area 0
RouterA(config-router)# neighbor 140.140.1.2 priority 0
RouterA(config-router)# neighbor 140.140.1.3 priority 0

•Each router should be manually configured its neighboring routers


•Priority zero means neighboring router does not become DR
•Router A will be elected as DR as it has connectivity to others
•In hub and spoke, only DR (the hub) needs neighbor command

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-74


The show ip ospf neighbor

Frame Relay

DR/BDR not needed Not a DR/BDR Different from RID

RouterA# show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


130.130.1.1 1 full/ — 0:00:35 128.12.1.2 s0
140.140.1.2 0 full/drother 0:00:36 140.140.1.2 s1
140.140.1.3 0 full/drother 0:00:34 140.140.1.3 s1

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-75


Point-to-Multipoint Mode

• The point-to-multipoint command allows for NBMA networking.


• The point-to-multipoint mode fixes partial-mesh and star topologies.
• OSPF treats the links as if they are point to point
• No DR is required and only a single subnet is used.
• Routers exchange additional LSU to auto-discover neighbors
• Replicates LSA updates
• A 30-second hello is used.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-76
Point-to-Multipoint Configuration

RouterA(config)# interface serial 0


RouterA(config-if)# encapsulation hdlc
RouterA(config-if)# ip address 120.120.1.1 255.255.255.0
RouterA(config)# interface serial 1
RouterA(config-if)# encapsulation frame-relay
RouterA(config-if)# ip address 140.140.1.1 255.255.255.0
RouterA(config-if)# ip ospf network point-to-multipoint

RouterB(config)# interface serial 0


RouterB(config-if)# ip address 140.140.1.2 255.255.255.0
RouterB(config-if)# encapsulation frame-relay
RouterB(config-if)# ip ospf network point-to-multipoint

• Frame Relay Inverse ARP Enabled (Default)


• Does not required sub-interfaces
• Single subnet
• DR/BDR not elected, so no priorities
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-77
Point-to-Multipoint Example

RouterA# show ip ospf interface s1

Serial1 is up, line protocol is up


Internet Address 140.140.1.1/24, Area 1
Process ID 100, Router ID 120.120.1.1, Network Type Point-To-Multipoint,
Cost: 64
Transmit Delay is 1 sec, State: Point_To_Multipoint
Timer intervals configured,Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:11
Neighbor count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 140.140.1.2
Adjacent with neighbor 140.140.1.3

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-78


Point-to-Multipoint Nonbroadcast

• Cisco extension to point-to-multipoint RFC


• Must statically define neighbors like normal
NBMA
• Like point-to-multipoint mode, DR is not elected
• Used in special cases where neighbors
cannot be automatically discovered
RouterA(config-if)#
ip ospf network point-to-multipoint [nonbroadcast]

• This interface command defines a special version


of the point-to-multipoint mode. Note the
nonbroadcast option.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-79
Other Cisco Modes

•Broadcast
•Neighboring routers are statically listed
•Interface is set to broadcast and behaves as LAN
•DR/BDR are elected

•Point to point
•Between only two nodes
•Used only with point to point sub-interfaces
•DR/BDR are not elected

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-80


Using Subinterfaces

Router(config)#
interface serial 0.[x] point-to-point

• This is a global configuration command. The


subinterface number is x.
• The physical serial port becomes multiple logical
ports.
• Each PVC and SVC gets its own subinterface.
• Limitations:
– Each subinterface requires an IP subnet.
– Hello and LSA packets are multiplied by the
number of subinterfaces. Hellos are sent every
10 seconds.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-81
Subinterface Example

• PVCs on the right are treated like the point-to-point


link on the left.
• Each subinterface requires a subnet.
• No need of DR/BDR and no need to statically define
the neighbors
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-82
Multipoint Subinterfaces
Router(config)#
interface serial 0.x multipoint

• This subinterface number is x.


• The physical serial port becomes multiple logical ports.
• Multiple PVCs are on a single subinterface.
• NBMA mode is the default for multipoint subinterfaces.
• DR/BDR are elected and neighbors are statically define
• Limitations:
– Each subinterface requires an IP subnet.
– Hello and LSA packets are multiplied by the number of
subinterfaces. Hellos are sent every 10 seconds.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-83


Multipoint Subinterface Example

•Single interface serial 1 has been logically separated by


two subinterfaces: one point-to-point and one multipoint.
• Each subinterface requires a subnet.
• OSPF defaults to NBMA mode on multipoint subinterfaces.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-84


OSPF Over NBMA Topology Summary

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-85


Creation of Adjacencies

RouterA# debug ip ospf adj

Point-to-point interfaces coming up: No election


%LINK-3-UPDOWN: Interface Serial1, changed state to up
OSPF: Interface Serial1 going Up
OSPF: Rcv hello from 192.168.0.11 area 0 from Serial1 10.1.1.2
OSPF: End of hello processing
OSPF: Build router LSA for area 0, router ID 192.168.0.10
OSPF: Rcv DBD from 192.168.0.11 on Serial1 seq 0x20C4 opt 0x2 flag 0x7 len 32
state INIT
OSPF: 2 Way Communication to 192.168.0.11 on Serial1, state 2WAY
OSPF: Send DBD to 192.168.0.11 on Serial1 seq 0x167F opt 0x2 flag 0x7 len 32
OSPF: NBR Negotiation Done. We are the SLAVE
OSPF: Send DBD to 192.168.0.11 on Serial1 seq 0x20C4 opt 0x2 flag 0x2 len 72

Tracks OSPF adjacencies as they come up or go down

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-86


Creation of Adjacencies (Cont.)

RouterA# debug ip ospf adj

Ethernet interface coming up: Election


OSPF: 2 Way Communication to 192.168.0.10 on Ethernet0, state 2WAY
OSPF: end of Wait on interface Ethernet0
OSPF: DR/BDR election on Ethernet0
OSPF: Elect BDR 192.168.0.12
OSPF: Elect DR 192.168.0.12
DR: 192.168.0.12 (Id) BDR: 192.168.0.12 (Id)
OSPF: Send DBD to 192.168.0.12 on Ethernet0 seq 0x546 opt 0x2 flag 0x7 len 32
<…>
OSPF: DR/BDR election on Ethernet0
OSPF: Elect BDR 192.168.0.11
OSPF: Elect DR 192.168.0.12
DR: 192.168.0.12 (Id) BDR: 192.168.0.11 (Id)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-87


Summary

This lesson presented these key points:


• OSPF defines a variety of network types:
– Point-to-point (example is a T1 serial interface)
– Broadcast (example is a LAN interface like Ethernet)
– Nonbroadcast multiaccess (example is Frame Relay configured
on a serial interface)
– Point-to-multipoint (example is OSPF over Frame Relay mode
that eliminates the need for a DR)

– Point-to-multipoint nonbroadcast (Cisco specific)


• Each mode of operation has advantages and
disadvantages. A network operator must understand
each option and make the proper configuration choices.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-88


4.5 Types of OSPF Routers and
LSAs

©©2003,
2003,Cisco
CiscoSystems,
Systems,Inc.
Inc.All
Allrights
rightsreserved.
reserved. BSCI 2.0—4-89 89
Objectives

Upon completing this lesson, you will be able to:


• List the types of OSPF routers
• Explain in general terms all of the LSAs defined by
OSPF, and specifically describe the most common
LSAs used in OSPF today
• Interpret the OSPF link-state database and routing table

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-90


Issues with Maintaining a Large OSPF
Network

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-91


The Solution: OSPF Hierarchical Routing

• Consists of areas and autonomous systems


• Minimizes routing update traffic
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-92
Types of OSPF Routers

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-93


Types of OSPF Routers (Cont.)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-94


Types of OSPF Routers (Cont.)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-95


Types of OSPF Routers (Cont.)

ABR = Area Border/Boundary Router


© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-96
Types of OSPF Routers

AS is as per routing protocols


© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-97
Link-State Advertisement Types

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-98


LSA Type 1: Router LSA

• One router LSA for every router in an area


– Includes list of directly attached links
– Each link identified by IP prefix assigned to link
• Identified by the router ID of the originating router
• Floods within its area only, does not cross ABR
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-99
LSA Type 2: Network LSA

• One network (type 2) LSA for each transit broadcast


or NBMA network in an area
– Includes list of attached routers on the transit link
– Includes subnet mask of link
• Advertised by the DR of the broadcast network
• Floods within its area only, does not cross ABR
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-100
LSA Type 3: Summary LSA

• Type 3 summary LSAs are used to flood network information


to areas outside the originating area (inter-area).
– Describes network number and mask of link
• Advertised by the ABR of originating area.
• Type 3 LSAs flood throughout the AS.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-101
LSA Type 4: Summary LSA

• ASBR sends type 1 LSA with E bit set to identify itself as ASBR
• When ABR (B bit set) receives it, converts to type 4
• Summary (type 4) LSAs are used to advertise an ASBR to all other areas in
the AS.
• They are generated by the ABR of the originating area.
• Type 4 LSAs flood throughout the AS.
• They are regenerated by all subsequent ABRs.
• Type 4 LSA contains the router ID of the ASBR only.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-102


LSA Type 5: External LSA

• External (type 5) LSAs are used to advertise networks from other


autonomous systems.
• Type 5 LSAs are advertised and owned by the originating ASBR.
• Type 5 LSAs flood throughout the entire AS.
• The advertising router ID ASBR is unchanged throughout the AS.
• Type 4 LSA is needed to find the ASBR.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-103
Interpreting the OSPF Database

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-104


Interpreting the Routing Table: Types
of Routes

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-105


Calculating Costs for External Type 1
and Type 2 Routes

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-106


The show ip route Command

RTA# show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,


B - BGP, D - EIGRP, EX - EIGRP external, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EGP, i - IS-IS, L1 - IS-IS
level-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is 203.250.15.67 to network 0.0.0.0


203.250.16.0 255.255.255.192 is subnetted, 1 subnets
O E2 203.250.16.128 [110/10] via 203.250.15.67, 00:00:50, Ethernet0
203.250.13.0 255.255.255.255 is subnetted, 1 subnets
C 203.250.13.41 is directly connected, Loopback0
203.250.15.0 255.255.255.192 is subnetted, 3 subnets
O IA 203.250.15.0 [110/74] via 203.250.15.67, 00:00:50, Ethernet0
C 203.250.15.64 is directly connected, Ethernet0
C 203.250.15.192 is directly connected, Ethernet1
O*E2 0.0.0.0 0.0.0.0 [110/10] via 203.250.15.67, 00:00:50, Ethernet0

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-107


Calculating Costs for E1 and E2
Routes

Cost of E1 routes changes at every hop in OSPF domain


Cost of E2 routes remains constant in OSPF domain
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-108
Changing the Cost Metric
• Dijkstra’s algorithm determines the best path by adding all link costs
along a path.
• The cost, or metric, is an indication of the overhead to send packets
over an interface.
RouterA(config-if)#

ip ospf cost value

• This interface configuration command overrides the default cost


calculation. Values from 1 to 65535 can be defined.
RouterA(config-router)#

auto-cost reference-bandwidth

• This router ospf configuration command sets the reference


bandwidth to values other than 100 Mbps (legal values range from 1
to 4,294,967).
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-109
Summary

This lesson presented these key points:


• At this time, there are 11 different LSA types defined in OSPF.
The first five are the most commonly used:
– Type 1 router
– Type 2 network
– Type 3 and 4 summary
– Type 5 external
• OSPF defines three kinds of routes: intra-area, inter-area, and
external. External routes are subdivided into E1 and E2.
• The cost metric default is the inverse of the bandwidth
defined on an interface. The ospf cost command, the
bandwidth command, and the auto-cost reference-bandwidth
command can manipulate the cost metric.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-110
4.6 OSPF Route Summarization
Techniques

©©2003,
2003,Cisco
CiscoSystems,
Systems,Inc.
Inc.All
Allrights
rightsreserved.
reserved. BSCI 2.0—4-111 111
Objectives

Upon completing this lesson, you will be able to:


• Describe route summarization concepts
• Use route summarization commands for OSPF
• Use the default-information originate command to
propagate a default route into OSPF
• Identify a default route in OSPF

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-112


Benefits of Route Summarization

• Minimizes number of routing table entries


• Localizes impact of a topology change
• Reduces LSA 3 and 5 flooding and saves CPU resources
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-113
Using Route Summarization

• Inter-area (IA) summary link carries mask


• One or more entries can represent several subnets

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-114


Configuring Route Summarization

Router(config-router)#
area area-id range address mask

• Consolidates inter-area (IA) routes on an ABR


• Type 3 summary LSAs

Router(config-router)#
summary-address address mask

• Consolidates external routes, usually on an ASBR


• Type 5 external LSAs

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-115


Route Summarization Configuration
Example at ABR

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-116


Route Summarization Configuration
Example at ASBR

• RIPv2 must be redistributed into OSPF

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-117


Default Routes in OSPF

• A default route is injected into OSPF as an external


LSA type 5.
• Default route distribution is not on by default; use a
default-information originate command under the
OSPF routing process.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-118


Configuring OSPF Default Routes
Router(config-router)#

default-information originate [always] [metric metric-value]


[metric-type type-value]

• Normally, this command only advertises a 0.0.0.0 default


into the OSPF network if the default route already exists in
the routing table
• The always keyword allows the 0.0.0.0 default to be
advertised even when the default route does not exist in
the routing table
• The metric and metric type are the cost and type (E1 or
E2) assigned to the default route. Default cost and type
are 10 and E2.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-119
Default Route Configuration Example

ISP A will be preferred over ISP B, why?


© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-120
Summary

This lesson presented these key points:


• Route summarization improves CPU utilization, reduces
LSA flooding, and reduces LSDB and routing table sizes.
• The area range command is used to summarize at the ABR.
• The summary-address command is used to summarize at
the ASBR.
• Default routes can be used in OSPF to prevent the need for a
specific route to all destination networks. The benefit is a
much smaller routing table and LSDB, with complete
reachability.
• OSPF uses a special command to inject a default route,
called the default-information originate command.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-121


4.7 OSPF Special Area Types

©©2003,
2003,Cisco
CiscoSystems,
Systems,Inc.
Inc.All
Allrights
rightsreserved.
reserved. BSCI 2.0—4-122 122
Objectives

Upon completing this lesson, you will be able to:


• List the types of OSPF areas
• Define and configure OSPF stub areas
• Define and configure OSFP totally stubby areas
• Define and configure OSPF not-so-stubby areas (NSSAs)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-123


Types of Areas

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-124


Types of Areas (Cont.)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-125


Types of Areas

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-126


Stub Area Rules

• Stub areas cannot have an ASBR, and they


should have one ABR.
• If there is more than one ABR, suboptimal
routing paths to external autonomous systems
can occur.
• Stub areas must not have virtual links going
through them.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-127


Using Stub Areas

• External LSAs
are stopped
• Default route
is advertised
into stub area
by the ABR
• All routers in
area 50 must
be configured
as stub

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-128


Stub Area Configuration

RouterA(config-router)#

Area area-id stub

• This router subordinate command turns


on stub area networking.
• All routers in a stub area must use the
stub command.

router ospf 10
network 130.130.32.0 0.0.31.255 area 1
network 130.130.0.0 0.0.31.255 area 0
area 1 stub

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-129


OSPF Stub Area Configuration Example

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-130


Using Totally Stubby Areas
• External LSAs
are stopped
• Summary LSAs
are stopped
• Routing table
is reduced to
a minimum
• All routers must
be configured
as stub
Default
• ABR must be
configured as
totally stubby
• Is a Cisco-
specific feature
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-131
Totally Stubby Commands
RouterA(config-router)#
area area-id stub no-summary

• The addition of no-summary creates a totally


stubby area.
• The no-summary option prevents all summary LSAs
from entering the stub area.
RouterA(config-router)#
area area-id default-cost cost
• This command defines the cost of a default route sent
into the stub area.
• The default cost is 1.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-132


Totally Stubby Configuration Example

1
y

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-133


Routing Tables with Different Areas

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-134


Routing Tables for Stub Area

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-135


Routing Tables for Totally Stubby Area

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-136


Not-So-Stubby Areas

• Breaks stub • Special LSA type 7


area rules defined, sent by ASBR
• ASBR (R1) is • ABR (R2) converts LSA 7
allowed in NSSA to LSA 5 – redistribution
• NSSA is an RFC addendum

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-137


NSSA Configuration

ASBR ABR

All routers in NSSA To generate O*N2 default route (O*N2 0.0.0.0/0) into NSSA area

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-138


NSSA Totally Stubby Configuration

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-139


The show Commands for Stub and NSSA
RouterA#
show ip ospf

• Displays which areas are normal, stub, or NSSA


RouterA#
show ip ospf database

• Displays LSA type 7 updates


RouterA#
show ip ospf database nssa-external

• Displays specific details of each LSA type 7


update in database
RouterA#
show ip route

• Displays NSSA routes with code O N2 or O N1


N means NSSA
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-140
Summary

This lesson presented these key points:


• Several area types are defined in OSPF.
• The backbone is the transit area.
• Stub areas reduce flooding into the area by replacing
external LSAs with a default route.
• Totally stubby areas reduce flooding into the area by
replacing both external and summary LSAs with a
default route.
• Not-so-stubby areas are a special case. They allow an
area that does not meet the requirements of a stub to
gain the benefits of a stub.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-141


4.8 OSPF Virtual Links

©©2003,
2003,Cisco
CiscoSystems,
Systems,Inc.
Inc.All
Allrights
rightsreserved.
reserved. BSCI 2.0—4-142 142
Objectives

Upon completing this lesson, you will be able to:


• Define the two major purposes of OSPF virtual links
• Identify when it is appropriate to use virtual links
• Explain how OSPF virtual links operate
• Configure OSPF virtual links
• Verify OSPF virtual links operation

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-143


Illegal Area Connections

• By default, all areas must connect to area 0.


• Area 4 is connected incorrectly.
• There may be times when this type of connectivity
is required.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-144
Defining Virtual Links

• Virtual links are used to connect a discontiguous


area to area 0.
• A logical connection is built between router A
and router B – transit area
• Virtual links are recommended for backup or
temporary connections.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-145
Configuring Virtual Links

Router(config-router)#
area area-id virtual-link router-id

• Creates a virtual link

remoterouter# show ip ospf interface ethernet 0

Ethernet0 is up, line protocol is up


Internet Address 10.64.0.2/24, Area 0
Process ID 1, Router ID 10.64.0.2, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.64.0.2, Interface address 10.64.0.2
Backup Designated router (ID) 10.64.0.1, Interface address 10.64.0.1

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-146


OSPF Virtual Link Configuration
Example 1

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-147


OSPF Virtual Link Configuration
Example 2

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-148


The show ip ospf virtual-links Command

Router# show ip ospf virtual-links

Virtual Link to router 10.2.2.2 is up


Transit area 0.0.0.1, via interface Ethernet0, Cost of using 10
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40,
Retransmit 5
Hello due in 0:00:08 Adjacency State FULL

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-149


Summary

This lesson presented these key points:


• A virtual link is a feature used to temporarily mend
backbone failures.
• A virtual link is part of the OSPF standard.
• When configuring a virtual link, always use the
router ID of the far-end router.
• Use the show ip ospf virtual-links command to
verify that the virtual link is functioning correctly.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-150


4.9 Troubleshooting OSPF

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-151 151
Objectives

Upon completing this lesson, you will be able to:


• Identify the causes resulting into OSPF going down
and fix them

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-152


OSPF Neighbor Relationship Problems

•The OSPF neighbor list is empty.


•An OSPF neighbor is stuck in ATTEMPT.
•An OSPF neighbor is stuck in INIT.
•An OSPF neighbor is stuck in 2-WAY.
•An OSPF neighbor is stuck in EXSTART/EXCHANGE.
•An OSPF neighbor is stuck in LOADING.

None of the states mentioned in this list is an indication of


a problem, but if a neighbor is stuck in one of these states
for a long time, this is a problem and must be corrected;
otherwise, OSPF will not function properly.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-153


OSPF Neighbor List is Empty

The most common possible causes of this problem are as


follows:

•OSPF is not enabled on the interface.


•Layer 1/2 is down.
•The interface is defined as passive under OSPF.
•An access list is blocking OSPF Hellos on both sides.
•A subnet number/mask has been mismatched over a broadcast link.
•The Hello/dead interval has been mismatched.
•The authentication type (plain text versus MD5) has been mismatched.
•An authentication key has been mismatched.
•An area ID has been mismatched.
•Stub/transit/NSSA area options have been mismatched.
•No network type or neighbor is defined over NBMA (Frame Relay, X.25,
SMDS, and so on).

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-154


OSPF Neighbor List is Empty

Stub/transit/NSSA area options have been mismatched.

• When OSPF exchanges Hello packets with a neighbor, it also exchanges


an optional capability (One of the option fields is for the OSPF stub area flag).
• When this bit is set to 0, the area with which the router is associated is a
stub area, and no external LSAs are allowed in this area.
• If one side has this bit set to 0 and the other side doesn't, OSPF
adjacency is not formed.

This is called an optional capability mismatch. One side says that it can
allow external routes, and the other side says that it cannot allow external
routes, so OSPF neighbor relationships are not formed.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-155


An OSPF neighbor is stuck in ATTEMPT

This problem is valid only for NMBA networks in which


neighbor statements are defined.

The most common possible causes of this problem are as


follows:

• Mis-configured neighbor statement


• Unicast broken on NBMA

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-156


An OSPF neighbor is stuck in INIT

When a router receives an OSPF Hello from a neighbor, it


sends the Hello packet by including that neighbor's router
ID in the Hello packet. If it doesn't include the neighbor's
router ID, the neighbor will be stuck in INIT.

The most common possible causes of this problem are as


follows:

• An access list on one side is blocking OSPF Hellos.


• Multicast capabilities are broken.
• Authentication is enabled on only one side
• Hellos are getting lost on one side at Layer 2.
© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-157
An OSPF neighbor is stuck in 2-Way

It is normal in broadcast media to have a 2-WAY state


because not every router becomes adjacent on broadcast
media. Every router enters into FULL state with the DR
and the BDR.

The most common possible cause of this problem is as


follows:

• Priority 0 Is Configured on All Routers

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-158


An OSPF neighbor is stuck in EXSTART/EXCHANGE

In this state, Master Slave is selected, whole database is


exchanged.

The most common possible cause of this problem is as


follows:

• Mismatched interface MTU


• Duplicate router IDs on neighbors (no Master-Slave selection happens)

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-159


An OSPF neighbor is stuck in LOADING

When a local router does not receive any revert for a link-
state request packet, the router will be stuck in the
LOADING state.

The most common possible cause of this problem is as


follows:

• Mismatched MTU
• Corrupted link-state request packet

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-160


Summary

This lesson presented key points with help of


which we can Troubleshoot a given OSPF
Problems.

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-161


THANK YOU

Has This TRAINING Enhanced Your


Knowledge and Understanding of OSPF?

© 2003, Cisco Systems, Inc. All rights reserved. BSCI 2.0—4-162

You might also like