December 8, 2013

ATM: A Connection-Oriented, Cell-Switching Technology

The objective of this lab is to examine the effect of ATM adaptation layers and service classes on the performance of the network.

 

Overview

Asynchronous Transfer Mode (ATM) is a connection-oriented, packet-switched technology. The packets that are switched in an ATM network are of a fixed length, 53 bytes, and are called cells. The cell size has a particular effect on carrying voice traffic effectively. The ATM Adaptation Layer (AAL) sits between ATM and the variable-length packet protocols that might use ATM, such as IP. The AAL header contains the information needed by the destination to reassemble the individual cells back into the original message. Because ATM was designed to support all sorts of services, including voice, video, and data, it was felt that different services would have different AAL needs. AAL1 and AAL2 were designed to support applications, like voice, that require guaranteed bit rates. AAL3/4 and AAL5 provide support for packet data running over ATM.

ATM provides QoS capabilities through its five service classes: CBR, VBR-rt, VBR-nrt, ABR, and UBR. With CBR (constant bit rate), sources transmit stream traffic at a fixed rate. CBR is well-suited for voice traffic that usually requires circuit switching. Therefore, CBR is very important to telephone companies. UBR, unspecified bit rate, is ATM’s best-effort service. There is one small difference between UBR and the best-effort model. Because ATM always requires a signaling phase before data is sent, UBR allows the source to specify a maximum rate at which it will send. Switches may make use of this information to decide whether to admit or reject the new VC (virtual circuit).

In this lab you will set up an ATM network that carries three applications: Voice, Email, and FTP. You will study how the choice of the adaptation layer as well as the service classes can affect the performance of the applications.

 

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 <your initials>_ATM, and the scenario CBR_UBR ⇒ Click OK.

3. In the Startup Wizard: Initial Topology dialog box, make sure that Create Empty Scenario is selected Click Next Select Choose From Maps from the Network Scale list Click Next Choose USA from the maps Click Next From the Select Technologies list, include the atm_advanced Model Family as shown in the following figure⇒ Click Next ⇒ Click OK.

clip_image004

Create and Configure the Network

Initialize the Network:

1. The Object Palette dialog box should now be on the top of your project workspace. If it is not there, open it by clicking clip_image006. Make sure that atm_advanced is selected from the pull-down menu on the object palette.

2. Add to the project work space the following objects from the palette: Application Config, Profile Config, two atm8_crossconn_adv switches, and a subnet.

a. To add an object from a palette, click its icon in the object palette ⇒ Move your mouse to the workspace and click to place the object ⇒ Right-click to get out of “object creation mode.”

3. Close the Object Palette dialog box and rename (right-click on the node ⇒ Set Name) the objects you added as shown and then save your project:

PCM stands for Pulse Code Modulation. It is a procedure used to digitize speech before transmitting it over the network.

Configure the Applications:

clip_image008

  1. Right-click on the Applications node ⇒ Edit Attributes ⇒ Expand the Application Definitions attribute and set rows to 3 Name the rows: FTP,

EMAIL, and VOICE.

i. Go to the FTP row ⇒ Expand the Description hierarchy ⇒ Assign High Load to FTP.

ii. Go to the EMAIL row ⇒ Expand the Description hierarchy ⇒ Assign High Load to Email.

iii. Go to the VOICE row ⇒ Expand the Description hierarchy ⇒ Assign PCM Quality Speech to Voice.

clip_image010

2. Click OK and then save your project.

Configure the Profiles:

  1. Right-click on the Profiles node ⇒ Edit Attributes ⇒ Expand the Profile Configuration attribute and set rows to 3.

i. Name and set the attributes of row 0 as shown:

clip_image012

ii. Name and set the attributes of row 1 as shown:

clip_image014

iii. Name and set the attributes of row 2 as shown. (Note: To set the Duration to exponential(60), you will need to assign “Not Used” to the “Special Value”)

⇒ Close the Object Palette dialog box.

clip_image016

Configure the NorthEast Subnet:

  1. Double-click on the NorthEast subnet node. You get an empty workspace, indicating that the subnet contains no objects.
  1. Open the object palette clip_image006[1] and make sure that atm_advanced is selected from the pull-down menu on the object palette..
  1. Add the following items to the subnet workspace: one atm8_crossconn_adv switch, one atm_uni_server_adv, four atm_uni_client_adv, and connect them with bidirectional atm_adv links ⇒ Close the palette ⇒ Rename the objects as shown.

