Thursday, 3 May 2012

OSPF in a nutshell

Packet Types
=========
Hello
Database Description
Link State Request
Link State Update - 7 other Link State Advertisements
Link State Ack

Initial State
========
Router send hello packets
To achieve adjacency, need same hello interval, dead interval (4 hello intervals) and network types
DR/BDR election

For multiaccess networks or point to point network, need to elect DR and BDR and DROTHERs

This is to reduce the number of routing messages sent.

DR/BDR election
=============
Refer to priority (default = 1)
If same, refer to router-id
If unavailable, refer to highest loopback address
If unavailable, refer to highest active physical address

DROTHERs to DR/BDR - 224.0.0.6
DR to BDR/DROTHERs - 224.0.0.5

sh ip ospf neighbor - show neighbor table (unique)
sh ip ospf database - show topology table (same)
sh ip route - show routing table (unique)
sh ip protocols

For the new router id to take effect, use clear ip ospf process to restart the process
To make sure that router to come up as DR/BDR, switch them on first

Metrics
=====
Cost = 100,000,000 / Bandwidth

Use the default bandwidth (100 Mbps or 1.544 Mbps), can change via
1) bandwidth xxx (change bandwidth)
2) ip ospf cost xxx (change cost)