# Iowa State University Department of Electrical and Computer Engineering CprE 489: Computer Networking and Data Communication Lab Experiment #10 Simulation of Routing Protocols using OPNET

Δίκτυα και Επικοινωνίες

29 Οκτ 2013 (πριν από 4 χρόνια και 8 μήνες)

96 εμφανίσεις

1
Iowa State University
Department of Electrical and Computer Engineering
CprE 489: Computer Networking and Data Communication
Lab Experiment #10
Simulation of Routing Protocols using OPNET

Objective
Experiment with routing protocols and collect associated metrics using OPNET.
Pre-Lab
Review the lecture notes on RIP and OSPF routing protocols.
Lab Expectations
Work through the lab and let the TA know if you have any questions. After the lab, write up a lab report
with your partner. Be sure to

1) summarize what you learned in a few paragraphs
2) complete the exercise
3) specify the effort levels of each group member (totaling to 100%)
4) submit your lab report with a lab feedback form

Turn in your lab report during the CprE 489 final exam on Wednesday, May 2.
Problem Description
Routing is the process of finding an optimal multi-hop path to a certain destination. The optimality of the
path is determined by the cost definition used in the routing algorithm, for example, RIP uses hop-count
as the routing metric and so the optimal path between two nodes in a network that runs RIP is the one
with the least number of hops. Another example is the OSPF routing protocol, where the cost definition
can vary; it can represent link bandwidth (1/bandwidth), delay, reliability (1/BER) or even a combination of
them – Figure 1 below clarifies the idea, where the numbers on the links represent link costs.

Figure 1 – RIP and OSPF routes for a network with given link costs

2

In this lab you will:

1) Create a small network and fill the routing tables manually to see the difficulties that the network
administrator will endure if there were no dynamic routing protocols.
2) Duplicate the scenario and reconfigure the network to use RIP as the routing protocol. Determine
the routing tables using simulation.
3) Duplicate the scenario and reconfigure the network to use OSPF as the routing protocol.
Determine the routing tables using simulation.
4) Apply what you have learned in an exercise to determine the routing tables for a familiar network,
using RIP and OSPF as the routing protocols.
Procedure
Use OPNET to model Network 1 (see Figure 2).

Figure 2 – Network 1 to demonstrate static, RIP, and OSPF routing

Create a new project, set the name to grp#_routing_lab, e.g., grp10_routing_lab, and the scenario name
to static_routing. Use the wizard to complete the creation process: Empty Scenario, Campus, 10 Km x 10
Km and select the following technologies to be added to the object palette:

• Cisco
• ethernet

When you build this scenario, use the Cisco 2511 model for routers, ethernet_wkstn to represent users,
and ethernet_server for the server. The links between routers and users/server are of type 100BaseT,

The server you setup in the procedure will act as a Web server, and the users will be running the Heavy
Web Browsing application. This means you will need to add an Application Configuration and a Profile

3
Configuration to your scenarios, like you did in Lab 2. When you create the Profile, you will need to
specify the application as Heave Web Browsing, and assign this Profile to all the users. Additionally, the
server should support all services.
NOTE: When assigning IP addresses, you must be cognizant of the interface information. Hold your
mouse over the link you wish to assign IP addresses on, and notice the interface (port)
information for the connected routers. Assign IP addresses to those particular interfaces.

In other words, this means each router interface is defined with an IP address.

Work through this section carefully, and double-check your work.

The Cisco 2511 routers have 19 interfaces, one of them is an Ethernet interface (IF0) and the rest are
serial interfaces. To configure the IP address and link cost on any node:

• Right-click on the node and select Edit Attributes.
• Choose IP  IP Routing Parameters  Interface Information on routers or IP  IP Host
Parameters  Interface Information on workstations and the server.
• To configure the IP address of a router’s interface, expand the corresponding row. Workstations
and servers have only one interface.
Static Routing
Configure Routing Tables
When using static routing, it is the network administrator’s responsibility to keep monitoring and
reconfiguring the network accordingly.

Configure the static routing tables for the routers in Network 1 based on Table 1 (note that this routing
table is not complete, and it provides only enough routes to make the scenario operate correctly):

Table 1 – Static routing tables for Network 1
R1 routing table Destination Subnet Mask Next Hop
192.0.6.1 255.255.255.0 192.0.4.1
192.0.2.1 255.255.255.0 192.0.3.1
R2 routing table Destination Subnet Mask Next Hop
192.0.6.1 255.255.255.0 192.0.5.1
192.0.1.1 255.255.255.0 192.0.3.2
R3 routing table Destination Subnet Mask Next Hop
192.0.1.1 255.255.255.0 192.0.4.2
192.0.2.1 255.255.255.0 192.0.5.2