clip_image018

Hint: To edit the attributes of multiple nodes in a single operation, select all nodes simultaneously using shift and left-click; then Edit Attributes of one of the nodes, and select Apply Changes to Selected Objects.

Client Address is the Transport Adaptation Layer (TPAL) address of the node. This value must be unique for each node.

The TPAL model suite presents a basic, uniform interface between applications and transport layer models. All interactions with a remote application through TPAL are organized into sessions. A session is a single conversation between two applications through a transport protocol.

The queue configuration specifies a one-to-one mapping between output port queues and the QoS that they support. A specific queue may be configured to support a specific QoS.

4. Change the data rate attribute for all links to DS1.

5. For both NE_Voice1 and NE_Voice2, set the following attributes:

i. Set ATM Application Parameters to CBR only.

ii. Expand the ATM Parameters hierarchy ⇒ Set Queue Configuration to

CBR only.

iii. Expand the Application: Supported Profiles hierarchy ⇒ Set rows to 1 ⇒ Expand the row 0 hierarchy ⇒ Set Profile Name to VOICE_P.

iv. Application: Supported Services Edit its value Set rows to 1 Set

Name of the added row to VOICE Click OK.

v. Expand the Application: Transport Protocol hierarchy ⇒ Voice Transport = AAL2.

6. For NE_Voice1, select Edit Attributes ⇒ Edit the value of the Client Address attribute and write down NE_Voice1.

7. For NE_Voice2, select Edit Attributes ⇒ Edit the value of the Client Address attribute and write down NE_Voice2.

8. Configure the NE_DataServer as follows:

i. Application: Supported Services Edit its value Set rows to 2 Set

Name of the added rows to: EMAIL and FTP Click OK.

ii. Expand the Application: Transport Protocol Specification hierarchy ⇒ Voice Transport = AAL2.

iii. Edit the value of the Server Address attribute and write down

NE_DataServer.

9. For both NE_Data1 and NE_Data2, set the following attributes:

i. Expand the ATM Parameters hierarchy ⇒ Set Queue Configuration to

UBR.

ii. Expand the Application: Supported Profiles hierarchy ⇒ Set rows to 2 ⇒ Set Profile Name to FTP_P (for row 0) and to EMAIL_P (for row 1).

10. For NE_Data1, select Edit Attributes ⇒ Edit the value of the Client Address attribute and write down NE_Data1.

11. For NE_Data2, select Edit Attributes ⇒ Edit the value of the Client Address attribute and write down NE_Data2.

12. Save your project.

Add Remaining Subnets:

  1. Now you completed the configuration of the NorthEast subnet. To go back to the project space, click the Go to the higher level clip_image020 button.

The subnets of the other regions should be similar to the NorthEast one except for the names and client addresses.

  1. Make three copies of the subnet we just created.
  1. Rename (right-click on the node ⇒ Set Name) the subnets and connect them to the switches with bidirectional atm_adv links as shown. (Note: You will be asked to pick the node inside the subnet to be connected to the link. Make sure to choose the “switch” inside each subnet to be connected.)

clip_image022

  1. Change the data rate for all links to DS1.

5. Select and double-click each of the new subnets (total four subnets) and change the names, client address, and server address of the nodes inside these subnets as appropriate (e.g., replace NE with SW for the SouthWest subnet).

Hint: To do step 6, you can right-click on any voice station and choose

Edit Similar Nodes. This brings up a table in which each node occupies one row and attributes are shown in the columns.

Follow the same procedure with similar steps in this lab.

6. For all voice stations in all subnets (total of eight stations), edit the value of the

Application: Destination Preferences attribute as follows:

i. Set rows to 1 ⇒ Set Symbolic Name to Voice Destination ⇒ Click on (…) under the Actual Name column ⇒ Set rows to 6 ⇒ For each row choose a voice station that is not in the current subnet. The following figure shows the actual names for one of the voice stations in the NorthEast subnet:

clip_image024

7. For all data stations in all subnets (total of eight stations), configure the

Application: Destination Preferences attribute as follows:

i. Set rows to 2 ⇒ Set Symbolic Name to FTP Server for the one row and Email Server for the other row For each symbolic name (i.e., FTP Server and Email Server), click on (…) under the Actual Name column ⇒ Set rows to 3 ⇒ For each row choose a data server that is not in the current subnet. The following figure shows the actual names for one of the data stations in the NorthEast subnet:

