Tuesday, December 14, 2010

OSPF summary notes CCNA/CCNP/CCIE

OSPF : 

OSPF  is  link state IGP protocol

OSPF uses IP  protocol  89

OSPF uses a shorted path first algorithm in order to build data path  and ... The shortest path is calculated with the use of the Dijkstra algorithm.

OSPF send trigger update if there is change in network

OSPF  send periodic update of entire routing table every 30 minute

in OSPF  all area must connect to area 0

all router in an area have the same topology table

all area must have hierarchical ip addressing design , so that summarization with in the area would be easier.

in OSPF     ABR and ASBR can only do summarization

Rule  :  OSPF router  id

all ip address configured with in interfaces in a  router  , the highest ip will elect as ospf router id. however loop back interface will beat physical interface , even loop back has a lowest ip address .if there is multiple loop back , highest loop back gets elected .OSPF router id  keep changing  if a router or process gets reboot .always better to hard code router id .

OSPF neighbor states :

OSPF down state :  if router send out a hello message  on a interface still did not hear back , this is called down state

OSPF init state :  if router receive  a hello message ( receive hello) , the router goes to init state .

OSPF 2 way state : when a router reply to hello message , router goes to 2way state .

OSPF  ex-start state : if hellos and all are agreed it comes to  master and slave selection process , where router goes to  ex-start state . the master sends DBD packet ( database description packet ) and then slaves sends its DBD back  to master .

OSPF  Loading state  :  once DBDs  received and acknowledged router goes to loading state .


OSPF  full state  : once neighbor synchronized with database router goes to full state .


hello message are send out once very 10 second in broadcast/point2point network , and every 30 second in no broadcast network

dead time is 4 times to hello timer


to form a neighbor OSPF router must match  hello and dead timer , network mask , area id and authentication .
OSPF maintains  3 table :

neighbor table :

topology table :  knows about network with in a area

routing table :


on a OSPF  broadcast segment,  OSPF  DR/BDR gets elected

 all OSPF speaking router communicate on multicast address 224.0.0.5

 DR/BDR  routers communicate on 224.0.0.6

OSPF  packet type :

hello

Database description DBD

LSR  :  link state request

LSA   : link state advertisement

LSU  : link state update

LSACK :  link state acknowledgement


OSPF network type :

broadcast multi-access


non-broadcast multi-access   default on serial interface

 point to  multipoint RFC standard  advertise /32 for each link
                                                    
 point-2-point Cisco proprietary default mode on sub interface
                                                      
  broadcast    
                                                       
 point 2 multipoint non broadcast   Cisco proprietary  static neighbor configuration required


OSPF  ABR summarization happen with “  area --- range “ command , and it creates a summary route or null 0 route in local router .

OSPF ASBR summarization happen with “ summary address”  command in OSPF process .
                                                         

OSPF LSA type :


LSA type 1 : router LSA (routing update )*****

LSA type 2 : network LSA (DR generated )

LSA type 3 : summary LSA ( ABR summary route) route from ABR

LSA type 4 : summary LSA ( ASBR location ) ip address of ASBR advertise

LSA type 5 : External LSA (ASBR summary route )

Some OSPF handy command :

show ip ospf nei

show ip ospf int

clear ip ospf process

show ip ospf database

LSA (link state advertisement )  1 --  originated by every router in an area

In  OSPF  broadcast segment hellos are send as multicast

In OSPF  non broadcast segment hellos are send as unicast

on OSPF non-broadcast network , neighbor has to be configured on
OSPF  DR router manually by neighbor command.



In general loopback interface route will be treated as host route in OSPF

if loopback need to  advertise as a network , use  ip ospf network point-to-point
command on loopback interface .

for OSPF network type point to point  hello time 10 dead time 40

for OSPF  network type multipoint hello time 30 dead time 120

point to multipoint network does not have DR/BDR election send hellos as multicast to
224.0.0.5, its change the next hop value .

inter area route is LSA 3  shows as  OIA in routing table

intra area routes are LSA 1 & 2  shows as O in routing table

                              100
OSPF cost =  -----------------------
                   Interface bandwidth in Mbps


every shared network should have DR and a BDR

DR BDR election :

Highest priority on interface is better
if it is tie then highest OSPF  router ID better 


OSPF area :

stub area :  block type 5 lsa entering into this area instead gets a default route from neighbor O*IA mark, along with inter area route, this is industry standard

totally stub area : block type 3 , 4 and 5 LSA entering to this area , this is Cisco proprietary , to enable this use 'area x no-summary’ on border router command
 router gets only a default route o*IA.

not-so-stuby area : passes external (type 5) LSA via type 7 LSA to the backbone area 0 and once it passes not so stuby area converted by ABR, the LSAs shows as type 5
                  meaning external route . router receive a O*IA default route



OSPF  does not use key chain method of authentication ,  it uses authentication on interface , support two type authentication , md5 and clear text .if we use ip OSPF authentication-key command , we are using clear text authentication.

OSPF  routes type :

E1    :  cost of route increments as it passes through the autonomous system .

E2 (default) : cost of route remain same as it passes through autonomous system this is default type for OSPF  external route

use auto-cost reference bandwidth to adjust cost as require in OSPF process .

Default-information originate ' command will send a default route to the network o*E2  mark , router should have a static route, if there is no static route use ' default-information originate always ' command to advertise a default route.





1 comment:

  1. thanks alot
    Very useful and organized data

    ReplyDelete