0% found this document useful (0 votes)
338 views21 pages

Chapter 1. OSPF

OSPF is a link-state routing protocol that uses LSAs to exchange routing information. All routers run the SPF algorithm and maintain an identical LSDB within each area. Areas allow dividing a large network into smaller sections to reduce routing table size. Routers elect a DR and BDR on multi-access networks to reduce routing traffic. External routes from other protocols can be redistributed into OSPF.

Uploaded by

Ram C
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
338 views21 pages

Chapter 1. OSPF

OSPF is a link-state routing protocol that uses LSAs to exchange routing information. All routers run the SPF algorithm and maintain an identical LSDB within each area. Areas allow dividing a large network into smaller sections to reduce routing table size. Routers elect a DR and BDR on multi-access networks to reduce routing traffic. External routes from other protocols can be redistributed into OSPF.

Uploaded by

Ram C
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Chapter – 6

OSPF
CCNP ENARSI
300-410
By
Ramakrishnan
OSPF FUNDAMENTALS
 It is link-state routing protocol , exchange routes LSA , received routes are stored in local LSDB.
 This process floods the LSA throughout the OSPF routing domain just as the advertising router
advertised it.
 All OSPF routers maintain a synchronized identical copy of the LSDB within an area.
 All OSPF routers run Dijkstra’s shortest path first (SPF) algorithm to construct a loop-free topology of
shortest paths
 OSPF dynamically detects topology changes within the network and calculates loop-free paths in a
short amount of time with minimal routing protocol traffic.
 A router can run multiple OSPF processes. Each process maintains its own unique database, and routes
learned in one OSPF process are not available to a different OSPF process without redistribution of
routes between processes.
 The OSPF process numbers are locally significant and do not have to match among routers. 
AREAS
 OSPF Areas are logical grouping of routers.
 All routers within the same OSPF area maintain an identical copy of the LSDB.

DISADVANTAGES OF SINGLE AREA OSPF :


 A full SPT calculation runs when a link flaps within the area.
 With a single area, the LSDB increases in size and becomes unmanageable.
 The LSDB for the single area grows, consumes more memory, and takes longer
during the SPF computation process.

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


AREAS….
 AREA 0 is a special area called the backbone area , all areas are expected to interject routes into it.

HOW ROUTES ARE EXCHANGED BETWEEN AREAS?


 ABRs are responsible for advertising routes from one area and injecting them into a different OSPF area.
Every ABR needs to participate in Area 0 to allow for the advertisement of routes into another area.
• Routes from Area 1 advertise into Area 0.
• Routes from Area 2 advertise into Area 0.
• Routes from Area 0 advertise into Areas 1 and 2. This includes the local Area 0 routes, in addition to the
routes that were advertised into Area 0 from Area 1 and Area 2.

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


INTER-ROUTER COMMUNICATION

 OSPF runs directly over IPv4, using its own protocol 89, which is reserved
for OSPF by the Internet Assigned Numbers Authority (IANA). 

There are two OSPF multicast addresses:


 AllSPFRouters: IPv4 address 224.0.0.5 or MAC address 01:00:5E:00:00:05.
All routers running OSPF should be able to receive these packets.
 AllDRouters: IPv4 address 224.0.0.6 or MAC address 01:00:5E:00:00:06.
Communication with designated routers (DRs) uses this address.

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


OSPF PACKET TYPES
There are 5 types of packets exchanged between OSPF enabled routers:
 HELLO : Sent out to discover neighbors and maintain neighbor relationship
 DATA BASE DESCRIPTION (DBD) : These packets are used to describe the
contents of the LSDB.
 Link-state request (LSR) : When a router thinks that part of its LSDB is stale,
it may request a portion of a neighbor’s database using this packet type
 Link-state update (LSU) : This is an explicit LSA for a specific network link,
and normally it is sent in direct response to an LSR.
 Link-state acknowledgment : These packets are sent in response to the
flooding of LSAs, thus making the flooding a reliable transport feature.

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


OSPF HELLO PACKET FIELDS
 Router ID (RID) : Unique 32bit ID within OSPF domain.
 Authentication Options : Options none, plaintext, or Message Digest 5 (MD5) authentication.
 Area ID : The OSPF area that the OSPF interface belongs to. It is a 32-bit number that can be written in dot-
decimal format (0.0.1.0) or decimal (256).
 Interface Address Mask : The network mask for the primary IP address for the interface out which the hello
is sent.
 Interface Priority : The router interface priority for DR elections.
 Hello Interval : The time interval, in seconds, at which a router sends out hello packets on the interface.
 Dead Interval : The time interval, in seconds, that a router waits to hear a hello from a neighbor router
before it declares that router down.
 Designated Router and Backup Designated Router
 Active Neighbor : list of OSPF neighbors seen on that network segment

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


OSPF Neighbor States

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


OSPF Neighbor States…..
Lesser known OSPF State… is the ATTEMPT STATE :
A state that is relevant to nonbroadcast multi-access (NBMA) networks that do not
support broadcast and that require explicit neighbor configuration. This state
indicates that no recent information has been received, but the router is still
attempting communication.

| Ramakrishnan R.C.| Contact : +91-9381422315