clip_image026

Hint: To do step 8 in a single operation, you can use the right-click menu on any switch to Select Similar Nodes; then Edit Attributes, and check Apply Changes to Selected Objects. This feature does work, even across objects in different subnets.

Max_Avail_BW is the maximum bandwidth allocated to this queue. Calls will be admitted into this queue only if they are within the maximum available bandwidth requirement.

8. For all switches in the network (total of six switches), configure the Max_Avail_BW of the CBR queue to be 100%, as shown below, and the

Min_Guaran_BW to be 20%.

clip_image028

9. Save your project.

Choose the Statistics

To test the performance of the applications defined in the network, we will collect one of the many available statistics as follows:

1. Right-click anywhere in the project workspace and select Choose Individual Statistics from the pop-up menu.

2. In the Choose Results dialog box, choose the following statistics:

clip_image030

3. Click OK.

Configure the Simulation

Here we need to configure the duration of the simulation:

1. Click on the Configure/Run Simulation button: clip_image032.

2. Set the duration to be 10.0 minutes.

3. Click OK. We will be running the simulation later.

Duplicate the Scenario

In the network we just created, we used the CBR service class for the Voice application and the UBR service class for the FTP and Email applications. To analyze the effect of such different classes of services, we will create another scenario that is similar to the CBR_UBR scenario we just created but it uses only one class of service, UBR, for all applications. In addition, to test the effect of the ATM adaptation layer, in the new scenario we will use AAL5 for the Voice application rather than AAL2.

1. Select Duplicate Scenario from the Scenarios menu and give it the name

UBR_UBR Click OK.

2. For all voice stations in all subnets, reconfigure them as follows. (Check the note below for a faster way to carry out this step.)

i. Set ATM Application Parameters to UBR only.

ii. ATM Parameters Set Queue Configuration to UBR.

iii. Application: Transport Protocol Set Voice Transport to AAL5.

3. Save your project.

Note: One easy way to carry out step 2 above is through the network browser as follows:

- Select Show Network Browser from the View menu.

- Select Nodes from the drop-down menu, and check the Only Selected check box as shown in the following figure.

- Write voice in the find field and click Enter.

- In the network browser you should see a list of all voice stations selected.

- Right-click on any of the voice stations in the list, select Edit Attributes, and check Apply Changes to Selected Objects.

- Carry out the configuration changes in step 2 above.

- To hide the network browser, deselect Show Network Browser from the View menu.

clip_image034

Run the Simulation

To run the simulation for both scenarios simultaneously:

1. Go to the Scenarios menu ⇒ Select Manage Scenarios.

2. Change the values under the Results column to <collect> (or <recollect>) for both scenarios. Compare to the following figure.

clip_image036

3. Click OK to run the two simulations. Depending on the speed of your processor, this may take several minutes to complete.

4. After the two simulation runs complete, one for each scenario, click Close.

5. Save your project.

View the Results

To view and analyze the results:

1. Select Compare Results from the Results menu.

2. Change the drop-down menu in the right-lower part of the Compare Results dialog box from As Is to time_average as shown.

clip_image038

3. Select the voice Packet Delay Variation statistic and click Show. The resulting graph should resemble the one below. (Note: Result may vary slightly due to different node placement.)

clip_image040

 

December 2, 2013

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 example 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 behind 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 given 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 theory—Dijkstra’s shortest-path algorithm.
OSPF introduces another layer of hierarchy into routing by allowing a domain 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 domain—it 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 transmitted 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 routing tables generated in the routers and will observe how the resulting routes are affected by assigning areas and enabling load balancing.
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 <your initials>_OSPF, and 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
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 and dynamically create the gateway's routing tables and select routes in an adaptive manner.
The PPP_DS3 link has a data rate of 44.736 Mbps.
Initialize the Network:
  1. The Object Palette dialog box should now be on top of your project workspace. If it is not there, open it by clicking clip_image004. 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 object 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.
  1. Switch the palette configuration so it contains the internet_toolbox. Use bidirectional PPP_DS3 links to connect the routers. Rename the routers as shown below.
  1. Close the Object Palette and then save your project.
clip_image006

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 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. Note 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.
  1. 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 above graph by shift-clicking on them.
ii. Select the Protocols menu ⇒ IPRoutingConfigure Interface Metric Information.
iii. Assign 200000 to the Bandwidth (Kbps) field ⇒ Check the Interfaces across selected links radio button, as shown Click OK. 

