OSPF: Open Shortest Path First: A Routing Protocol Based On The Link-State Algorithm
OSPF: Open Shortest Path First: A Routing Protocol Based On The Link-State Algorithm
OSPF: Open Shortest Path First: A Routing Protocol Based On The Link-State Algorithm
Laboratory
The objective of this lab is to configure and analyze the performance of the Open Shortest
Path First (OSPF) routing protocol.
Overview
In Lab 6 we discussed RIP, which is the canonical example of a routing protocol built on
the distance-vector algorithm. Each node constructs a vector containing the distances
(costs) to all other nodes and distributes that vector to its immediate neighbors. Link-state
routing is the second major class of intra-domain routing protocol. The basic idea behind
link-state protocols is very simple: Every node knows how to reach its directly connected
neighbors, and if we make sure that the totality of this knowledge is disseminated to every
node, then every node will have enough knowledge of the network to build a complete
map of the network.
Once a given node has a complete map for the topology of the network, it is able to decide
the best route to each destination. Calculating those routes is based on a well-known
algorithm from graph theory—Dijkstra’s shortest-path algorithm.
In this lab, you will set up a network that utilizes OSPF as its routing protocol. You will
analyze the routing tables generated in the routers and will observe how the resulting
routes are affected by assigning areas and enabling load balancing.
Procedure
1. Start Riverbed Modeler Academic Edition ⇒ Choose New from the File menu.
2. Select Project and click OK ⇒ Name the project <your initials>_OSPF, and the
scenario No_Areas ⇒ Click OK.
3. In the Startup Wizard: Initial Topology dialog box, make sure that Create Empty
Scenario is selected ⇒ Click Next ⇒ Select Campus from the Network Scale
list ⇒ Click Next three times ⇒ Click Finish.
2
Configure the Link Costs:
5 5
A D F
5
20 5 5 10
B C E G H
3
Configure the Traffic Demands:
3. To show these lines: Select the View menu ⇒ Select Demands ⇒ Select
Show All.
Now you can see the lines representing the traffic demands as shown.
4. To hide these lines: Select the View menu ⇒ Select Demand Objects ⇒ Select
Hide All.
1. Click somewhere in the project workspace to disable the selected routers and
then select the Protocols menu ⇒ IP ⇒ Routing ⇒ Configure Routing
Protocols.
2. Check the OSPF check box ⇒ Uncheck the RIP check box ⇒ Uncheck the
Visualize Routing Domains check box, as shown:
3. Click OK.
4. Select RouterA and RouterB only ⇒ Select the Protocols menu ⇒ IP ⇒
Routing ⇒ Select Export Routing Table… ⇒ Click Selected nodes on the
Auto-Assign IP Export Routing… dialog box ⇒ Click OK on the Status… dialog box.
Addresses assigns a
unique IP address to
connected IP interfaces
whose IP address is 5. Click somewhere in the project workspace to disable the selected routers and
currently set to auto- select the Protocols menu ⇒ IP ⇒ Addressing ⇒ Select Auto-Assign IP
assigned. It does not
change the value of Addresses... ⇒ Click OK on the Auto-Assign IP Addresses dialog box.
manually set IP
addresses. 6. Save your project.
5
Duplicate the Scenario
In the network we just created, all routers belong to one level of hierarchy (i.e., one area).
Also, we didn’t enforce load balancing for any routes. Two new scenarios will be created.
The first new scenario will define two new areas in addition to the backbone area. The
second one will be configured to balance the load for the traffic demands between
RouterB and RouterH.
1. Select Duplicate Scenario from the Scenarios menu and give it the name
Areas ⇒ Click OK.
2. Area 0.0.0.1:
i. Select the three links that connect RouterA, RouterB, and RouterC by shift-
clicking on them ⇒ Select the Protocols menu ⇒ OSPF ⇒ Configure Areas ⇒
Assign the value 0.0.0.1 to the Area Identifier, as shown ⇒ Click OK.
Loopback interface ii. Right-click on RouterC ⇒ Edit Attributes ⇒ Expand the IP Routing
allows a client and a Parameters hierarchy ⇒ Expand the OSPFv3 Parameters hierarchy ⇒
server on the same host
to communicate with
Expand the Loopback Interfaces hierarchy ⇒ Set Number of Rows value to
each other using 1 ⇒ Expand the row hierarchy ⇒ Set Status value to Enabled ⇒ Assign
TCP/IP. 0.0.0.1 to the value of the Area ID attribute ⇒ Click OK.
3. Area 0.0.0.2:
i. Click somewhere in the project workspace to disable the selected links and then
repeat step 2-i for the three links that connect RouterF, RouterG, and RouterH
but assign the value 0.0.0.2 to their Area Identifier.
6
Note:
- The area you did not configure is the backbone area and its Area
Identifier = 0.0.0.0.
7
View the Results
2. To display the route for the traffic demand between RouterA and RouterC:
Select the Protocols menu ⇒ IP ⇒ Demands ⇒ Display Routes for
Configured Demands ⇒ Expand the hierarchies as shown and select RouterA
and then RouterC ⇒ Go to the Display column and pick Yes ⇒ Click Close.
4. Repeat step 2 to show the route for the traffic demand between RouterB and
RouterH. The route is as shown below. (Note: Depending on the order in which
you created the network topology, the other “equal-cost” path can be used, that is,
the RouterB-RouterA-RouterD-RouterF-RouterH path).
8
The Areas Scenario:
1. Go to scenario Areas.
2. Display the route for the traffic demand between RouterA and RouterC. The
route is as shown:
1. Go to scenario Balanced.
2. Display the route for the traffic demand between RouterB and RouterH. The
route is as shown:
10
10
Further Readings
Questions
1) Explain why the Areas and Balanced scenarios result in different routes than
those observed in the No_Areas scenario, for the same pair of routers.
2) Using the simulation log, examine the generated routing table in RouterA for
each of the three scenarios. Explain the values assigned to the Metric column of
each route.
Hints:
- Refer to the View Results section in Lab 6 for information about
examining the routing tables. You will need to set the global attribute IP
Interface Addressing Mode to the value Auto Addressed/Export and
rerun the simulation.
- To determine the IP address information for all interfaces, you need to
open the Generic Data File that contains the IP addresses and
associated with the scenarios.
3) Modeler allows you to examine the link-state database that is used by each router
to build the directed graph of the network. Examine this database for RouterA in
the No_Areas scenario. Show how RouterA utilizes this database to create a
map for the topology of the network and draw this map (This is the map that will
be used later by the router to create its routing table.)
Hints:
- To export the link-state database of a router, Edit the attributes of the
router and set the Link State Database Export parameter (one of the
OSPF Parameters, under Reports) to Once at End of Simulation.
- You will need to set the global attribute IP Interface Addressing Mode
to the value Auto Addressed/Export. This will allow you to check the
automatically assigned IP addresses to the interfaces of the network.
(Refer to the notes of question 2 above.)
- After rerunning the simulation, you can check the link-state database by
opening the simulation log (from the Results menu). The link-state
database is available in View Results ⇒ DES Run Tables.
4) Create another scenario as a duplicate of the No_Areas scenario. Name the new
scenario Q4_No_Areas_Failure. In this new scenario simulate a failure of the
link connecting RouterD and RotuerE. Have this failure start after 100 seconds.
Rerun the simulation. Show how that link failure affects the content of the link-
state database and routing table of RouterA. (You will need to disable the global
attribute OSPF Sim Efficiency. This will allow OSPF to update the routing table
if there is any change in the network.)
11
11
5) For both No_Areas and Q4_No_Areas_Failure scenario, collect the Traffic
Sent (bits/sec) statistic (one of the Global Statistics under OSPF). Rerun the
simulation for those two scenarios and obtain the graph that compares the
OSPF’s Traffic Sent (bits/sec) in both scenarios. Comment on the obtained
graph.
Lab Report
Prepare a report that follows the guidelines explained in Lab 0. The report should include
the answers to the above questions as well as the graphs you generated from the
simulation scenarios. Discuss the results you obtained and compare these results with
your expectations. Mention any anomalies or unexplained behaviors.
12
12