Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


Closed Thread
  Search this Thread
Old 02-25-2011, 12:06 AM   #1
LQ Newbie
Registered: Feb 2011
Posts: 3

Rep: Reputation: 0
OSPF Simulation Tutorial for Beginners (Interactive, Visual)

OSPF Simulation Tutorial for Beginners (Interactive, Visual)

OSPF is a complex protocol. To help beginners grasp abstract its concepts, a different approach is taken -- Visualizing OSPF simulation. This tutorial, OSPF basic, simulates the basic OSPF activities on a simple topology: H1-R1-R2-H2. R1 and R2 are routers. H1 and H2 are hosts. This simulation shows 4 stages:
1) R1 and R2 are not running OSPF. H1 ping H2. It fails.
2) Start OSPF on two routers. R1 and R2 discover each other as neighbors by flooding Hello.
3) R1 and R2 develop Full relationship and synchronize their LSA (Link State Advertisement) database by sending DD, Request, and Update. R1 and R2 refresh their routing tables. H1 and H2 become reachable.
4) H1 pings H2 again. It succeeds this time.
Q1. What is OSPF?
Answer: OSPF is a link state routing protocol. OSPF routers exchange their Link State Advertisement (OSPF LSA) to learn interface IP addresses from each other. Each router saves its LSAs in its Link State Database (LSDB.) Neighboring nodes synchronize their LSDBs. With consistent LSDBs, OSPF routers are able to calculate shortest paths to reach destinations.
Q2. What does OSPF do?
Answer: Roughly, OSPF is going through the following stages:
1) OSPF node creates a Router LSA to describe its interface IP addresses. This LSA is the most basic LSA.
2) Routers discover neighbors by flooding Hello. When a pair find each other, they are in 2-way state.
3) Neighbors synchronize their LSDBs in three steps:
i. Send DD to get LSDB catalog from each other.
ii. Send Request to ask for missing LSAs.
iii. Send Update to transmit LSAs requested.
When two neighbors have the same LSDB, they are in Full Adjacency state.
4) With the same LSDB, routers have consistent knowledge of the network topology and interface IP addresses. They can calculate routing paths independently and update their routing tables. The collection of routing tables from OSPF routers provides the shortest paths between destinations.
Q3. What is Router LSA?
Answer: Each OSPF router creates a Router LSA to describe its interfaces' IP addresses. In a very simple OSPF network, only Router LSAs are needed to calculate shortest paths.
Q4. What does Router LSA do?
Answer: In a simple OSPF network (no LAN, no area), neighboring nodes exchange their Router LSAs and learn how many links its neighbor has, and their interface IP addresses. After neighbor propagation, all OSPF nodes have the same set of Router LSAs in their LSDBs. Now they have the same knowledge of network topology.
Q5. How can a router use LSDB to calculate routing paths?
Answer: From LSDB, an OSPF node learns the complete topology of the network: the number of routers being connected; Individual router's interfaces and their IP addresses; Interface link costs (OSPF metric). With such detail information, OSPF calculates shortest paths to reach all destinations found in LSDB.
For example [a], in the OSPF simulation, R1's LSDB contains two Router LSAs:
1) R1 originated LSA contains two IP addresses:,
2) R2 originated LSA contains two IP addresses:,
After LSDB synchronization, R1 and R2 both have these two LSAs. And they know that R1 and R2 are connected by the link Now R1 can calculate routing path to reach remote destination and adds an entry (, S1/0) to its routing table.
Note [a]: This article is the FAQ of OSPF simulation. After reading, you can play the interactive simulation listed in External Links. It visualize OSPF work flow with moving packets are changing tables.
External links for interactive OSPF simulations:
1. OSPF simulation for beginners (This article):
2. List of additional interactive OSPF simulation (Table of Content):
Old 02-25-2011, 05:08 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Support in Ubuntu 10.04 - Screencast and Tutorial for Beginners LXer Syndicated Linux News 0 04-11-2010 06:30 PM
LXer: Tutorial: Understanding OSPF Routing (part 2) LXer Syndicated Linux News 0 10-30-2008 05:40 AM
LXer: Tutorial: OSPF Routing Protocol: Popular and Robust LXer Syndicated Linux News 0 10-22-2008 11:00 PM
Realtime interactive graphing of a simulation sydney-troz Programming 2 12-19-2007 01:02 PM
LXer: Debian Networking Tutorial for Beginners and advanced users LXer Syndicated Linux News 0 12-14-2006 05:54 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration