You are on page 1of 30

) (Opnet

:/51391/

.
) (2
> <arezoo.rajabi.sharif@gmail.com . :
5 .
)
( . .
EX2 . 30 .

.

http://ce.sharif.edu/courses/91-92/1/ce443-1/index.php

Building Network
1. Begin by starting up Modeler and create a new project. Select File -> New and clickOK
2. Name the new project EX2and the scenario Base, thenclick OK.
3. To create an empty scenario for the Initial Topology click next when prompted bythe
Startup Wizard.
4. Next you can specify a map to use as a background for your network. Click ChooseFrom
Maps for Network Scale and click Next.
5. Choose Asiafrom the list and click Next.
6. Finally review your settings and click OK to finish the Startup Wizard.The workspace
now shows the specified map and object palette.
7. Place subnets over Tehran, Shiraz and Tabriz
8. Double-click on the Tabriz Subnet.
9. Place two1000BaseT_LANs in the workspace.
10. Change the LAN models name attribute to LAN1 and Lan2.
11. Right-click on the LAN1and choose the Edit Attribute menu item.
12. Change the Number of Workstations attribute to 25, then click OK
13. Right-click on the LAN2and choose the Edit Attribute menu item.
14. Change the Number of Workstations attribute to 50, then click OK
15. Place an ethernet2_slip8_gtwyin the workspace.
16. Change the Router models name attribute to TabrizRouter
17. Draw 1000BaseXlinks from Lansto TabrizRouter
18. Go to Tehran subnet.
19. Place two erhernet_nt_serverin the workspace
20. Change the Server models name attribute to Server1 and Server2.
21. Place an ethernet2_slip8_gtwyin the workspace.
22. Change the Router models name attribute to TehranRouter.
23. Draw 1000BaseXlinks from Serversto TehranRouter.
24. Go to Shiraz subnet.
25. Place an erhernet128_switchin the workspace
26. Change the Hub models name attribute to Hub.
27. Place eighterhernet_wkstn sin the workspace
28. Draw 100BaseTlinks from work stationsto hub
29. Place an ethernet2_slip8_gtwy in the workspace.
30. Change the Router models name attribute to ShirazRouter.
31. Draw 1000BaseXlinks from Hubto ShirazRouter.

32. Draw a PPP OC3link from Tabrizto Tehran.


33. Next a Select Nodes dialog box appears asking which nodes in each subnet are to
beendpoints of the link.
34. For node a, choose the TabrizRouternode.
35. For node b, choose the TehranRouternode.
36. Click OK to establish the link
37. Draw a PPP OC3link from Shirazto Tehran.

38. Next a Select Nodes dialog box appears asking which nodes in each subnet are to be
endpoints of the link.
39. For node a, choose the ShirazRouternode.
40. For node b, choose the TehranRouternode.
41. Click OK to establish the link

HTTP Application Configuration Lab

Objectives
The objective is to follow the application configuration workflow in order to:

Deploy an HTTP application

Run a simulation and get response time statistics

We will follow the following workflow:

1) Configure applications
2) Define profiles
3) Configure servers
4) Deploy profiles
5) Run simulation and view results
OPNET customers and OPNET staff have the characteristics described in the graphs above.
OPNET customers and OPNET staff will use interface caf machines from 8:00am to 8:00pm
during breaks. A break will occur every two hours (between sessions) and will last 15 to 20min.
This will repeat everyday for 5 days.

8am

Each OPNET customer will connect to the OPNETWORK website and check his/her agenda.
OPNET employees also check their OPNETWORK assignments located in the server2. A user
will stay at a station for 2 to 5 minutes.

1. Go to Scenarios / Duplicate Scenario menu to duplicate the Base scenario.

2. Name it HTTP_application_deployment.

Configure applications
You will create the HTTP Application application that will be used by the iCafe User
Profile. An iCafe user will stay at an iCafe station from 2 to 5 minutes. This application will
download a webpage of a certain format following a uniform distribution between 120 seconds
and 300 seconds.

