opnet12个经典的例子-Lab07_OSPF.pdf

上传人:哈尼dd 文档编号:5116644 上传时间:2020-02-04 格式:PDF 页数:12 大小:332.64KB
返回 下载 相关 举报
opnet12个经典的例子-Lab07_OSPF.pdf_第1页
第1页 / 共12页
opnet12个经典的例子-Lab07_OSPF.pdf_第2页
第2页 / 共12页
opnet12个经典的例子-Lab07_OSPF.pdf_第3页
第3页 / 共12页
opnet12个经典的例子-Lab07_OSPF.pdf_第4页
第4页 / 共12页
opnet12个经典的例子-Lab07_OSPF.pdf_第5页
第5页 / 共12页
亲,该文档总共12页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《opnet12个经典的例子-Lab07_OSPF.pdf》由会员分享,可在线阅读,更多相关《opnet12个经典的例子-Lab07_OSPF.pdf(12页珍藏版)》请在三一文库上搜索。

1、 Laboratory 7 OSPF: Open Shortest Path First A Routing Protocol Based on the Link-State Algorithm Objective 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 exampl

2、e 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 behi

3、nd 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 give

4、n 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 theoryDijkstras shortest-path algorithm. OSPF introduces another layer of hierarchy into routing by allowing a do

5、main to be partitioned into areas. This means that a router within a domain does not necessarily need to know how to reach every network within that domainit may be sufficient for it to know how to get to the right area. Thus, there is a reduction in the amount of information that must be transmitte

6、d to and stored in each node. In addition, OSPF allows multiple routes to the same destination to be assigned the same cost and will cause traffic to be distributed evenly over those routers. In this lab, you will set up a network that utilizes OSPF as its routing protocol. You will analyze the rout

7、ing tables generated in the routers and will observe how the resulting routes are affected by assigning areas and enabling load balancing. 2 Procedure Create a New Project 1. Start OPNET IT Guru Academic Edition Choose New from the File menu. 2. Select Project and click OK Name the project _OSPF, an

8、d 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 OK. Create and Configure the Network Initialize the Network: 1. The Object Palet

9、te dialog box should now be on top of your project workspace. If it is not there, open it by clicking . Select the routers item from the pull-down menu on the object palette. a. Add to the project workspace eight routers of type slip8_gtwy. To add an object from a palette, click its icon in the obje

10、ct palette Move your mouse to the workspace and click to place the object You can keep on left-clicking to create additional objects. Right-click when you are finished placing the last object. 2. Switch the palette configuration so it contains the internet_toolbox. Use bidirectional PPP_DS3 links to

11、 connect the routers. Rename the routers as shown below. 3. Close the Object Palette and then save your project. The slip8_gtwy node model represents an IP- based gateway supporting up to eight serial line interfaces at a selectable data rate. The RIP or OSPF protocols may be used to automatically a

12、nd dynamically create the gateways routing tables and select routes in an adaptive manner. The PPP_DS3 link has a data rate of 44.736 Mbps. 3 Configure the Link Costs: 1. We need to assign link costs to match the following graph: 2. Like many popular commercial routers, OPNET router models support a

13、 parameter called a reference bandwidth to calculate the actual cost, as follows: Cost = (Reference bandwidth) / (Link bandwidth) where the default value of the reference bandwidth is 1,000,000 Kbps. 3. For example, to assign a cost of 5 to a link, assign a bandwidth of 200,000 Kbps to that link. No

14、te that this is not the actual bandwidth of the link in the sense of transmission speed, but merely a parameter used to configure link costs. 4. To assign the costs to the links of our network, do the following: i. Select all links in your network that correspond to the links with a cost of 5 in the

15、 above graph by shift-clicking on them. ii. Select the Protocols menu IP Routing Configure Interface Metric Information. iii. Assign 200000 to the Bandwidth (Kbps) field Check the Interfaces across selected links radio button, as shown Click OK. 5. Repeat step 4 for all links with a cost of 10 but a

16、ssign 100,000 Kbps to the Bandwidth (Kbps) field. 6. Repeat step 4 for all links with a cost of 20 but assign 50,000 Kbps to the Bandwidth (Kbps) field. 7. Save your project. A CB D E F HG 5 20 20 205 5 5 5 10 10 10 4 Configure the Traffic Demands: 1. Select both RouterA and RouterC by shift-clickin

17、g on them. i. Select the Protocols menu IP Demands Create Traffic Demands Check the From RouterA radio button as shown Keep the color as blue Click Create. Now you should see a blue-dotted line representing the traffic demand between RouterA and RouterC. 2. Select both RouterB and RouterH by shift-c

