Académique Documents
Professionnel Documents
Culture Documents
OSPF OVERVIEW
Introduction
The Open Short Path First (OSPF) is defined in RFC 2328.It is
an interior Gateway Protocol used to distribute routing information within a
single Autonomous system. It is a most common routing protocol using by
Service Providers, because unlike EIGRP it is an Open Standard protocol.
Why we are calling OSPF is a link state routing protocol.
Unlike RIP, OSPF is not only sending the Routing updates to its neighbors.
It is sending all the information about the link like IP address of the Interface
and subnet mask, the type of network it is connected to (P2P or P2Multi-
point or FR) and the routers which is connected to it. The collection of these
link states will form a Link state Database.
OSPF Vs RIP
RIP
RIP has limited HOP counts. It is 16.A RIP Network spans more than 15
HOPS, considered as unreachable.
RIP doesn’t support for VLSM.
Periodic update of routing table consumes lots of bandwidth especially on
WAN clouds.
RIP Converges slower than OSPF does.
RIP Network is a FLAT network. Here no concept of Areas & Boundaries &
Summarization.
OSPF
Types of Tables
Area design and Terminology
Understanding the OSPF neighbor relationships
Types of Tables
There are three types of tables used in OSPF.
Neighbor Table
Topology Table
Routing Table
Neighbor Table
The router tracks all the neighbors which is running OSPF as a routing
protocol and put that information in this table. It contains all the information
about the directly connected neighbors. Like their router ID, to which
network they are connected, and which network they are advertising. It will
exchange routing information with routers which is in this table.
Topology Table
This is the one of the big difference between Distance vector and link-
state protocols. Distance vector protocol doesn’t have this topology table.
They only know about the directly connected neighbors. This table is a road
map for each and every single network which is available in a particular
area. All the routers in a particular area will be having the same type of
topology table.
Routing Table
This table contains all the best routes to reach a particular network.
Based on the topology table it will be having multiple paths for a single
destination network. It will run the SPF algorithm to find the best routes for
each and every network.
The algorithm places each router at the root of a tree and calculates
the shortest path to each destination based on the cumulative cost required to
reach that destination. Each router will have its own view of the topology
even though all the routers will build a shortest path tree using the same
link-state database.
Types of Areas
There are five types of areas are there in OSPF, which is listed below
Normal area
Stub area
Totally stub area
No so stubby area
Backbone area
If we split those 100 routers into 2 areas, say Area 1 & Area 2 and
each area contains 50 routers. And both the areas are connected to Area 0.In
this scenario Area 1 doesn’t care any change happens in Area 2.If any link in
Area 2 goes down that will be localized within Area 2.Only those which are
in Area 2 need to run SPF to find the alternative path. Area 1 doesn’t care,
even doesn’t know about that link failure, which occurs in Area 2. So the
OSPF converges quickly. It is more processor efficient.
Two routers will not become neighbors unless they agree on the
following
To discover the neighbor, OSPF will send hello packets via the OSPF
enabled interface. This hello packet contains the following information.
Router ID
Hello and Dead timers
Network Mask
Area ID
Router priority
DR & BDR IP address
Router ID:
Adjacencies:
The adjacency building process takes effect after multiple stages have
been fulfilled. Routers that become adjacent will have the exact link-state
database. The following is a brief summary of the states an interface passes
through before becoming adjacent to another router:
Down: Hello packets have been sent the router is waiting to hear the
response from the routers to which it sent hello packets.
Attempt: This state indicates that no recent information has been
received from the neighbor. An effort should be made to contact the
neighbor by sending Hello packets at the reduced rate Poll Interval.
Init: The interface has detected a Hello packet coming from a
neighbor but bi-directional communication has not yet been established. It
means the router needs to acknowledge.
Two-way: There is bi-directional communication with a neighbor.
The router has seen its router id in the Hello packets coming from a
neighbor. With this info the router will know that whether it is a new
neighbor or reply from an old neighbor.
At the end of this stage the DR and BDR election would be done. At
the end of the 2way stage, routers will decide whether we can build an
adjacency or not. The decision is based on DR& BDR and the type of
network with which is connected to.
Exstart: Now routers are trying to establish the initial sequence
number that is going to be used in the information exchange packets. The
sequence number is used to get the most recent information.
Exchange: Routers will send their whole link-state database by
sending database description packets (DBD).In this stage router won’t send
its entire database to its neighbors. It will send only notes of the routing
table.
Loading: At this state, Routers have built a link-state request list and
a link-state retransmission list. Based on the DBD, if any information that
looks incomplete will be put on the request list. Any update that is sent will
be put on the retransmission list until it gets acknowledged.
Full: At this state, the adjacency is complete. The neighboring routers
are fully adjacent. Adjacent routers will have a similar link-state database.
After sharing the link-state database the OSPF will start to calculate
the best path for each and every network. This is the time to run the SPF
algorithm. Once it finds the best path to each and every network, it will put
those routes into its Routing table. Till the link which is in routing table goes
down, OSPF will never run SPF.
Summary