clip_image010

  1. Repeat step 4 for all links with a cost of 10 but assign 100,000 Kbps to the
Bandwidth (Kbps) field.
  1. Repeat step 4 for all links with a cost of 20 but assign 50,000 Kbps to the
Bandwidth (Kbps) field.
  1. Save your project.
Configure the Traffic Demands:
  1. Select both RouterA and RouterC by shift-clicking on them.
i. Select the Protocols menu ⇒ IPDemandsCreate 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.


clip_image012

2. Select both RouterB and RouterH by shift-clicking on them.
i. Select the Protocols menu ⇒ IPDemandsCreate 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.

clip_image014

3. To hide these lines: Select the View menu ⇒ Select Demand Objects ⇒ Select
Hide All.
  1. Save your project.
Configure the Routing Protocol and Addresses:
Auto-Assign IP Addresses assigns a unique IP address to connected IP interfaces whose IP address is currently set to auto-assigned. It does not change the value of manually set IP addresses.
1. Select the Protocols menu ⇒ IPRoutingConfigure Routing Protocols.
2. Check the OSPF check box ⇒ Uncheck the RIP check box ⇒ Uncheck the
Visualize Routing Domains check box, as shown:


clip_image016

3. Click OK.
4. Select RouterA and RouterB only ⇒ Select the Protocols menu ⇒ IPRouting Select Export Routing Table for Selected Routers Click OK on
the Status Confirm dialog box.
5. Select the Protocols menu ⇒ IPAddressing ⇒ Select Auto-Assign IP Addresses.
6. Save your project.
Configure the Simulation
Here we need to configure some of the simulation parameters:
1. Click on clip_image018 and the Configure Simulation window should appear.
2. Set the duration to be 10.0 minutes.
3. Click OK and then save your project.
Duplicate the Scenario
In the network we just created, all routers belong to one level of hierarchy (i.e., one area). Also, we didn’t enforce load balancing for any routes. Two new scenarios will be created. The first new scenario will 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:

Loopback interface allows a client and a server on the same host to communicate with each other using TCP/IP.
1. Select Duplicate Scenario from the Scenarios menu and give it the name
Areas Click OK.
2. Area 0.0.0.1:
i. Select the three links that connect RouterA, RouterB, and RouterC by shift-clicking on them ⇒ Select the Protocols menu ⇒ OSPFConfigure Areas ⇒ Assign the value 0.0.0.1 to the Area Identifier, as shown ⇒ Click OK.

clip_image020

ii. Right-click on RouterCEdit 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.
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 the value 0.0.0.2 to their Area Identifier.

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 the 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.
4. To visualize the areas we just created, select the Protocols menu ⇒ OSPFVisualize Areas Click OK. The network should look like the following 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.


clip_image022
The Balanced Scenario:
  1. Under the Scenarios menu, Switch to Scenario ⇒ Select No_Areas.
  1. 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.
  1. Select the Protocols menu ⇒ IPRoutingConfigure Load Balancing Options Make sure that the option is Packet-Based and the radio button Selected Routers is selected as shown Click OK.
clip_image024

5. Save your project.
Run the Simulation
To run the simulation for the three scenarios simultaneously:
1. Go to the Scenarios 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 <collect> as shown.

clip_image026

3. Click OK to run the three simulations. Depending on the speed of your processor, this may take several seconds to complete.
4. After the three simulation runs complete, one for each scenario, click Close and then save your project.
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 ⇒ IPDemandsDisplay Routes for Configured Demands Expand the hierarchies as shown and select RouterA Æ RouterC ⇒ Go to the Display column and pick Yes ⇒ Click Close.

clip_image028

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

clip_image030

4. Repeat step 2 to show the route for the traffic demand between RouterB and RouterH. 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).
clip_image032

The Areas Scenario:
  1. Go to scenario Areas.
  1. Display the route for the traffic demand between RouterA and RouterC. The route is as shown:
clip_image034

3. Save your project.
The Balanced Scenario:
  1. Go to scenario Balanced.
  1. Display the route for the traffic demand between RouterB and RouterH. The route is as shown:
clip_image036

3. Save your project.

December 1, 2013

RIP: Routing Information Protocol