To configure the routing table on a router:

• Right-click on a router and select Edit Attributes
• Choose IP  IP Routing Parameters  Static Routing Table, and then add rows to the table
as required. Each table entry should specify a destination address, a subnet mask, and a next
hop (note that the next hop can be a port address on the same router or a port address on the
next hop router).

4
Routing Protocol Configuration
Configure the network to use static routing. Note that you will use this procedure later to setup the
network with RIP and OSPF.

• Select ALL of the nodes in the network
• From the Protocols menu choose Protocols  IP  Routing  Configure Routing Protocols.
See Figure 3.

Figure 3 – Routing Protocol Configuration

• In the dialog box select the desired routing protocol, or select None in the case of static routing.
Uncheck the Apply selection to subinterfaces. In the Apply the above selection to section,
make sure that you choose Interfaces across selected links. Finally, make sure Visualize
routing domains is checked.

Your network should look similar to Figure 4:

5

Figure 4 – Network 1 configured with static routing tables

Right-click on the server and select Choose Individual DES Statistics and choose Node Statistics 
TCP Connection  Load (bytes/sec). We are not interested in the load, but using this statistic allows
us to see all the connections made to the server from workstations. Run the simulation to verify your
network is operating (connections are made to the server from the workstations).

What happens if the link from R2 to R3 would fail? Disable the link between R2 and R3: right-click on the
link and select Advanced Edit Attributes  set condition to disabled and run the simulation again –
can you see connections from User 2 to the server? To allow User 2 to access the server, you need to
reconfigure the routing table on R2 so that the new path from User 2 to the server is: User 2  R2  R1
 R3  server. Do this and run the simulation again to verify your solution.

6
RIP Routing
Create a new scenario by duplicating the static_routing scenario, and name the new scenario RIP_routing.
Remove the static routing tables you created on the three routers by deleting the rows found at Edit
Attributes  IP  IP Routing Parameters  Static Routing Table (set rows to 0). Make sure any

Reconfigure Network 1 to use the RIP routing protocol. See the section on Routing Protocol
Configuration and Figure 3. Your network should look similar to Figure 5:

Figure 5 – Network 1 configured with RIP

In order to make sure the network is operating properly we need to view the routing tables.
View Routing Tables
The dynamically configured routing tables can be found using the following steps:

• Choose Protocols  IP  Routing  Export Routing Tables  All nodes  OK
• Run the simulation
• Choose Protocols  IP  Configuration Reports  Generate All
• View the simulation results, and choose Discrete Event Tables  Object Tables

You should now be presented with the RIP routing tables for each router. You will use this same
procedure later to determine the OSPF routing tables.

7
OSPF Routing
Duplicate the RIP_routing scenario and name the new scenario OSPF_routing. Reconfigure the network
to use OSPF the same way you configured it to use RIP. Your network should look similar to Figure 6:

Figure 6 – Network 1 configured with OSPF
Since OSPF relies on link costs to determine routing paths, follow these steps to set the link costs in your
OSPF scenario:

• Choose Protocols  OSPF  Configure Interface Cost. See Figure 7.
• Select Set the interface cost explicitly to option, and enter the link cost
• Select the Selected links button

Figure 7 – OSPF Interface Cost Configuration

Run the simulation to determine the routing tables.

8
Exercise

R1
R3
R4
R6
R2
R5
2
3
5
2
1
3
4
2
1
192.0.1.10/24
192.0.2.2/24
192.0.3.3/24
192.0.3.13/24
192.0.2.12/24
192.0.4.4/24
192.0.4.14/24
192.0.1.11/24
192.0.5.5/24
192.0.5.15/24
192.0.6.6/24
192.0.6.16/24
192.0.8.18/24192.0.8.8/24
192.0.7.7/24
192.0.7.17/24192.0.9.9/24
192.0.9.19/24
Network 2

Figure 8 – Network 2

Network 2 is given in Figure 8. This network models the network given in the textbook on page 523.
Configure this network in OPNET, using what you have learned above, with the RIP and OSPF routing
protocols. No users/servers are needed, and the routers and links are the same type as used in modeling
Network 1. The link costs only need to be specified for OSPF, since RIP uses hop-count as the routing
metric.

1) Provide the routing table for R4 (screenshot or printout of web report) using
a. RIP
b. OSPF
2) What are the differences between the RIP and OSPF routing tables for R4? Why?