1. Open applications object palette from the toolbar

2. Drag and drop the Application Config object in your network.


3. Edit the attributes of the Application Config object
4. Edit the attribute Application Definitions

5. Create one row

6. Set Name to HTTP Application

7. Edit the attribute Description.

8. Edit the attribute Http.

9. Set the Page Interarrival Time (secs) to: uniform (120, 300)

10. Edit the attributes Page properties

11. Create 3 rows for the following parameters:


Html page: uniform_int (40000, 60000)
Exponential (5) medium images
Exponential (3) large images

12. Click OK in all dialog boxes


Define profiles
You will create one user profile called iCafe User Profile
An Http Application is roughly used from 8:00am to 8:00pm by multiple customers during
breaks (15 to 20min every two hours) everyday for 5 days. Each customer will connect to the
OPNETWORK website and check his/her agenda. OPNET employees also check their
OPNETWORK agenda, but it is located on a different web server.
1. Open applications object palette from the toolbar

2. Drag and drop the Profile Config object into your network
3. Edit attributes of the Profile Config object
4. Edit the attribute Profile Configuration

5. Create one row

6. Set the Profile Name to Profile1


7. Set Start Time to uniform (100, 110) seconds
8. Set Duration to Constant (43200) seconds (for a working day of 12 hours)

9. Edit attribute Repeatability


a. Set Inter-repetition time to Constant (43200) seconds (from 8:00pm to 8:00am,
nobody uses the internet caf)
b. Set attribute Number of Repetitions to Constant (4) (OPNETWORK lasts 5 days)

c. Click OK to close the Repeatability dialog box


10. Edit attribute Applications
a. Create one row
b. Set Application to HTTP Application
c. Set Start Time Offset to No Offset
d. Set Duration to uniform (900, 1200) (a break lasts 15 to 20 min)

e. Edit attribute Repeatability

i. Set Inter-repetition time to Constant (7200) seconds (a break every 2


hours)
ii. Set attribute Number of Repetitions to Constant (4) (4 breaks per day).

iii. Click on OK to close Repeatability dialog box.


f. Click on OK to close dialog boxes
Configure servers

1. Enter the Tehran subnet by double-clicking on it.

2. Edit the attribute of the Server1 server node.

3. Set supported services to support HTTP Application application

4. Set server address to Server1 Address

5. Edit the attributes of Server2 server node and set the following attributes
a. Set supported services to support HTTP Application application
b. Set server address to Server2 Address

Deploy profiles

You want to set the profile 1 profile on all the machines. You will also set the application
destination to map the symbolic server name HTTP Server to the actual server name. The staff
Tabriz connects to the server1 whereas the Shiraz connects to the server2.
you will simply need to configure the profile on one machine ,and then apply changes to all other
machines. Steps are:

1. Go up one level to the main network subnet.

2. Enter the Tabriz subnet by double-clicking on it


3. Edit the attributes of LAN1 and LAN2 node.
4. Edit Application: Supported Profile attribute and Set profile1 to support. Set Number of
clients to Entire LAN too.

5. Click OK to close the Application: Supported Profiles dialog box


6. Edit Application: Destination Preferences
a. Set Symbolic Serve Name to HTTP Server

b. Edit Actual Name subattribute


c. Set Name subattribute to Server1 address. Leave Selection Weight to default value.

d. Click OK to close Actual Name dialog box


e. Click OK to close Application: Destination Preferences dialog box. WARNING: DO
NOT CLOSE ALL OF THE DIALOG BOXES.

7. Click OK.
Shiraz machines
1. Select all node0 to node07
2. Edit the attributes of work station nodes.
3. Edit Application: Supported Profiles attribute and set Profile Name subattribute to
Profile1.
4. Edit Application: Destination Preferences
a. Set Symbolic Serve Name to HTTP Server
b. Edit Actual Name subattribute
c. Set Name subattribute to Server2. Leave Selection Weight to default value.
d. Click OK: to close dialog boxes.

