Archive for the OSPF Links State many areas Category

OSPF – Link State Proctol in Multi-areas

Posted in OSPF Links State many areas on May 19, 2008 by itdaddy


ospf operations in a nutshell:

Instead of having every router flooding the network with LSAs after a network topology change, the change notification is sent straight to the DR and the DR then floods the network with the change. If the DR fails, the backup designated router (BDR) takes its place. The BDR is promoted to DR  and another election is held, this one to elect a new BDR.

The value use to elect the DR and BDR is the OSPF interface priority. By default, this value is one on all OSPF-enabled interfaces. To influence the election, the interface-level command “ip ospf priority” is used. Setting an interface’s priority to zero prevents it from becoming the DR and BDR.


OSPFv2 last but not least

How neighbors are formed
Hello packets
ABR + summarized routes
OSPF link state
Djikstra algorithm SPF algorithm
metric is cost
LSAs sent to adjacencies
show ip ospf database (looks like route table)
LSA –> database (form this)

– receives LSAs for other routers
– floods LSA change to all non DR and BDR
– non DR/BDR are called DROTHERS
– show ip ospf neighbor
If DR fails the BDR takes over when promoted to DR. Another election is held
for BDR.

How to influence  Connections
-interface priority
-default value = 1 on all interfaces
-influence election of BDR and DR by changeing interface priority.
  — R1(config-if)#ip ospf priority 0
     — will prevent a router from EVER becoming a BDR or DR!!!
     — keeps the router a permanet DROTHER.

Neighbors must form before anything happens
How neighbors form in OSPF:

Hello packets sent every 10 seconds on Ethernet (broadcast)
Hello packets sent every 30 seconds on NBMA (Serial/frame-relay type)

Hello pakets perform 2 roles:

1. Hellos allow neighbors to discover each other.
2. Hellos allow a type of keepalive!

Requirements for OSPF Neighbor Adjacencies to form
– subnet must be same
-subnet id must match
-hello timerss – keepalive must match
-dead timers must match (=10xhello)
  –dead timer for Ethernet 4 x 10 = 40seconds
  –dead timer for NBMA 4x 30=120seconds
If hello timer changes so does hold/dead timer changes by 4xhello timer

R1#debug ip ospf adjacencies

this shows election process and you can debug where it is failing.
R1#u all
R1#no debug all
R1#no debug ip ospf adjacencies

the above shuts of specific or all debugging.

How to read Debug ip ospf adj command output
Debug ip ospf adj – status

DOWN – no hello received from neighbor yet
ATTEMPT – NBMA(serial) unicast hello packets sent to neighbor.
INIT – 1 hello packet sent

2-WAY – is good meaning both sides recognize as neighbors. Each router recieved
its own RID. (highest ip address on router/or highest loopback..doesnt have to enabled to be a RID)

EXSTART – follow DR/BDR election – LSAs can begin.

Exchange – database  description of the link state database

Loading – router now sending LSR (link-state-request) to their potential neighbors

Full – router database in sync adn the adjacencies have been formed.

OSPF lab portion Hub and Spoke Topology


Nice link to some cools stuff on OSPF in multiple areas

CCNA 802 tests on only single area but I was told by CCIEs best to see it in more than one area.

They are the top dog. Click here.

Great lab by RouterAlley! here:


Force DR and BDR elections

ip ospf priority 0 on all spokes so they do not EVER become
DR or BDR. the priority defaults = 1.

NOTE: elections go to the highest prioriy in OSPF.

– priority defaults to 1
– DR highest priority
– BDR 2nd highest priority most of the time.
– Prevent R2/R3 spokes from being elected DR/BDR use:
config-if)#ip ospf priority 0

How OSPF routers become neighor adjacencies
                              NBMA(serial)     Broadcast(Ethernet)
Hellos go out                 30                              10
Dead/hold time          4xhello=120        4xhello=40
subnet mask             same                   same
Subnet ID                   same                 same

note: must all match.
Hub required command hub/spoke topology – HOT!!!!!!
***neighbor statements needed on hub!***


Common Issue with NBMA topologies – Fix

Sometimes the default will be Network_Type broadcast
when building a Frame-relay circuit. So need to change
the network_type to point-to-point.

this is how to change network_type – fix
R1#(config-if)#ip ospf network (non-broadcast)(broadcast)(point-to-point)

show ip ospf interface (serial1 as example)

will show you the type of network for that interface.
debug ip ospf adj (shows elections of DR/BDR and other)

fixed! – neighbor relations can form

2nd Part of OSPF Routing

Topics Covered:
– Broadcast networks
– ospf RID
– OSPF router types
– Advantage of OSPF
– Point-to-point OSPF networks
-OSPF Authentication Text/MD5 message-digest
No DR/BDR in a point-to-point with 2 routers only.

R2 ———–SWITCH————-R3   /

show ip ospf neighbor                    FULL/ – both routers no DR or BDR!

                   (Area 51)



show ip route ospf
ospf cost 


equal cost load balancing is in effect.
metric is cost:

cost = ((10^7/band(bps)) + delay sum)256

OSPF costs:

56 kbps             = 1788
T1 1.544 MBps = 64
Ethernet             = 10


Cost dilemm on serial default 64 thinks it is T1 line 1.544 MBps

R1(config)#int serial1
R1(config-if)#ip ospf cost 100

2 routes same
by default runs
Equal cost load balancing is taking effect.
RID – highest ip address (doesnt have to be active; but if loopback
address exists will take the highest loopback over serial./ethernet.
How to force or hard code the RID ?

ip ospf #
reload or **clear ip ospf process** (choose the later)

Types of routers in OSPF
Internal Router – all in the same area (not multiple area router)

ABR – area border router – 1 interface in area 0 (backbone)
                                            – 1 interface in another area
                                            – connects area 0 to other areas
ASBR – area system border router – connects other protocols
                                             to OSPF networks. Called Route                  


Backbone Router – 1 interface in area 0.

Note: All ABRs are backbone routers but not all Backbone routers
are ABRs

OSPF authentication Text or MD5 message-digest
clear text authentication
R1(config)#int serial 0
ip ospf authentication-key ccna
ip ospf authentication
note: both routers need the same on each interface.
MD5 authentication
R1(config)#int s0
ip ospf authentication message-digest
ip ospf authentication message-digest-key 1 md5 ccie
note: both routers need the same on each interface.
Gosh Darn it this what a lot to digets! Done OSPF!!!!!