OSPF simulation

smashlizardsNetworking and Communications

Oct 29, 2013 (3 years and 9 months ago)

537 views

1


OSPF simulation

Objective

The purpose of this
project

is to demonstrate the behavior of OSPF routing protocol.


Overview

The objective
of this project
is to construct a

network and configure it with all the
necessa
ry parameters for OSPF routing then
analyze the behavior of the OSPF routing
protocol.


OSPF Description

The Open Shortest Path First (
OSPF
) protocol is an interior gateway protocol used

for
routing in Internet Protocol (
IP
) networks. As a link state routing protocol,
OSPF
is

more
robust
against network topology changes than distance vector protocols such as

RIP
.

OSPF
can be used to build large scale networks consisting of

hundreds or thousands of
routers.

OSPF

uses the
Dijkstra’s
algorithm to compute the shortest

path to a destination.
T
he algorithm calculates the shortest path to each destination based

on the cumulative
cost required to reach that destination. The cumulative cost is a

function of the cost of the
various interfaces needed to be traversed in order to reach that

destination
.


The cost (or
the metric) of an interface in
OSPF
is an indication of the overhead required

to send
packets across that interface. The cost of an interface is calculated based on the

bandwidth
.





F
eatures of OSPF

• Link State Based

• Runs directly over

I
nternet
P
rotocol (IP)

• Interior or border gateway protocol

• Multiple paths to each destination

which helps in

Load balancing.


First part of the project:


Search the Internet to understand
the OSPF routing algorithm in Ethernet networks.


Create the
network

1. Start OPNET and create a new project.
File


New…
and choose

Project.

2. Name the project
<initials>_OSPF
and the scenario
NoAreas
. Click
OK
.

3. Select
Create empty scenario
and click
next
.

4. Select
Office
and click
next
.

5. Set
X Span
to
200
a
nd
Y Span
to
200
. Click
next
.

6. Do not include any technologies and click
next
.

7. Review the values and click
OK
.

8. Open the
Object palette
and change the palette to
routers
.


2




9. Click
OK
.

10. Place
eight

slip8_gtwy’s
in the workspace.

11. Change the object palette to
internet_toolbox
.




12. Connect all the routers using
PPP_DS3
link.

13. Rename all the routers as in
the following figure
.
Right click
on each router and

select
Set Name
from the
popup

menu.




3


Configure router
interfaces
:

You

need to designate the interfaces of all routers that use the OSPF protocol. By default,

RIP is used on every router interface.

There are three ways to configure router interfaces
to use a particular set of routing

protocols
.
The easiest way

to designate routing protocols
is the
Configure Routing Protocols

operation from the
Protocols


IP

Routing
menu. This operation has advantage

of being able to configure multiple interfaces at the
same time.

1. Open the
Protocols

IP


Routing

Config
ure Routing Protocols…
menu.

2. Check the
OSPF
check box.




3. Select the
All interfaces
radio button
.

4. Save the project.


A
Routing Domain Legend
appears in the bottom left corner on the workspace. All links

should have a green
O
attached to it. This indicates that
OSPF routing protocol
is used

over that link.



4


Assign add
resses to the router interfaces:

1
-

The
Protocols


IP


Addressing


Auto
-
Assign IP Addresses
operation
assigns a

unique IP address to the connected IP interfaces

whose

IP address is
currently set to
auto

assigned.

This operation does not change the value of
manually set IP addresses.

Use the
Protocols

IP


Addressing


Auto
-
Assign IP Addresses.

The message
Assigns

IP addresses
appear in the status
bar.


2
-

Select
Router

A
and
Router

B
only


Select the
Protocols
menu


IP


Routing


Select
Export Routing Table for Selected Routers


Click
OK
on

the
Status Confirm
dialog box.



Configure routing cost
:

Cost
is specified on a per interface basis and is used as the
basis for the shortest path

route calculation.

In this
project
,
use different bandwidths on the links to set different
costs
.

1. Select the links
by shift clicking
between:

Router A


Router B

Router
A



Router C

Router B


Router C

2. Open the Configure
Interface Metric Information dialog

from

Protocols



IP



Routing


Configure Interface Metric Information.

3. Set the
link
Bandwidth value to
5
0,
000 kbps

where the actual cost is
calculated

as
follows:
Cost = Reference bandwidth / Link bandwidth


where the default value
of the reference bandwidth is
1
,
00
0
,
000 Kbps
.

4. Select
Interfaces across selected links
radio button. Click
OK
.



5. Select the links between

the following routers and set the
Bandwidth
value to
20
0,
000
kbps
:

Router
D



Router
A

Router
D



Router
F

Router
D


Router
E

Router
E



Router
C

Router E


Router
G

5



6. Select the links between

the following links and set the
Bandwidth
value to
1
0
0,
000
kbps
:

Router
F



Router
G

Router
F


Router
H

Router
H



Router
G



7
. Save the project.

The cost configuration looks as in
the following figure
:



Configure the traffic:

1. Select both
Router
A

and
Router
C

by shift clicking on them.

2. Open the
Create traffic demands
menu
. Protocols


IP


Demands

Create
Traffic Demands…

3. Select
From

Router
A

radio button.

4. Click
Create
.

5. Select both
Router
B

and
Router
H

by shift clicking on them.

6. Open the
Create traffic demands
menu
. Protocols


IP

Demands

Create
Traffic Demands…

7. Select
From Router
B

radio button.

8. Click
Create
.



The paths of the traffic demands are now visible. To hide them select
View


Demand

Objects


Hide All.




6


Configure Simulation