Simulation
You will choose statistics to collect and run the simulation for 5 days of simulation time. You are
interested in the following results:
-

Client HTTP response time

Client traffic sent

Client traffic received

1. Go to DES main menu and select Choose Individual Statistics.

2. Go to Global Statistics and select the HTTP statistic

3. Go to Node Statistics and select the Client HTTP statistic group:

4. Go to DES main menu and select Configure/Run Discrete Event Simulation

5. Set the Duration to 5 days.

6. Click on Run.
7. At the end of the simulation, go to DES menu and choose Results / View Statistics menu.

8. Go to Global Statistics
9. Select Page Response Time global statistic under HTTP statistic group. Note that you
can see the periods of activity and rest in the graph for each day.
10. Select Average statistic filter and click on Show

11. Observe results:


a. What is the global response time, on average = _______
12. Select Page Response Time node statistic for the staff lounge in OPNETWORK->Reagan
Center under Client HTTP group

13. Select Average statistic filter and click on Show

14. Observe results:


a. What is the response time for the staff lounge, in average = _______

Conclusion
We successfully deployed and simulated a web application of the OPNETWORK Internet cafe
and measured the response time.
End of Lab

Troubleshooting Lab
Overview
You want to troubleshoot the scenario that we built during lab1. You will figure out what the
problem is and fix it.

Objectives
The objective of the lab is to troubleshoot lab1 in which we made two configuration mistakes
while doing the lab. You will run a simulation first to notice the problem, fix the two
configuration errors and run the simulation again.

Instructions

Open scenario
1. Go to Scenarios / Duplicate Scenario menu to duplicate the Base scenario.

2. Name it troubleshooting.

3. Double-click on Tehran subnet.


4. Right-click on Server1 and edit its attributes
5. Set application supported to NONE.

Running a simulation to see the problem


You will choose statistics to collect and run the simulation for 5 days of simulation time. You are
interested in the following results:
-

Client traffic sent

Client traffic received

6. Go to DES main menu and select Choose Individual Statistics.


7. Go to Node Statistics and select the Client HTTP statistic group:

8. Go to DES main menu and select Configure/Run Discrete Event Simulation

9. Note that we run the simulation for 5 days and click on Run.

10. Wait for the simulation to finish.


11. At the end of the simulation, double-click on Tabriz subnet to enter the subnet.
12. Right-click on LAN1 and select View Results.

13. Open Client Http and select Download Pages


14. Click on Show.

15. Note that no pages were downloaded


16. Close the statistic panel.
17. Click on Close to close the dialog box.

Troubleshooting the application configuration


18. Go to DES->Open DES Log menu to open the simulation log.

19. Look at the 2th log, which seems to repeat many times. This also seems to be a configuration
problem: a client was not able to connect to the server. There are multiples possible
reasons
a. The specified destination doesnt support the service.
b. The specified destination doesnt exist.
The client and the server dont use the same transport protocol.
20. Clock on Close to close the log.

Fixing the profile configuration


First, you will fix the profile duration problem. Then, you will look at the issue with the
unreachable destination.
21. Go up one level to view the config objects.

Fixing the service configuration


We want to check the possible caused of the second log. The log suggested that the destination
might not support the service HTTP Application. Lets verify it.
22. Double-click on Tehran subnet.
23. Right-click on Server1 and edit its attributes

24. Check the value of the attribute Applications: Supported Services => It is set to None!

25. Edit the attributes of Application: Supported Services


26. Add one row and set it to HTTP Application.

27. Click on OK to close all dialog boxes.

Running a simulation to verify the solution


28. Repeat steps in Running a simulation to see the problem paragraph.
Note that you are seeing traffic going to/from subnets now. You fixed the problems!

Conclusion
We troubleshoot a scenario by looking at the simulation log. We successfully fixed two problems
that resulted in unexpected application traffic.

You might also like