opnet ) - sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · each...

30
داﻧﺸﻜﺪه ﻣﻬﻨﺪﺳﻲ ﻛﺎﻣﭙﻴﻮﺗﺮ ﭘﺮوژه دوم) ﻛﺎر ﺑﺎ ﻧﺮم اﻓﺰارOpnet ( درس ﺷﺒﻜﻪ ﻫﺎي ﻛﺎﻣﭙ ﻴﻮﺗﺮي1 ﻣﻬﻠﺖ ﺗﺤﻮﻳﻞ: ﺟﻤﻌﻪ5 / آﺑﺎن/ 1391 ﻫﺪف از اﻳﻦ ﭘﺮوژه، ﺑﺮاي اﺷﻨﺎﻳﻲ ﺑﺎ اﻣﻜﺎﻧﺎت اﭘﻨﺖ و ﭼﮕﻮﻧﮕﻲ ﺷﺒﻴﻪ ﺳﺎزي رﻓﺘﺎر ﻛﺎرﺑﺮان ﻣﻲ ﺑﺎﺷﺪ. ﺑﺮاي اﻳﻦ ﻣﻨﻈﻮر آزﻣﺎﻳﺶ اراﻳﻪ ﺷﺪه در اداﻣﻪ) ص2 ( را ﮔﺎم ﺑﻪ ﮔﺎم اﻧﺠﺎم دﻫﻴﺪ و ﮔﺰارش ﻣﺮﺑﻮط ﺑﻪ آن را ﺑﻪ آدرس<[email protected]> ارﺳﺎل ﻧﻤﺎﻳﻴﺪ. در اﻳﻦ راﺳﺘﺎ ﻣﻮارد زﻳﺮ را در ﻧﻈﺮ ﺑﮕﻴﺮﻳﺪ: ﺣﺠﻢ ﮔﺰارش ﻧﺒﺎﻳﺪ ﺑﻴﺸﺘﺮ از5 ﺻﻔﺤﻪ ﺑﺎﺷﺪ. ﻄﻮر ﻣﺨﺘﺼﺮ ﮔﺎم ﻫﺎي آ زﻣﺎﻳﺶ ﺑﺎﻳﺪ ﺗﻮﺿﻴﺢ داده ﺷﻮد) ﻫﺪف از آ زﻣﺎﻳﺶ ﺑﻪ ﻫﻤﺮاه ﺗﻮﺿﻴﺢ ﻧﺘﺎﻳﺞ ﮔﺮﻓﺘﻪ ﺷﺪه در ﺷﺒﻴﻪ ﺳﺎزي( . ﻣﺮاﺣﻞ ﺑﺎﻳﺪ ﺑﻪ ﺻﻮرت ﺗﻴﺘﺮ وار ﺗﻮﺿﻴﺢ داده ﺷﻮﻧﺪ. ﻋﻨﻮان اﻳﻤﻴﻞ ارﺳﺎﻟﻲEX2 ﺑﺎﺷﺪ. ﺑﻪ ازاي ﻫﺮ روز ﺗﺎﺧﻴﺮ30 در ﺻﺪ ﻧﻤﺮه ﻛﺴﺮ ﺧﻮاﻫﺪ ﺷﺪ. ﺣﻀﻮر در ﺳﺮ ﺟﻠﺴﺎت ﺣﻞ ﺗﻤﺮﻳﻦ اﺟﺒﺎري اﺳﺖ و ﺑﺨﺸﻲ از ﻧﻤﺮه ﺑﻪ اﻧﺠﺎم ﮔﺎم ﻫﺎي آ زﻣﺎﻳﺶ و ﺳﻮال و ﺟﻮاب در ﺳﺮ ﻛﻼس ﺗﻌﻠﻖ دار د. 1 http://ce.sharif.edu/courses/91-92/1/ce443-1/index.php

Upload: others

Post on 15-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

دانشكده مهندسي كامپيوتر

1يوتريهاي كامپدرس شبكه) Opnet كار با نرم افزار(پروژه دوم

1391/آبان/5جمعه:مهلت تحويل

براي اين منظور . براي اشنايي با امكانات اپنت و چگونگي شبيه سازي رفتار كاربران مي باشد هدف از اين پروژه،

به گام انجام دهيد و گزارش مربوط به آن را به را گام ) 2ص(آزمايش ارايه شده در ادامه

:در اين راستا موارد زير را در نظر بگيريد. ارسال نماييد <[email protected]>آدرس

.صفحه باشد 5 از حجم گزارش نبايد بيشتر •

گرفته زمايش به همراه توضيح نتايج آهدف از (زمايش بايد توضيح داده شود آهاي طور مختصر گامب •

.مراحل بايد به صورت تيتر وار توضيح داده شوند. )شده در شبيه سازي

.در صد نمره كسر خواهد شد 30به ازاي هر روز تاخير .باشد EX2عنوان ايميل ارسالي •

زمايش و سوال و آهاي بخشي از نمره به انجام گامو تمرين اجباري استحل حضور در سر جلسات •

.دجواب در سر كالس تعلق دار

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

Page 2: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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 model’s 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 model’s 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 model’s name attribute to Server1 and Server2.

21. Place an ethernet2_slip8_gtwyin the workspace.

22. Change the Router model’s 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 model’s 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 model’s 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.

Page 3: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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:

Page 4: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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

Page 5: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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

Page 6: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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

Page 7: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

6. Set “Name” to “HTTP Application”

Page 8: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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”

Page 9: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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

Page 10: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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

Page 11: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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”

Page 12: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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.

Page 13: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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:

Page 14: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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.

Page 15: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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.

Page 16: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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

Page 17: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET
Page 18: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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”

Page 19: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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”

Page 20: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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

Page 21: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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.

Page 22: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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.

Page 23: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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

Page 24: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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”

Page 25: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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”.

Page 26: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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.

Page 27: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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 doesn’t support the service.

b. The specified destination doesn’t exist.

The client and the server don’t 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”. Let’s verify it.

22. Double-click on “Tehran” subnet.

23. Right-click on “Server1” and edit its attributes

Page 28: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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”.

Page 29: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET

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.

Page 30: Opnet ) - Sharifce.sharif.edu/courses/91-92/1/ce443-1/resources/root... · 2015-04-06 · Each OPNET customer will connect to the OPNETWORK website and check his/her agenda. OPNET