A Routing Protocol Based on the Distance-Vector Algorithm
Objective
The objective of this lab is to configure and analyze the performance of the Routing Information Protocol (RIP) model.
Overview
A router in the network needs to be able to look at a packet’s destination address and then determine which of the output ports is the best choice to get the packet to that address. The router makes this decision by consulting a forwarding table. The fundamental problem of routing is: How do routers acquire the information in their forwarding tables?
Routing algorithms are required to build the routing tables and hence forwarding tables. The basic problem of routing is to find the lowest-cost path between any two nodes, where the cost of a path equals the sum of the costs of all the edges that make up the path. Routing is achieved in most practical networks by running routing protocols among the nodes. The protocols provide a distributed, dynamic way to solve the problem of finding the lowest-cost path in the presence of link and node failures and changing edge costs.
One of the main classes of routing algorithms is 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. RIP is the canonical example of a routing protocol built on the distance-vector algorithm. Routers running RIP send their advertisements regularly (e.g., every 30 seconds). A router also sends an update message whenever a triggered update from another router causes it to change its routing table.
In this lab you will set up a network that utilizes RIP as its routing protocol. You will analyze the routing tables generated in the routers, and you will observe how RIP is affected by link failures.
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 <your initials>_RIP, and the scenario NO_Failure ⇒ 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
The ethernet4_slip8_ gtwy node model represents an IP-based gateway supporting four Ethernet hub interfaces and eight serial line interfaces. IP packets arriving on any interface are routed to the appropriate output interface based on their destination IP address. The Routing Information Protocol (RIP) or the Open Shortest Path First (OSPF) protocol may be used to dynamically and automatically create the gateway's routing tables and select routes in an adaptive manner.
Initialize the Network:
  1. The Object Palette dialog box should now be on top of your project workspace. If it is not there, open it by clicking clip_image004. Make sure that the internet_toolbox is selected from the pull-down menu on the object palette.
  1. Add to the project workspace the following objects from the palette: one ethernet4_slip8_gtwy router and two 100BaseT_LAN objects.
a. To add an object from a palette, click its icon in the object palette ⇒ Move your mouse to the workspace ⇒ Click to place the object ⇒ Right-click to stop creating objects of that type.
  1. Use bidirectional 100BaseT links to connect the objects you just added as in the following figure. Also, rename the objects as shown (right-click on the node ⇒ Set Name).
  1. Close the Object Palette dialog box.
  1. Save your project.
clip_image006
Configure the Router:
  1. Right-click on Router1Edit Attributes ⇒ Expand the IP Routing Parameters hierarchy and set the following:
i. Routing Table Export = Once at End of Simulation. This asks the router to export its routing table at the end of the simulation to the simulation log.
  1. Click OK and then save your project.
Add the Remaining LANs:
The PPP_DS3 link has a data rate of 44.736 Mbps.
1. Highlight or select simultaneously (using shift and left-click) all five objects that you currently have in the project workspace (one router, two LANs, and two links). You can click-and-drag a box around the objects to do this.
2. Press Ctrl+C to copy the selected objects and then press Ctrl+V to paste them.
3. Repeat step 2 three times to generate three new copies of the objects and arrange them in a way similar to the following figure. Rename all objects as shown.
4. Connect routers, as shown, using PPP_DS3 links.
clip_image008

Choose the Statistics
RIP traffic is the total amount of RIP update traffic (in bits) sent/received per second by all the nodes using RIP as the routing protocol in the IP interfaces in the node.
Total Number of Updates is the number of times the routing table at this node gets updated (e.g., due to a new route addition, an existing route deletion, and/or a next hop update).
To test the performance of the RIP protocol, we will collect the following statistics:
  1. Right-click anywhere in the project workspace and select Choose Individual Statistics from the pop-up menu.
  1. In the Choose Results dialog box, check the following statistics:
    1. Global Statistics RIP Traffic Sent (bits/sec).
    1. Global Statistics RIP Traffic Received (bits/sec).
    1. Nodes Statistics Route Table Total Number of Updates.
  1. Click OK and then save your project.
Configure the Simulation
Auto Addressed means that all IP interfaces are assigned IP addresses automatically during simulation. The class of address (e.g., A, B, or C) is determined based on the number of hosts in the designed network. Subnet masks assigned to these interfaces are the default subnet masks for that class.
Export causes the auto-assigned IP interface to be exported to a file (name of the file is <net_name>-ip_addresses.gdf and gets saved in the primary model directory).
Here we need to configure some of the simulation parameters:
1. Click on clip_image010 and the Configure Simulation window should appear.
2. Set the duration to be 10.0 minutes.
3. Click on the Global Attributes tab and change the following attributes:
a. IP Dynamic Routing Protocol = RIP. This sets the RIP protocol to be the routing protocol of all routers in the network.
b. IP Interface Addressing Mode = Auto Addressed/Export.
c. RIP Sim Efficiency = Disabled. If this attribute is enabled, RIP will stop after the "RIP Stop Time." But we need the RIP to keep updating the routing table in case there is any change in the network (as we will see in the second scenario).
4. Click OK and then save the project.
clip_image012