1. Open the
Configure Discrete Event Simulation
dialog


2. Set
duration
to
10 minutes
.

3. Click
OK
.

4. Save the project.







Duplicate the scenario

In the scenario just created all routers belong to the same level of hierarchy

which is only
one
area
. No
load balancing
where enforced for any routers. Two new scenarios will be

created to implement
areas
and
load balancing
.


Areas

scenario

The major addition in
OSPF
configuration, relative to other protocols, is that the
OSPF

routing domain can be divided into smaller segments called
areas
.
This reduces memory

and computational load on the routers
. Each area is numbered and there
must always be

an area
with number
zero

as

backbone
. All other areas attach to the
backbone
either

directly or via
virtual links
. An area should contain no more than about 50
-
100 routers

for optimum performance. A router that connects to more than one area

is called an
Area

Border Router (ABR)
.


1. Duplicate the scenario.
Scenarios



Duplicate scenario…

2.
Name
the
new
scenario
Areas
.


Partition the network into areas. This is a physical partitioning in the sense that an

interface can belong to only one
area. The distinct interfaces of the same router may
still

belong to separate areas.

3. Select the links between:

Router A


Router B

Router
A



Router C

Router B


Router C

by shift clicking on them.

4. Open the
OSPF Area Configuration
dialog.
Protocols


OSPF

Configure

Areas
.

5. Set the value
0.0.0.1

to
Area Identifier
.

6. Click
OK
.


Right
-
click on
RouterC


Edit Attributes


Expand the
OSPF Parameters

hierarchy


Expand the
Loopback Interfaces
hierarchy


Expand the
row0

hierarchy


Assign
0.0.0.1
to the value of the
Area ID
attribute


Click
OK
.


7


7. Select the links between:

Router
D



Router
A

Router
D



Router
F

Router
D

Router
E

Router
E



Router
C

Router E


Router
G

by shift clicking on them.

8. Open the
OSPF Area Configuration
dialog.
Protocols


OSPF


Configure

Areas
.

9. Set the value
0.0.0.0

to
Area Identifier
.

10. Click
OK
.



11. Select the links between:

Router
F



Router
G

Router
F


Router
H

Router
H


Router
G

by shift clicking on them.

12. Open the
OSPF Area Configuration
dialog.
Protocols


OSPF


Configure

Areas
.

13. Set the value
0.0.0.2

to
Area Identifier
.

14. Click
OK
.


15. Visualize the areas.
Protocols


OSPF


Visualize Areas…

16. Click
OK
in the pop
-
up dialog.

17. Save the project.

The areas are visualized in
different colors.

To visualize the areas we just created,
select the
Protocols
menu


OSPF


Visualize Areas


Click
OK
. The network
should look like the following one with

different colors assigned to each area (you
may get different colors though).


Balanced Scenario

Load balancing is a concept that allows a router to take advantage of multiple best paths

(routes) to a given destination. If two routes to the same destination have the same cost,

the traffic will be distributed half to each.


1. Go back to the
NoAreas
scenario.
Scenarios


Switch To Scenario

NoAreas
.

2. Duplicate the scenario.
Scenarios



Duplicate scenario…

3.
Name
the scenario
Balanced
.


4. Select both
Router B

and
Router H

by shit clicking on them.

5. Open the
Configure Load Balancing Option
dialog
Protocols



IP

Routing


Configure Load Balancing Option
.

6. Select
Packet based
in the roll
-
down menu.

8


7. Select the
Selected Routers
radio button.

8. Click
OK
.

9. Save the project.






Run the simulation

1. Open the
Manage Scenarios
dialog.
Scenarios


Manage Scenarios…

2. Click in the
Results
column on the
NoAreas
row and click the
collect
button.

3. Set the scenarios
Area and Balanced
to
collect results
. Repeat the previous step.

4. Click
OK
to run the s
imulation.

5. Click
Close
when the simulation has finished.



View the results

The No_Areas Scenario:


1. Go back to the
No_Areas
scenario.

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




RouterC


Go to the
Display
column and pick
Yes


Click
Close
.





9


3. The resulting route will appear on the network as shown:



4. Repeat step 2 to show the route for the traffic demand between
Router

B
and

Router

H
. The route is as shown below.






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:





10


The Balanced Scenario:

1. Go to scenario
Balanced
.

2. Display the route for the traffic demand between
Router

B
and
Router

H
. The

route is as shown:




3. Save your project.


Further Readings:

OPNET
OSPF

Model Description:

From the
Protocols
menu, select
OSPF


Model Usage Guide
.

















11


Project Report
:

For this Project,
print the network layout for all scenarios
. Please attach a short report which
includes the following:

1
)

Explain why the
Areas

and
Balanced
scenarios result in different routes than those observed
in the
NoAreas

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
each

co
lumn of each route.

Hints:

To check the content of the routing tables in RouterA for a scenario:

Go to the Results menu


Open Simulation Log


Expand the hierarchy on the left as
shown below


Click on the field COMMON ROUTE TABLE.


3
)

Create another scenario as a duplicate of the
NoAreas

scenario. Name the new scenario
No_Areas_Failure
. In this new scenario simulate a failure of the link connecting
Router
D

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
Router
B
.


(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.)

4
)

For both
NoAreas

and
No_Areas_Failure

scenario, collect the
Traffic Sent (bits/sec)
statistic (one of the
Global Statistics

under
OSPF
). Rerun the simulation for these two
scenarios
and obtain the graph that compares the OSPF’s
Traffic Sent (bits/sec)

in both
scenarios. Comment on the obtained graph.