Friday 9 March 2012

OSPF Routing - Foundation Concepts 2

OSPF's cost
Understanding the DR and BDR
The flurry of OSPF packet types



OSPF's cost




This is the view that the topology table (the informarion that thye know) gives of an area to a router in that area :0)


NOW, the main difference over the topology table between EIGRP and OSPF, is OSPF throws away as it were the routes that are not the best routes that dont make it into the routing table (well it does keep them, they stay in the topology table but if the best route (i.e the route in the routing table) goes down, then OSPF process has to be ran again ...


OSPF's METRIC is COST

COST is 100 divided by bandwidth

56kbps is .056 mps = 1785 in cost


Cost at 100Gbps:          1
Cost at 40Gbps:           1    
Cost at 10Gbps:           1   
Cost at 1Gps:             1    
Cost at 100Mbps:          1    
Cost at 10Mbps:          10                      
Cost at 6.176Mbps:       16                     
Cost at 4.632Mbps:       21                      
Cost at 3.088Mbps:       32                     
Cost at 1.544Mps:        64               
Cost at 768kbps:        133                      
Cost at 384kbps:        266                   
Cost at 128kbps:        800      

NOTICE anything over FASTETHERNET has a cost of 1, so this is something we have to tweak in the config




               

Understanding the DR and BDR

 The DR and BDR are in charge of sending out router updates for when a network or the shared segment goes down, to stop this .... (each router every over router on the segment of the failure)


DR AND BDR is not per Area  or AS, its per shared segment! so looking at the below image you can see its possible just to have a DR and thats it! 




Notice with OSPF it uses x2 multicast addresses, 224.0.0.5 is used for OSPF hellos, whilst 224.0.0.6 is used just to send updates to the DR and BDR

Now with a Point-to-Point link, there is no DR and BDR, there is no need, so they communicate just on  224.0.0.5

Does it matter which router is DR and BDR ... on a shared segment, no .... not really, leaving it to chance is just fine as their is no requirment to dictate which one gets it (but setting the priority higher than the default 1 will win the election, 2nd to that if they are tied is the RID)

Where it does matter, is in say a FRAME-RELAY enviroment (becuase the DR will need full connectivity to all peers)



 
In these shared segment, only the DR and BDR are going to have the FULL state, all other neighbours will stay at the 2-WAY state.




The flurry of OSPF packet types


HelloForms neighbour relationships
 
DBD      
We can have routers exchange routing tables without the whole database being exchanged (like they are submitted the index of a book)

LSR
Master sends dbd first, once other router (slave) recieves dbd, it will respond with lsr's about networks it does not know about

LSU
Is the response back from the master to the lsr, which would update the other router with the information about that route

LSA
Are contained within the lsu (think of lsa inside the lsu envelope) its being more efficient rather than reply back to each network, it can reply back once (same with the LSR coming over in the first place, it will go inside the lsu)

LSACK
Is the reliablitiy mechanism for OSPF, OSPF is its own transport layer protocol (like tcp/udp etc, but it is its own) .... making OSPF a realiable protocol

OSPF Routing - Foundation Concepts 1


Link State Routing Protocols

Two Types:
IS-IS
OSPF


All other routing protocols are distance vector (yup even big bad Mr. Internet BGP)

Maintains 3 Tables (just like EIGRP, but with a difference)

NEIGHBOUR TABLE
tracks neighbours all neighbour it has relationships with and exchange routes with and directly connected to (ONLY FORMS NEIGHBOURS WITH ROUTERS IN SAME AREA ONLY)

TOPOLOGY TABLE

every link state protocol maintains this table, but this is a ROAD MAP for that AREA, so they see the whole layout (all links), all the routers in that router

EIGRP, does have this too, - but its not a roadmap of everything in the area, it is just a list of what the neighbour has past on ....."routing by rumour"

ROUTING TABLE

Best path


Uses Dijkstra's shortest path first (SPF) algorithm

Advantage
Each router knows everypath and knows the best path with that area (network added or removed, they all know about it)

Disadvantage

Can be an intense process (CPU) (so make sure the areas dont get too BIG) as each router has to make decisions on whole area


Sends triggered updates to announce network changes (unlike RIP sending whole routing table)


Sends periodic updates (LS refresh) on long intervals, this is the whole routing table to its neighbour if after 30 minutes there has been no activity (so pokes neighbour and says, just in case you missed it, this is what i see road map as)




OSPF AREA DESIGN AND TERMS



All areas must connect to area 0 (1 interface)

All routers in an area have the same topology table (convergence/load gets more the bigger the area)

Goal: localise updates within an area (Area 2 does not have to both the backbone etc or cross a slow WAN link)

Requires a hierarchical design (i.e Area 2 10.1.0.0, 10.2.0.0., area 3 has 172.16.0.0, 172.17.0.0. ....) as this is the whole pupose of an area (contiguous network/discontiguous network), keep updates local and this is achived by summarisation


All Areas are considered to be in the OSPF AS (divided by the ABR's,) whereas the ASBR is the AS Boundary Router ...Now these two types of routers are the only place you can do summarisation ...(unlike good ole EIGRP, where you can summarise on any interface on any router)


 
UNDERSTANDING OSPF NEIGHBOUR RELATIONSHIPS





RID
Only changes when you restart the OSPF process or reboot the router

dead timers are x4 the hello (if you take the hello message interval over NBMA network, the dead time is 2 minutes! ... these can be tweaked and should be tweaked, 2 minutes is WAY TO LONG!)



3. This Hello msg .... is considered the "DOWN STATE"

4. Upon recieving the HELLO; we enter the  "INIT STATE" - the routers haven't formed neighbourship as of yet, but it is checking..

5. Is the "2-WAY STATE"


6. We enter the "EXSTART STATE"- Exchange Start state, this means the HELLO packets agree, lets being exchanging our link state databases

7.  Is the "LOADING STATE" state



Which leads on to CONCEPTS PART II