Duplicate the Scenario
In the network we just created, the routers will build their routing tables, and then they will not need to update them further because we didn’t simulate any node or link failures. In this scenario we will simulate failures so that we can compare the behavior of the routers in both cases.
1. Select Duplicate Scenario from the Scenarios menu and name it Failure
Click OK.
2. Open Object Palette by clicking clip_image004[1]. Select the Utilities palette from the drop-down menu.
4
3. Add a Failure Recovery object to your workspace and name it Failure as shown ⇒ Close the Object Palette dialog box.
clip_image014

4. Right-click on the Failure object ⇒ Edit Attributes ⇒ Expand the Link Failure/Recovery Specification hierarchy Set rows to 1 Set the attributes of the added row, row 0, as follows:
clip_image016

This will “fail” the link between Router1 and Router2 200 seconds into the simulation.
5. Click OK and then save the project.
Run the Simulation
To run the simulation for both scenarios simultaneously:
1. Go to the Scenarios menu ⇒ Select Manage Scenarios.
2. Change the values under the Results column to <collect> (or <recollect>) for both scenarios. Compare to the following figure.
clip_image018

3. Click OK to run the two simulations. Depending on the speed of your processor, this may take several seconds to complete.
4. After the two simulation runs complete, one for each scenario, click Close ⇒ Save your project.
View the Results
Compare the Number of Updates:
1. Select Compare Results from the Results menu.
2. Change the drop-down menu in the right-lower part of the Compare Results dialog box to Stacked Statistics as shown.
clip_image020
3. Select the Total Number of Updates statistic for Router1 and click Show.
4. You should get two graphs, one for each scenario. Right-click on each graph and select Draw StyleBar.
5. The resulting graphs should resemble the following (you can zoom in on the graphs by clicking-and-dragging a box over the region of interest):
clip_image022
Obtain the IP Addresses of the Interface:
Before checking the contents of the routing tables, we need to determine the IP address information for all interfaces in the current network. Recall that these IP addresses are assigned automatically during simulation, and we set the global attribute IP Interface Addressing Mode to export this information to a file.
1. From the File menu choose Model FilesRefresh Model Directories. This causes OPNET IT Guru to search the model directories and update its list of files.
  1. From the File menu choose Open ⇒ From the drop-down menu choose Generic Data File Select the <your initials>_RIP-NO_Failure-ip_addresses file (the other file created from the Failure scenario should contain the same information) ⇒ Click OK.
clip_image024


  1. The following is a part of the gdf file content. It shows the IP addresses assigned to the interfaces of Router1 in our network. For example the interface of Router1 that is connected to Net11 has the IP address 192.0.0.1 (Note: Your result may vary due to different nodes placement.) The Subnet Mask associated with that interface indicates that the address of the subnetwork, to which the interface is connected, is 192.0.0.0 (i.e., the logical AND of the interface IP address and the subnet mask).
clip_image026
  1. Print out the layout of the network you implemented in this lab. On this layout, from the information included in the gdf file, write down the IP addresses associated with Router1 as well as the addresses assigned to each subnetwork as shown in the following two figures (Note: Your IP addresses may vary due to different nodes placement.)
clip_image028


Compare the Routing Tables Content:
  1. To check the content of the routing tables in Router1 for both scenarios:
i. Go to the Results menu ⇒ Open Simulation Log ⇒ Expand the hierarchy on the left as shown below ⇒ Click on the field COMMON ROUTE TABLE.
clip_image030
2. Carry out the previous step for both scenarios. The following are partial contents of Router1’s routing table for both scenarios (Note: Your results may vary due to different nodes placement):
Routing table of Router1 (NO_Failure scenario):
clip_image032

Loopback interface allows a client and a server on the same host to communicate with each other using
TCP/IP.
Routing table of Router1 (Failure scenario):
clip_image034

C program to Read From a File

#include <stdio.h> #include <stdlib.h> void main() {     FILE *fptr;     char filename[15];     char ch;   ...