Requirements for Neighbor Adjacency
1. The RIDs must be unique between the two devices
2. The interfaces must share a common subnet.
3. The interface maximum transmission unit (MTU) must match because the OSPF
protocol does not support fragmentation.
4. The area ID must match for that segment.
5. OSPF hello and dead timers must match for that segment.
6. The need for a DR must match for that segment.
7. The authentication type and credentials (if any) must match for that segment.
8. Area type flags must be identical for that segment (stub, NSSA, and so on).

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


OSPF Configuration

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


OSPF Verification commands.
 Show ip ospf interfaces
Show ip ospf interface brief
Show ip ospf neighbor
Show ip route ospf

WHAT IS A PASSIVE INTERFACE??


 Making the network interface passive still adds the network segment to the
LSDB but prohibits the interface from forming OSPF adjacencies.
A passive interface does not send out OSPF hellos and does not process any
received OSPF packets.
The command passive interface-id under the OSPF process makes the interface
passive, and the command passive interface default makes all interfaces
passive. To allow for an interface to process OSPF packets, the command no
passive interface-id is used

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


External OSPF Routes
 External routes are routes learned from outside the OSPF domain, but they are
injected into an OSPF domain through redistribution.
 When a router redistributes routes into an OSPF domain, the router is called an 
autonomous system boundary router (ASBR). 

External routes are classified as Type 1 or Type 2:


 Type 1 routes are preferred over Type 2 routes.
 The Type 1 metric equals the redistribution metric plus the total path metric to the
ASBR. In other words, as the LSA propagates away from the originating ASBR, the
metric increases.
 The Type 2 metric equals only the redistribution metric. The metric is the same for
the router next to the ASBR as the router 30 hops away from the originating ASBR.
This is the default external metric type used by OSPF.

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


Default Route Advertisement
OSPF supports advertising the default route into the OSPF domain.
 
How to advertise the default route:

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

NOTE : Routes learnt through this method reflect as O*E2 routes

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


The Designated Router and Backup Designated Router

 Multi-access networks such as Ethernet (LANs) and Frame Relay networks allow more than two routers to
exist on a network segment.
 Cause scalability problems with OSPF as the number of routers on a segment increases. Additional
routers flood more LSAs on the segment, and OSPF traffic becomes excessive as OSPF neighbor
adjacencies increase.
 Using the number of edges formula, n (n – 1) / 2, where n represents the number of routers
DR and BDR elections
 The DR/BDR election occurs during OSPF neighborship—specifically, during the
last phase of the 2-Way neighbor state and just before the ExStart state.
 If the hello packet includes an RID other than 0.0.0.0 for the DR or BDR, the new
router assumes that the current routers are the actual DR and BDR.
 The routers place their RID and OSPF priority in their OSPF hellos for that
segment.
 Any router with the OSPF priority of 1 to 255 on its OSPF interface attempts to
become the DR. By default, all OSPF interfaces use a priority of 1.
 OSPF deems a router more preferable if the priority for the interface is the
highest for that segment. If the OSPF priority is the same, the higher RID is more
favorable.
 When all the routers have agreed on the same DR, all routers for that segment
become adjacent with the DR. Then the election for the BDR takes place, except
that the DR does not add its RID to the BDR field of the hello packet.
 The OSPF DR and BDR roles cannot be preempted after the DR/BDR election.

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


OSPF Network Types
 Network circuits, such as serial links, do not require a DR and would just waste router CPU cycles.
OSPF provides 5 network types:
 Broadcast : Default setting on OSPF-enabled Ethernet links. DR & BDR election is required. H=10s, D=40s.
(ip ospf network broadcast)
 Nonbroadcast: Default setting on enabled OSPF Frame Relay main interface or Frame Relay multipoint
subinterfaces. DR & BDR election is required. H=30s, D=120s.
(ip ospf network non-broadcast)
 Point-to-point : Default setting on enabled OSPF Frame Relay point-to-point subinterfaces. DR & BDR election
is not required. H=10s, D=40s.
(ip ospf network point-to-point)
 Point-to-multipoint : Not enabled by default on any interface type. Interface is advertised as a host route (/32),
and sets the next-hop address to the outbound interface. Primarily used for hub-and-spoke topologies. DR &
BDR election is not required. H=30s, D=120s.
(ip ospf network point-to-multipoint)
 Loopback : Default setting on OSPF-enabled loopback interfaces. Interface is advertised as a host route (/32).

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


FAILURE DETECTION
OSPF hello packets is to ensure that adjacent OSPF neighbors are still healthy and available.
Upon receipt of the hello packet from a neighboring router, the OSPF dead timer resets to
the initial value, and then it starts to decrement again.
Dead interval timer is four times the hello timer.

Ramakrishnan R.C. | Contact : +91-9381422315


AUTENTICATION
OSPF authentication is enabled on an interface-by-interface basis or for all interfaces in an area.
You can set the password only as an interface parameter, and you must set it for every interface. If you miss
an interface, the default password is set to a null value.

OSPF supports two types of authentication:


 Plaintext: Provides little security, as anyone with access to the link can see the password by using a network sniffer

MD5 cryptographic hash:


 This type of authentication uses a hash, so the password is never sent out the wire
 MD5 authentication is a hash of the key number and password combined. If the keys do not match, the
hash differs between the nodes.

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122


|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122
OSPF interface level configuration

|Ramakrishnan R.C | Contact : +91-9381422315 & 7010637122

You might also like