OSPF process in short

1, form adjacency

init: each routers will send out hello packets to ( if network type is broadcast) or unique ip address (if network type is none broadcast);

2-way: router A has received hello packet from B router,  the the hello packet includes its A’s id,Thus, bidirectional communication has been established and the peers are now OSPF neighbors.

extat: select DR/BDR if need, point to point network or point to multipoints networks do not select DR/BDR

exchange: exchanges the LSA

full: adjacency formed
In order to form OSPF adjacencies, the following must match on the neighboring routers:

area ID
Hello and Dead timers
stub area flag
interface type: point to point, NBMP, etc
Duplicated router id
MTU mismatch may cause ospf adjacencies failed:

Though it is not technically part of the required conditions, during OSPF neighbor establishment if MTU DOESN’T match, it will be stuck in DBD exchange.the neighborship will be stuck in “EXSTART / EXCHANGE” state.

The reason are the Database Updates. Once an update will be larger than the MTU, it needs to be splitted. In the case of a MTU mismatch the update could loose a few bytes which would make the update worthless. Due to this unusable LSU, OSPF will ignore the packet and cannot sync the database. OSPF has introduced this MTU check in V2. In a demo environment you may not get exposed to this effect because your updates may be small enough to get the DBD and LSU handled withing a single packet. Still you may cause a flapping neighborship because LSAck will be missing and the Neighborship may be reset. This could be an indicator for a MTU mismatch if there is a component like a switch between the two routers which has a smaller MTU but acts transparent.

When DR/BDR is presented in the network, all other routers can only form adjacency with DR and BDR, the rest of the routers can not form adjacency with each other, they will stay in 2 way state with each other.  When DR/BDR is not presented in the network ( point to point, or point to mulit points networks), adjacency is formed for each link.

Below is the table describing the process:

ospf adjencency process

2, Each router now has all information, LSA database, it will run dijkstra algorithm to calculate the shortest path towards each network work. That means each router will maintain the whole routing table calculated according to the LSA database. So it is critical for OSPF to guarantee that each router has the same LSA database.

3, OSPF routes will be selected to routing table according to administrative distance value  (110)in Cisco and default preference  (10)according to Juniper.

4, in Broadcast link type, DR/BDR will be selected, and routers only form adjacency with DR/BDR, in NBMP link type for example Frame relay, it requires the configuration of “per interface” ospf neighbor both in OSPFv3 and OSPFv2

6, OSPFv3 vs OSPFv2

– OSPFv3 support both unicast ipv4 and ipv6
– OSPFv3 is configured using interface command where ospfv2 using “network” command in router configuration mode
– OSPFv3 have 2 more LSA types: type 8 for link LSA to carry address information on link(network) scope, type 9 for intra-Area-Prefix LSA to associate a list of IPV6 prefixes to a Router LSA type 1or a network LSA type2 .
This is in order to separate address information from topology information. While in ospfv2 Link type 1 and 2 carry both address and topology information. Thus cause unnecessary spf recalculation when address is changed.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s