18、licking on them. i. Select the Protocols menu IP Demands Create Traffic Demands Check the From RouterB radio button Change the color to red Click OK Click Create. Now you can see the lines representing the traffic demands as shown. 3. To hide these lines: Select the View menu Select Demand Objects S

19、elect Hide All. 4. Save your project. 5 Configure the Routing Protocol and Addresses: 1. 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 a

20、nd RouterB only Select the Protocols menu IP Routing Select Export Routing Table for Selected Routers Click OK on the Status Confirm dialog box. 5. Select the Protocols menu IP Addressing Select Auto-Assign IP Addresses. 6. Save your project. Configure the Simulation Here we need to configure some o

21、f the simulation parameters: 1. Click on and the Configure Simulation window should appear. 2. Set the duration to be 10.0 minutes. 3. Click OK and then save your project. Auto-Assign IP Addresses assigns a unique IP address to connected IP interfaces whose IP address is currently set to auto- assig

22、ned. It does not change the value of manually set IP addresses. 6 Duplicate the Scenario In the network we just created, all routers belong to one level of hierarchy (i.e., one area). Also, we didnt enforce load balancing for any routes. Two new scenarios will be created. The first new scenario will

23、 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. The Areas Scenario: 1. Select Duplicate Scenario from the Scenarios menu and give it the name Areas Click OK. 2. Area 0.0.0.1: i. Select

24、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. ii. Right-click on RouterC Edit Attributes Expand the OSPF Parameters hierarchy Expand the Loopback

25、 Interfaces hierarchy Expand the row0 hierarchy Assign 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

26、 the value 0.0.0.2 to their Area Identifier. Loopback interface allows a client and a server on the same host to communicate with each other using TCP/IP. 7 4. To visualize the areas we just created, select the Protocols menu OSPF Visualize Areas Click OK. The network should look like the following

27、one with different colors assigned to each area (you may get different colors though). Note: - The area you did not configure is the backbone area and its Area Identifier = 0.0.0.0. - The figure shows the links with a thickness of 3. The Balanced Scenario: 1. Under the Scenarios menu, Switch to Scen

28、ario Select No_Areas. 2. Select Duplicate Scenario from the Scenarios menu, and give it the name Balanced Click OK. 3. In the new scenario, select both RouterB and RouterH by shift-clicking on them. 4. Select the Protocols menu IP Routing Configure Load Balancing Options Make sure that the option is

29、 Packet-Based and the radio button Selected Routers is selected as shown Click OK. 5. Save your project. OPNET provides two types of IP load balancing: With Destination Based, load balancing is done on a per- destination basis. The route chosen from the source router to the destination network is th

30、e same for all packets. With Packet Based, load balancing is done on a per-packet basis. The route chosen from the source router to the destination network is redetermined for every individual packet. 8 Run the Simulation To run the simulation for the three scenarios simultaneously: 1. Go to the Sce

31、narios menu Select Manage Scenarios. 2. Click on the row of each scenario and click the Collect Results button. This should change the values under the Results column to as shown. 3. Click OK to run the three simulations. Depending on the speed of your processor, this may take several seconds to com

32、plete. 4. After the three simulation runs complete, one for each scenario, click Close and then save your project. 9 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 D

33、emands Display Routes for Configured Demands Expand the hierarchies as shown and select RouterA ? RouterC Go to the Display column and pick Yes Click Close. 3. The resulting route will appear on the network as shown: 4. Repeat step 2 to show the route for the traffic demand between RouterB and Route

34、rH. 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). 10 The Areas Scenario: 1. Go to scenario Areas. 2. Display the route for the traffic demand b

35、etween RouterA and RouterC. The route is as shown: 3. Save your project. The Balanced Scenario: 1. Go to scenario Balanced. 2. Display the route for the traffic demand between RouterB and RouterH. The route is as shown: 3. Save your project. 11 Further Readings OPNET OSPF Model Description: From the

36、 Protocols menu, select OSPF Model Usage Guide. OSPF: IETF RFC number 2328 (www.ietf.org/rfc.html). 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 th

37、e 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 Address

38、ing 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) OPNET allows you to examine the link-state database that is

39、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 r

40、outing 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 Processes) to Once at End of Simulation. - You will need to set the global attribute IP Interface Addressing Mo

41、de 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 Resu

42、lts menu). The link-state database is available in Classes OSPF LSDB_Export. 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 afte

43、r 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 updat the routing table if there is any change in the network.) 12

44、 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 OSPFs Traffic Sent (bits/sec) in both scenarios. Comment on the obtaine

45、d 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.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程管理


经营许可证编号:宁ICP备18001539号-1