Network Lab Manual
Network Lab Manual
Network Lab Manual
1
Title : ETHERNET
Date :
The Ethernet is a working example of the more general Carrier Sense, Multiple Access with
Collision Detect (CSMA/CD) local area network technology. The Ethernet is a multiple-access
network, meaning that a set of nodes sends and receives frames over a shared link. The “carrier
sense” in CSMA/CD means that all the nodes can distinguish between an idle and a busy link. The
“collision detect” means that a node listens as it transmits and can therefore detect when a frame it
is transmitting has interfered (collided) with a frame transmitted by another node. The Ethernet is
said to be a 1-persistent protocol because an adaptor with a frame to send transmits with probability 1
whenever a busy line goes idle.
Objective
This lab is designed to demonstrate the operation of the Ethernet network. The simulation in this lab
will help you examine the performance of the Ethernet network under different scenarios.
In this lab you will set up an Ethernet with 14 nodes connected via a coaxial link in a bus topology. The
coaxial link is operating at a data rate of 10 Mbps. You will study how the throughput of the network is
affected by the network load as well as the size of the packets.
Procedure
1. To create the network configuration, select Topology ⇒ Rapid Configuration. From the
drop-down menu choose Bus and click Next.
2. Click the Select Models button in the Rapid Configuration dialog box. From the Model
List drop-down menu choose ethcoax and click OK.
3. In the Rapid Configuration dialog box, set the eight values and click OK (Figure 3).
The eth_tap is an Ethernet bus tap that connects a node with the bus.
The eth_coax is an Ethernet bus that can connect nodes with bus receivers and
transmitters via taps. The eth_tap is an Ethernet bus tap that connects a node with
the bus.
4. To configure the coaxial bus, right-click on the horizontal link ⇒ Select Edit Attributes
(Advanced) from the menu:
a. Click on the value of the model attribute ⇒ Select Edit from the drop- down menu
⇒ Choose the eth_coax_adv model (Figure 4).
b. Assign the value 0.05 to the delay attribute (propagation delay in s/m).
c. Assign 5 to the thickness attribute.
d. Click OK.
Thickness specifies
the thickness of the
line used to “draw”
the bus link
1. Right-click on any of the 30 nodes ⇒ Select Similar Nodes. Now all nodes in the network
are selected.
2. Right-click on any of the 30 nodes ⇒ Edit Attributes
3. Check the Apply Changes to Selected Objects check box. This is important to avoid
reconfiguring each node individually.
4. Expand the Traffic Generation Parameters hierarchy: Change the value of the ON State Time
to exponential(100) ⇒ Change the value of the OFF State Time to exponential(0.001). (Note:
Packets are generated only in the "ON" state.)
5. Expand the Packet Generation Arguments hierarchy:
a. Change the value of the Packet Size attribute to constant(1024).
b. Right-click on the Interarrival Time attribute and choose Promote Attribute to Higher
Level. This allows us to assign multiple values to the Interarrival Time attribute
and hence to test the network performance under different loads (Figure 6).
The argument of the exponential
distribution is the mean of the
interval between successive
events. In the exponential
distribution the probability of
occurrence of the next event by a
given time is independent of the
time of occurrence of the last
event or the elapsed time since
that event.
To examine the network performance under different loads, you need to run the simulation several
times by changing the load into the network. There is an easy way to do that. Recall that we
promoted the Interarrival Time attribute for package generation. Here we will assign different
values to that attribute:
5. Now you should see the Office Network.*.Traffic Generation Parameter … in the list of
simulation object attributes (Figure 8). Click on that attribute to select it ⇒ Click Enter
Multiple Values… button of the dialog box.
6. Add the following nine values. (Note: To add the first value, click on the first cell in the
Value column ⇒ Type “exponential (2)” into the textbox and hit enter. Repeat this for all
nine values.)
7. Click OK. Now look at the upper-right corner of the Simulation Configuration dialog box,
make sure that the Number of runs in set is 9.
8. Click Apply and then Close.
1. Right-click anywhere in the project workspace (but not on one of the nodes or links) and
select Choose Individual Statistics from the pop-up menu ⇒ Expand the Global
Statistics hierarchy.
a. Expand the Traffic Sink hierarchy ⇒ Click the check box next to Traffic Received
(packets/sec) (make sure you select the statistic with units of packets/sec).
b. Expand the Traffic Source hierarchy ⇒ Click the check box next to Traffic Sent
(packets/sec).
c. Click OK.
2. Now to collect the average of the above statistics as a scalar value by the end of each
simulation run:
a. Select Choose Statistics (Advanced) from the DES menu.
b. The Traffic Sent and Traffic Received probes should appear under the
Global Statistic Probes.
c. Right-click on Traffic Received probe ⇒ Edit Attributes. Set the scalar
data attribute to enabled ⇒ Set the scalar type attribute to time average
⇒ Compare with Figure 9 and click OK.
d. Repeat the previous step with the Traffic Sent probe.
e. Select Save from the File menu in the Probe Model window and then
close that window.
f. Now you are back to the Project Editor. Make sure to save your project.
Title : Implementation of Distance Vector Routing Algorithm
Date :
Aim
The aim of this experiment is to study the implementation of RIP (Routing Information Protocol)
Distance‐Vector Routing Protocol
The RIP Protocol (Routing Information Protocol) is, in a nutshell:
• Designed to reach a stable routing table with the less Administrator management as
possible.
• The messages that routers send each other are sent to the multicast address to reduce
the hosts processing load.
• It is a Intra‐Domain and Vector‐Distance protocol based in the Bellman‐ Ford algorithm.
• Uses the hop count metric.
• It is used in middle‐size networks with no more than 15 hops.
• RIP messages are encapsulated inside UDP (port 520) and are sent once every 30 seconds,
even if there are no changes in the network.
• No authentication is required.
• It was released in BSD Unix for the first time. The first version was RIPv1, a classful routing
protocol. RIPv2 extended it using classless routing and other advantages.
• It is defined in RFC 1058 (RIPv1) and RFC 2453 (RIPv2). The RFC2091 supports Triggered
Extension.
All routers in the network have a routing table to indicate the link to forward IP packets. Every 30
seconds, all routers send UDP messages to the surrounding routers, indicating the distance, expressed in
hops, to the other routers.
The router that receives the UDP message increases 1 unit the distance and will lookup in its tables if
there’s a shortest path to the destination. If there’s no shorter link then the routing tables will be
updated.
After several iterations the protocol will converge, and every router in the network will know how to
route each IP packet it receives, and this route will be the shortest.
Lab Description
Four routers are connected each other in a ring topology. Each router has two LANs attached. We are
going to design three scenarios: NoFailure, where all the links will work; WithFailure, with a specific link
that is going to fail during the simulation and stops working in the future: WithFailureAndRecovery,
where the link that failed is recovered later, and restarts working as before.
The purpose of this scenario is to represent with a bar chart the routing table updates and to see the
evolution of the routing tables.
Creating the Scenario
2. Deploying devices and controls upon the Grid:
Qty Component Palette Description
4 ethernet4_slip8_gtwy internet toolbox Routers
8 100BaseT_LAN internet toolbox LAN network model
1 Failure Recovery utilities Failure and Recovery Control
4 PPP_DS3 links To connect the routers each other
L4.1 Component list
Rename all the components as seen in picture L4.2. Hereinafter we will refer them by their name.
L4.2 The scenario with the names of the nodes
The fastest way to create the scenario is to create first Router 1, LAN 1 and LAN 2 with their names,
and connect them with wires. After that, copy the whole structure and paste it three times. OPNET
manages the name nodes to make a succession. Finally, connect the routers with PPP_DS3, deploy
a Failure Recovery control and rename it.
3. Exporting routing tables to the Simulation Log:
Select all the routers of the scenario, right click on any and Edit Attributes. Check the following
options:
• IP Routing Parameters Æ Routing Table Export Æ
• Status: Enabled
• Export Time(s) Specification Æ row 0 Æ Time: End of Simulation
Apply Changes to Selected Objects (To perform changes on all the routers of the
scenario).
L4.3 Exporting the routing tables
4. Statistics:
Global Statistics Æ RIP Æ Traffic Sent (bits/sec)
Global Statistics Æ RIP Æ Traffic Received (bits/sec)
Node Statistics Æ Route Table Æ Total Number of Updates
5. Simulation configuration:
In the Project Editor, click on configure/run simulation , and use the following
parameters:
• Duration: 10 minute(s).
• On the Global Attributes tab,
• IP Dynamic Routing Protocol: RIP. This sets RIP protocol for all the routers in the
scenario. We can do this also in the Project Editor doing Protocols Æ IP Æ
Routing Æ Configure Routing Protocols and setting RIP in all interfaces.
• IP Interface Addressing Mode: Auto Addressed / Export
• RIP Sim Efficiency: Disabled. If this attribute is Enabled, the RIP protocol will stop
after the “Stop Time”. But instead of this, we want it to continue updating the
routing tables when there are changes. This is precisely what we will do in
the second scenario, by programming a controlled link failure to study routing
changes.
• RIP Stop Time: 10000 will ensure that the tables won’t stop updating during
the simulation.
• IP Routing Table Export/Import: Export. This will export the routing tables to a
file when the simulation ends.
When finished, click OK (do not run the simulation yet).
Creating the second and third scenarios
In the scenario we just build up, the routers maintain their routing tables and are not going to be
updated anymore if there are no network failures, so once all the routes are set, they won’t change at
all. We first want to study the effect of a router failure, to see how RIP can learn new routes.
WithFailure.
Right click on the Failure object, and Edit Attributes, expand the Link Failure/Recovery
Specification branch, set rows: 1 and unfold the branch of the new row. Use the following
data:
L4.4 Programming a link failure
We have established a failure for Router 2 – Router 1 link, 180 seconds after the simulation
start. Click OK to close the dialog.
2. Creating the third scenario:
Now we create the third scenario: WithFailureAndRecovery with the same parameters as
the second but 180 seconds after the link failure (i.e., 360 seconds after the simulation
start), the link will recover. Repeat the steps as before but this time use Status: Recovery.
3. Run the simulation of the three scenarios at the same time:
When we click OK now, the 3 simulations will run in sequence. Click on Close
when the three simulations are over (wait for Simulation runs to go to be 0).
L4.5 Detail of Simulation sequence dialog
Results analysis
1. Compare the number of updates of the routing tables done by the RIP protocol
(Q1).
In the Project Editor, Results Æ Compare Results.
We can see in picture L4.6 that we have to choose Stacked Statistics and All Scenarios
to show the graphics of all scenarios at the same time, but with overlaid charts to
compare results.
L4.6 Compare Results
Select the statistic Total Number of Updates for Router1 and click on Show.
The two graphics appear now. Right click on each scenario and select Draw Style Æ Bar.
2. Obtaining the IP addresses of the interfaces (needed to study the routing tables).
(Q2).
The IP addresses of all the interfaces are generated automatically during the simulation. When
we set IP Interface Addressing Mode: Auto Addressed/Export we made all this
information to be able for analysis. We will export this data into a Generic Data File (gdf).
On the System window, choose File Æ Model Files Æ Refresh Model Directories.
OPNET will search the models directory and update the file list.
L4.7 Refresh Model Directories
Don’t forget that the System window can be open in the Project Editor if its closed (Windows
Æ System).
In the System window: File Æ Open, and choose Generic Data File. Use the filename
<your_name>_RIP‐NoFailure‐ip_addresses. This file is generated automatically during the
simulation. Click OK.
An editor will pop up with the Generic Data File we choose. This contains the IP addresses of all the
active interfaces in our network model.
L4.8 Generic Data File with the IP addresses
3. Comparing the routing tables:
Steps to visualize the routing tables of a router, for instance Router 1, for the two scenarios
(Q3):
o In the Project Editor, Results Æ Open Simulation Log.
o Click on the COMMON ROUTE TABLE entry for the router.
The routing tables export is not saved until the end, because we are using the
Once at End of Simulation option.
L4.9 Router 1 routing table
Questions
Q1 Create a routing table update bar chart for Router 1 throughout all 3 scenarios, and analyze it.
Q2 Write down the IP addresses for all interfaces on picture L4.2. They may differ depending on the
creation order.
Q3 Compare the routing tables for Router 1 throughout all 3 scenarios. Routing tables are visible in the
Simulation Log for all the scenarios (Scenarios Æ Switch to Scenario in the Project Editor). Compare
the ingoing routes to LAN 3, LAN 4 and Router 2 loopback. Pay attention to these fields: Next Hop,
Insertion Time and Metric.
Answers
Q1 Routing tables do not differ much during the simulation unless there are any changes, like a link
failure or recovery.
L4.10 Router 1 table updates
Q2 This is the .gdf file generated and the IP addresses for all interfaces on the
network:
#
L4.11 Generic Data File (gdf)
L4.12 IP Addresses for all interfaces
Q3 The tables produced at the end of the simulation for the first 3 scenarios can be seen in picture
below. Routes to networks 192.0.5.0/24, 192.0.6.0/24 and
• NoFailure
Dest. Address Subnet Mask Next Hop Interface Name Metric Protocol Insertion Time
L4.13
• WithFailure
Dest. Address Subnet Mask Next Hop Interface Name Metric Protocol Insertion Time
L4.14
• WithFailureAndRecovery
COMMON ROUTE TABLE snapshot for:
Dest. Address Subnet Mask Next Hop Interface Name Metric Protocol Insertion Time
L4.15
Expt. No. 3
Title : ICMP PING
Date :
ICMP (Internet Control Message Protocol) is encapsulated inside the IP protocol, and is used for
network troubleshooting and control messaging. It is used to notify that a datagram did not reach its
destination either because the destination host was not found (UNREACHABLE HOST) or because the
IP packets traveled across too many routers (TTL EXCEEDED).
Objective
This Lab explains yet another application: ICMP ECHO REQUEST/ECHO REPLY (aka Ping). An
ECHO REQUEST message is sent to an IP address to find out if the communication between
peers is working. The destination computer is supposed to answer with a ECHO REPLY message. A
network is created with a 5-routers-ring-backbone and 2 workstations (A and B) directly opposite. A
will send an ECHO REQUEST to B, and B will answer with an ECHO REPLY. We’ll check out that the
REQUEST packet went through the three routers between peers, and the REPLY packet came back
using the same path (the routing protocol for this Lab is RIP). In a second scenario, one of this links will
fail, and we will study how this changes the ping trace.
This lab session teaches you the basics to understand how ECHO Request and Reply takes place, and
also to use Ring Topology to route through different paths.
Procedure
2. Press Next several times to end the Startup Wizard. Close the Object Palette dialog
box. The Project Editor will be launched with a blank Grid.
3. To create the 5-router ring: Topology ⇒ Rapid Configuration
a. On the Popup window, Configuration: Ring, press Next (Figure 11).
b. Click Select Models and choose internet_toolbox in the combo box, to select
the library where we want to pick up the routers and links from. Press OK.
c. In the Node Model combo box, pick up the router
CS_4000_3s_e6_fr2_sl2_tr2.
d. Select the link to connect the routers, Link Model: PPP_DS1
e. Number: 5 routers.
f. The center for the ring is (X,Y)=(5,5).
g. The radius length is 2.5.
h. Press OK to create the network.
5. Using the ip_ping_traffic object from the Object Palette (internet_toolbox), draw
an ICMP ping demand from one host to the other:
a. Select the ip_ping_traffic object in the palette.
b. Click on one workstation (start) and then on the other one (end).
c. Upon completion, press the right button and select Abort Demand
Definition to stop drawing wires.
d. Right-click on the flow line and click Edit Attributes, and then set:
i. Ping Pattern: Default
ii. Start Time: constant(1000)
6. Choose RIP as routing protocol for the scenario:
a. On the Project Editor Menu, choose Protocols ⇒ IP ⇒ Routing ⇒ Configure
Routing Protocols...Check out that only RIP is selected and press OK.
b. Protocols ⇒ RIP ⇒ Configure Start Time. Select Mean Outcome: 20 and
press OK. The RIP protocol will begin creating routing tables at this moment.
c. Change the node names for the Routers as Router 1, 2…etc., and also for the
workstations as Workstation 1, 2 etc (Figure 13).
Figure 11 Routing
d. Click Run.
Question
Duplicate the scenario NoFailure and call it WithFailure. Choose a link the PING was using in
the last simulation (e.g. Router 1- Router 2), and make it fail, by selecting it and clicking on
the mark selected node or link as failed button. Analyze the new ping trace.
Answer
At the Project Editor, Scenarios ⇒ Duplicate Scenario. The new scenario is called Scenario
Name: WithFailure and we press OK. We mark Router 1 – Router 2 link to fail and execute
the simulation. The ping trace takes a new path now; it can be viewed in the Report.
Expt. No. 4
Title : SWITCHED LANS
Date :
There is a limit to how many hosts can be attached to a single network and to the size of a geographic
area that a single network can serve. Computer networks use switches to enable the
communication between one host and another, even when no direct connection exists between
those hosts. A switch is a device with several inputs and outputs leading to and from the hosts that
the switch interconnects. The core job of a switch is to take packets that arrive on an input and
forward (or switch) them to the right output so that they will reach their appropriate destination. A key
problem that a switch must deal with is the finite bandwidth of its outputs. If packets destined for a
certain output arrive at a switch and their arrival rate exceeds the capacity of that output, then we have
a problem of contention. In this case, the switch will queue, or buffer packets until the contention
subside. If it lasts too long, however, the switch will run out of buffer space and be forced to discard
packets. When packets are discarded too frequently, the switch is said to be congested.
Objective
This lab is designed to demonstrate the implementation of switched local area networks. The
simulation in this lab will help you examine the performance of different implementations of
local area networks connected by switches and hubs.
Procedure
1. Start the OPNET IT Guru ⇒ Choose New from the File menu.
2. Select Project and click OK ⇒ Name the project <your initials>_SwitchedLAN, and
the scenario OnlyHub ⇒ Click OK.
3. In the Startup Wizard: Initial Topology dialog box, make sure that Create Empty
Scenario is selected ⇒ Click Next ⇒ Choose Office from the Network Scale list ⇒
1. Select Topology ⇒ Rapid Configuration. From the drop-down menu choose Star
and click Next.
2. Click the Select Models button in the Rapid Configuration dialog box. From the
Model List drop-down menu choose ethernet and click OK.
3. In the Rapid Configuration dialog box (Figure 15), set the following five values: Center
Node Model = ethernet16_hub, Periphery Node Model = ethernet_station,
Link Model = 10BaseT, Number=16, Y=50, and Radius = 42 ⇒ Click OK.
The prefix
ethernet16
indicates that the
device supports up
to 16 Ethernet
ti
4. Right-click on node_16, which is the hub ⇒ Edit Attributes ⇒ Change the name
attribute to Hub1 and click OK.
5. Now that you have created the network, it should look like Figure 16.
6. Make sure to save your project.
Figure 14 Switched LAN
Choose Statistics
1. Right-click anywhere in the project workspace and select Choose Individual DES
Statistics from the pop-up menu.
2. In the Choose Results dialog box, choose the four statistics as depicted in Figure 18.
3. Click OK.
Figure 16 Choose Results
The network we just created utilizes only one hub to connect the 16 stations. We need to create
another network that utilizes a switch and see how this will affect the performance of the network. To
do that we will create a duplicate of the current network:
1. Select Duplicate Scenario from the Scenarios menu and give it the name
HubAndSwitch ⇒ Click OK.
2. Open the Object Palette by clicking on . Make sure that ethernet is selected in
the pull-down menu on the object palette.
3. We need to place a hub and a switch in the new scenario. (Circled in Figure 19).
4. To add the Hub, click its icon in the object palette ⇒ Move your mouse to the workspace
⇒ Click to drop the hub at a location you select. Right-click to indicate you are done
deploying hub objects.
5. Similarly, add the Switch
6. Close the Object Palette.
7. Right-click on the new hub ⇒ Edit Attributes ⇒ Change the name attribute to Hub2
and click OK.
8. Right-click on the switch ⇒ Edit Attributes ⇒ Change the name attribute to Switch
and click OK.
9. Reconfigure the network of the HubAndSwitch scenario so that it looks like Figure 20.
Hints:
a. To remove a link, select it and choose Cut from the Edit menu (or simply hit the
Delete key). You can select multiple links and delete all of them at once.
b. To add a new link, use the 10BaseT link available in the Object Palette.
10. Save your project.
Figure 18 Network
Run the Simulation
3. Click OK to run the two simulations. Depending on the speed of your processor, this may take
several minutes to complete.
4. Upon completion of the two simulations, one for each scenario, click Close.
5. Save your project.
Date :
Aim
The aim of this experiment is to study the performance of OSPF Link State Routing Protocol
OSPF (Open Shortest Path First) is yet another routing protocol. In a nutshell:
Lab Description
This Lab is divided in three scenarios:
• NoAreas, where no area is defined. Its proves how OSPF chooses the cheapest area when
two possible paths exist;
• WithAreas explains areas, and
• LoadBalancing shows how two equal‐cost routes are used equally to divide the traffic across
the route, and thus reducing the total load on each link.
Scenario Creation
using the following parameters (use default values for the remainder):
o Project Name: <your_name>_OSPF
o Scenario Name: NoAreas
o Network Scale: Campus
o 1000x1000 Meters
Press Next several times until the Startup Wizard finishes. A new blank grid is now created in
the Project Editor.
2. Deploying devices on the grid:
L5.1 Rapid Configuration
This creates 5 ethernet_slip_8_gtwy nodes in a full‐meshed, star‐topology.
Deploy the remaining nodes as in picture L5.2. Zoom + before to work more comfortably. All
nodes are type ethernet_slip8_gtwy and are connected using PPP_DS3 wiring.
Use the same node names: we will refer to them using these names hereinafter. We used
OPNET default names (including autonumbering). Use the same order of creation to obtain the same
numbers.
The picture shows the links cost as well. We will explain how to set the costs later, but it is not
necessary to use the labels on the links (Topology Æ Open Annotation Palette). The colored arrows
have a special meaning, as we will see.
L5.2 The completed scenario
3. Configuring the link cost:
The default value is Reference Bandwidth = 1,000,000 Kbps.
To assign a link cost (for instance, to assign 10 units to node 8 – node 9):
10=1.000.000/Link Bandwidth Æ Link Bandwidth = 100.000
The Link Bandwidth value can be set to a specific link by selecting all the same‐cost links (hold
Shift key + Left button for multiple selections), and then ProtocolsÆ IP Æ Routing Æ Configure
Interface Metric Information.
For the example, we input Bandwidth (Kbps): 100000, checked Interfaces across selected
links and pressed OK. The remaining parameters use default values.
5.3 Setting the link metrics
The remaining links have Cost=1 Æ Bandwidth = 1000000 Kbps.
4. Configuring traffic demands: We create two traffic demands
o node_7 to node_9
o node_8 to node_9
To create the node_7 to node_9 demand (the other one is similar)
o Select node_7 and node_9.
o In the Project Editor, Protocols Æ IP Æ Demands Æ Create Traffic Demands…
Select From: node_7, and pick up a color for this traffic demand (this color will be
used in the Project Editor map). Choose White and click on Create.
L5.4 Creating traffic demands
We create another Traffic Demand from node_8 to node_9, in yellow.
• Go to Protocols Æ IP Æ Routing Æ Configure Routing Protocols… without having
any node selected. A new dialog will pop up as seen in picture L5.5. At the routing
protocols checkbox, we mark only OSPF, and select as well Visualize Routing Domains
and All Interfaces (including loopback). The remaining options will be left with default
values. Click OK.
L5.5 Setting the protocol at the routers
• Select the Traffic demand origin nodes (node_7 and node_8), and at the Project
Editor go to ProtocolsÆ IP Æ Routing Æ Export Routing Table for Selected Routers
and press OK at the confirmation dialog. This way we can study the routing of the
packets at the end of the simulation.
L5.6 Confirming the Routing Table Export
• Now we can assign IP addresses to all routers at the Project Editor, Protocols Æ
IP Æ Addressing Æ Auto‐Assign IP Addresses.
6. Setting up the simulation:
At the Project Editor click at configure/run simulation , and write Duration: 10
minute(s), and press OK (don’t start the simulation yet).
Creating the second and third scenarios
At the scenario we have just created, all the routers belong to the same hierarchical level (area). We
have not enforced Load Balancing on any route. We can now create the second and third scenarios:
the second will be WithAreas and it will define three areas and a central backbone. The third scenario
allows Load Balancing within nodes 7 and 9.
1. Creating the scenario WithAreas
• At the Project Editor, select Scenarios Æ Duplicate Scenario…, and call it WithAreas.
Press OK.
• The first area is 0.0.0.1. In order to configure it, select it with the Shift key the links
connecting nodes 4,5,6 and 7, and then go to Protocols Æ OSPF Æ Configure
Areas and assign the value 0.0.0.1 to the Area Identifier, and press OK.
• Do the same for the second area (0.0.0.2), with the links connecting nodes 0, 8 and 9.
• The third area is 0.0.0.3 and is composed by the links that connect nodes 1, 10 and 11.
• The central backbone is not configured because this is done by default. It’s Area ID is
0.0.0.0.
• By doing Protocols Æ OSPF Æ Visualize Areas… we can show the links of the different
areas expressed in different colors.
L5.7 Dividing areas in different colors
L5.8 The scenario whit areas in colors
2. Creating the scenario LoadBalancing
• Select Scenarios Æ Duplicate Scenario... and call it LoadBalancing. Click OK afterwards.
• Select nodes 7 and 9 holding the Shift key.
• Protocols Æ IP Æ Routing Æ Configure Load Balancing Options. We must ensure Packet‐Based
is selected and the radio button Selected Routers is checked. Click OK.
L5.9 Configuring Load Balancing
L5.10 Configuring the Area ID of the loopback
3. Running the simulation:
From the Project Editor, Scenarios Manage Scenarios…
Change the values on Results row to <collect> or <recollect> in all scenarios.
When we now press OK the 3 simulations will run, one after another.
When the simulations are finished, click on Close. At the top left part of the dialog we can see a field
called Simulation runs to go, that needs to be zero when the simulations are finished before we can click
Close.
L5.11 Details of the dialog
Results analysis
1. WithoutAreas
• At the Project Editor, Scenarios Æ Switch to scenario Æ WithoutArees
• To see the traffic demand between 8 and 9, from the Project Editor go to Protocols Æ IP Æ
Demands Æ Display Routes for Configured Demands. Drop down the branches completely
and set Display: Yes, and click on Close. Now we can see the traffic demand.
L5.12 Configuring the demand visualization
• Repeat the last step so we can see the traffic between 7 and 9. Depending on the order the
links were created, it will pass through router 6 instead of the router 5. Both two paths have
the same cost. OPNET will choose one depending on the order. (Q1)
WithAreas
• From the Project Editor, Scenario Switch to Scenario Areas
• See the route between 8 and 9. (Q2)
Load_Balancing
• At the Project Editor, Scenario Switch to Scenario LoadBalancing
• See the routing between nodes 7 and 9. We did load balancing, so the both minimum
cost paths are highlighted. They both cost the same.
Questions
Q1 Which routes are traffic demands node_8 node_9 and node_7 node_9
following at WithoutAreas? Why?
Q2 Which route is taking the traffic demand node_8 node_9 at WithAreas and why?
Q3 Which route is taking the traffic demand node_7 node_9 at LoadBalancing and
why?
Answers
Q1 The result can be seen at picture L5.13
L5.13 Traffic demands routing at WithoutAreas
It will take the shortest path, but not the shortest. Regarding to the node_8 node_9 demand, RIP
would have used the link node_8 node_9, but OSPF is using the links 8‐0‐1‐9. There are two possible
paths for the other demand, the one that goes through node_5 and the one that goes through
node_6. OSPF will take one of them for the load balancing. In this case, it takes node_5.
Q2 We can see now it is not taking the cheapest path, but the cheapest in its own area. When we
do areas, each router has a route to all possible destinations in its own area, and a gateway to the
remaining stations.
L5.14 Route to the traffic demands at WithAreas
Q3 As we have said at Q1, there are two possible paths to communicate each other node_7 and
node_9. LoadBalancing will take both of them, dividing the load equally for the two routes.
L5.15 Route with load balancing
Assistance for more information
1. Stallings. W. "Data and Computer Communications", Prentice Hall.
2. Behrouz A. Foruzan, “Data communication and Networking”, Tata McGraw‐Hill
Laboratory 6: Subnetting
Subnet mask is an address which network part is full of 1s and the host part is full of 0s. We
can obtain the host part of an IP address using an AND operation with its subnet mask, and
the network part using the XOR operation.
Network addresses are defined in the network layer of the OSI model, so routers can divide
networks, but not switches, bridges or hubs.
Objective
The objective of this lab is to perform Subnetting with a number of network devices. Doing this
experiment, you will understand how subnetting is done in a LAN, and also understand the OSI
Model.
This lab shows how IT Guru performs subnetting. We are going to design a complex LAN
network, using many different devices (workstations, servers, hubs, bridges, switches,
routers and an Internet cloud), and Class C subnetting. One workstation will ping another one
far away from it, so we can study the ping trace and try to understand the OSI model from
it.
Procedure
1. Open a new Project in OPNET IT Guru (File Æ New Project) using these values (use
default values for the remainder):
a. Project Name: <your_name>_Subnetting
b. Scenario Name: AutoAssignedAddresses
c. Network Scale: Campus
Press Next several times in the Startup Wizard until a new Project Editor is opened
with a blank grid.
Zoom + into a small part of the map, so we could do a Zoom – later if we need
some more room if the scenario is quite big.
Open the Object Palette from the Project Editor, and pick up the following
components from the Sm_Int_Model_List palette:
• 1 Sm_Application_Config control
• 1 Sm_Profile_Config control
• 1 Sm_Int_wkstn control (We’ll do copy & paste to have 22 more units).
From the Cisco palette, pick up these items (Figure 45):
• 2 ppp_server servers
• 1 ip32_cloud Internet model
Rename the nodes using the names depicted in Figure 46. We need 23 nodes using
names 1,2,...23. We don’t want to set the names individually, so we just change the
name of the number 1 (right click Æ Edit Attributes Æ Name: 1 and then use Copy &
Paste 22 times. OPNET will manage to assign consecutive node numbers. Change the
names of the other elements as well.
Build up all the wires of the network. Use 10BaseT for all the links except servers
and Internet links (PPP_DS1). These links are in palette internet_toolbox. Figure 46
shows how color and width parameters for the links have been changed as well, and
the Grid is been hidden. This is not necessary, but details are better seen with this
option.
Figure 22 Subnetting Scenario
2. Network addresses definition:
Click on any workstation of the Grid, and use Select Similar Nodes from the right
button option to select all the stations. Click on any station, and use Edit Attributes
from the right-button menu. Mark Apply Changes to Selected Objects to perform
changes on all selected stations at the same time. Change the following values (Figure
47):
Repeat the same steps for the Cisco 7505 routers (Router 1,2,3). Use the following
values (Figure 48):
Do the same steps for the Cisco 7000 routers (Routers 4 and 5). Give automatic IP
addresses to all interfaces from the Project Editor, using:
a. FTP and Telnet Server: File Transfer (Heavy), Telnet Session (Heavy)
b. Printer and DB Server: File Print (Heavy), Database Access (Light).
To assign services, right click on a server, and then click on Edit Attributes
Æ Application: Supported Services Æ Edit... On this dialog you can add on the
services. Set the number of services in the rows field, and then edit the Name of each
row. Make sure the field Description is supported, and click OK twice to close the
dialogs.
Select two workstations far away one from the other like workstation 23 and FTP and
Telnet Server, and create a ping from the workstation to the server. Use the
ip_ping_traffic object from the internet_toolbox palette, and click on the traffic start
(23) and then the traffic end (FTP and Telnet Server). When finished, click on Abort
Demand Definition.
Right click on the arrow representing the Ping traffic, and click on Edit Attributes.
Set Ping Pattern:Record Route and press OK. Now we can see all the layer-3 devices
the ECHO/ECHO REPLY packets have gone through.
Confgure Simulation
Results Analysis
Information is ordered by rows, each row containing information for each interface of the
router. In Figure 49, interface IF0 has IP address 192.0.1.4. The only IP addresses that appear
are those that are connected to some network. When a link starts/finishes into a router,
OPNET gets a free interface and assigns it to the links automatically. The way interfaces are
assigned depends on the router model. On Picture, it’s a Cisco 7505 router. The real name is
CS_7505_5s_e6_fe2_fr4_sl4_tr4 and can be found in the Attributes. This means "Cisco
Systems (CS) with 5 slot chassis, 6 Ethernet ports, 2 Fast Ethernet Ports, 4 Frame Relay ports, 4
Serial IP connectors (SLIP) and 4 Token Ring ports”. Finding out the way ports are assigned is
somehow difficult, but you can get this information also by right-clicking on the router model
you’re interested in on the Object Palette. The Model Description dialog describes on the
Comments textbox, a complete description of all interfaces on the Interconnections section
(Figure 50)
Figure 26 Node Model Description
0 6 eth10T 0-5
1 2 eth100T 6-7
4 SLIP 16-19
RSP1 (reserved)
So, if Router 1 has interfaces 0,1,2 reserved, this means these are et10T (10BaseT). These
interfaces are assigned to Hub 1, Switch 1 and Hub 2. They are assigned using the same order
the links were created, and you can see on the pop up tool tip when you click on a link (Figure
51).
Now we are able to find out the IP addresses of all interfaces and networks.
Question
Fill up the table with the IP address, subnet address and mask and interface name for each
network and interface:
Address and
Station or interface IP Address Interface
Subnet Mask
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Address and
Station or interface IP Address Interface
Subnet Mask
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
Router 1 Loopback
Router 1 to Switch 1
Router 1 to Hub 2
Router 1 to Hub 1
Router 2 Loopback
Router 2 to Bridge 2
Router 2 to Hub 7
Router 2 to Hub 6
Router 3 Loopback
Router 3 to Hub 5
Router 3 to Hub 8
Router 4 Loopback
Router 4 to Internet
Router 4 to Hub 6
Router 5 Loopback
Address and
Station or interface IP Address Interface
Subnet Mask
Router 5 to Internet
Internet Loopback
Answer
These results refer to data of our simulation, but they may change depending on the order the
interfaces were created.
Address and
Station or interface IP Address Interface
Subnet Mask
1. 192.0.2.4 192.0.2.0/24
2. 192.0.2.1 192.0.2.0/24
3. 192.0.2.2 192.0.2.0/24
4. 192.0.1.1 192.0.1.0/24
5. 192.0.1.2 192.0.1.0/24
6. 192.0.1.3 192.0.1.0/24
7. 192.0.3.1 192.0.3.0/24
8. 192.0.3.2 192.0.3.0/24
9. 192.0.3.3 192.0.3.0/24
Title : PC to PC Communication
Date :
Aim
The aim of this Experiment is to communicate data between PCs using Serial and Parallel
Communication Ports and to study the Asynchronous byte (character) transfer.
Objectives
Doing this experiment, you will
• Understand how characters (bytes) transfer takes place from one system to another system
over the transmission lines.
• Know the elementary issues related to the use of terminal, network ports and asynchronous
data transmission
Equipment
Components Required :
1. V.35 Female DCE Serial Cable – 1 Nos.
2. USB to USB File transfer Cable – 1 Nos.
3. Parallel Port Cable – 1 Nos.
4. PC with Serial and Parallel Port Interface Connectors – 2 Nos.
Software Required :
1. Windows Operating Environment
2. Driver files for Serial Port, Parallel Port and USB Ports
Experimental Setup – 1 (PC – Serial Cable – PC)
Procedure :
1. Initially connect the Serial Cable both ends to the two PCs
2. In Windows setup the following
a. Go to My Network Places > View Network Connections > Create a New Connection
b. In the New Connection Wizard, choose Setup and Advanced Connection > Connect
directly to another computer
c. Give settings as Host (Information provider) or Guest (Information seeker)
d. Choose Communication Port (COM1) and select users from list
e. Click Incoming / Ougoing connections and set properties
f. Write a program such that the transmitter node, directly and unconditionally transmit
all the characters entered from its key board and that the characters entered at the
transmitter’s keyboard should also be displayed on its screen.
g. Write a program such that the receiver node, accept every character appearing on its
network bus and display it on its screen.
h. Study the point to point, asynchronous byte transmission with the above setup.
Experimental Setup – 2 (PC – USB File transfer Cable – PC)
1. Initially connect the USB File transfer Cable both ends to the two PCs USB connectors
2. Install the driver software to both PCs
3. Communicate data :
a. Write a program such that the transmitter node, directly and unconditionally
transmit all the characters entered from its key board and that the characters
entered at the transmitter’s keyboard should also be displayed on its screen.
b. Write a program such that the receiver node, accept every character appearing on
its network bus and display it on its screen.
c. Study the point to point, asynchronous byte transmission with the above setup.
Experimental Setup – 3 (PC – Parallel Port Cable – PC)
Procedure :
1. Initially connect the Parallel data sharing Cable both ends to the two PCs
2. In Windows setup the following
a. Go to My Network Places > View Network Connections > Create a New Connection
b. In the New Connection Wizard, choose Setup and Advanced Connection > Connect
directly to another computer
c. Give settings as Host (Information provider) or Guest (Information seeker)
d. Choose Communication Port (LPT1) and select users from list
e. Click Incoming / Ougoing connections and set properties
f. Write a program such that the transmitter node, directly and unconditionally transmit
all the characters entered from its key board and that the characters entered at the
transmitter’s keyboard should also be displayed on its screen.
g. Write a program such that the receiver node, accept every character appearing on its
network bus and display it on its screen.
h. Study the point to point, asynchronous byte transmission with the above setup.
The algorithms for transmitter and receiver should be as follows:
Transmitter
Set the device number;
Repeat forever;
If character is pressed on the key board display and send the
serial port
Print the character;
/* end of if statement */
/* end of repeat loop */
/* end of main */
Receiver
Set device number;
Repeat forever;
If character is present on the network then get the character;
Print the character;
/* end of if statement */
/* end of repeat loop */
/* end of main */
Precautions
• Make sure that the port numbers used in the program are same as the port numbers assigned
for the serial/parallel ports.
• Make sure that the systems used are compatible.
• Make sure that connections are proper before doing the experiment.
Record of Observations
• Type and send a single line text from the transmitter node to the receiver node.
• Send a File from the transmitter node to the receiver node.
Interpretation of results
• Check for One to one asynchronous data transfer
Questions based on Experiment
1. Define asynchronous data transfer ?
2. What are the differences between synchronous and asynchronous data transfer?
3. Brief on
(a) RS232 serial interface
(b) Centronics parallel interface
(c) USB interface
Assistance for more information
[1] Stallings. W. "Data and Computer Communications", Prentice Hall.
[2] Behrouz A. Foruzan, “Data communication and Networking”, Tata McGraw‐Hill
Expt. No:8
Title : Implementation of Data Encryption and Decryption
Date :
Aim
The aim of this experiment is to study the perform XOR Encryption and Decryption.
Objectives
Doing this experiment, you will
• Understand how XOR encryption algorithm can be implemented.
• Know the elementary issues related to data encryption and decryption
Exclusive‐OR encryption, while not a public‐key system such as RSA, is almost unbreakable through
brute force methods. It is susceptible to patterns, but this weakness can be avoided through first
compressing the file (so as to remove patterns). Exclusive‐or encryption requires that both encryptor
and decryptor have access to the encryption key, but the encryption algorithm, while extremely simple,
is nearly unbreakable.
Exclusive‐OR encrytion works by using the boolean algebra function exclusive‐OR (XOR). XOR is a binary
operator (meaning that it takes two arguments ‐ similar to the addition sign, for example). By its name,
exclusive‐OR, it is easy to infer (correctly, no less) that it will return true if one, and only one, of the two
operators is true. The truth table is as follows:
A B A XOR B
T T F
T F T
F T T
F F F
(A truth table works like a multiplication or addition table: the top row is one list of possible inputs, the
side column is one list of possible inputs. The intersection of the rows and columns contains the result of
the operation when done performed with the inputs from each row and column)
The idea behind exclusive‐OR encryption is that it is impossible to reverse the operation without
knowing the initial value of one of the two arguments. For example, if you XOR two variables of
unknown values, you cannot tell from the output what the values of those variables are. For example, if
you take the operation A XOR B, and it returns TRUE, you cannot know whether A is FALSE and B is
TRUE, or whether B is FALSE and A is TRUE. Furthermore, even if it returns FALSE, you cannot be certain
if both were TRUE or if both were FALSE.
If, however, you know either A or B it is entirely reversible, unlike logical‐AND and logical‐OR. For
exclusive‐OR, if you perform the operation A XOR TRUE and it returns a value of TRUE you know A is
FALSE, and if it returns FALSE, you know A is true. Exclusive‐OR encryption works on the principle that if
you have the encrypted string and the encryption key you can always decrypt correctly. If you don't
have the key, it is impossible to decrypt it without making entirely random keys and attempting each
one of them until the decryption program's output is something akin to readable text. The longer you
make the encryption key, the more difficult it becomes to break it.
The actual way exclusive‐OR encryption is used is to take the key and encrypt a file by repeatedly
applying the key to successive segments of the file and storing the output. The output will be the
equivalent of an entirely random program, as the key is generated randomly. Once a second person has
access to the key, that person is able to decrypt the files, but without it, decryption is almost impossible.
For every bit added to the length of the key, you double the number of tries it will take to break the
encryption through brute force.
Software Required
1. Turbo C++ Compiler.
Procedure :
The input text file is should be named "input.txt" (without the quotes) in c:\ directory
Encryption
* Such as "C:\input.txt".
* exists with the filename 'decrypted_file' in the same location from where
*/
#include<stdio.h>
#include<string.h>
int main()
FILE* fp_print;
char fname1[30];
int c;
clrscr();
gets(fname1);
fpread=fopen( fname1,"r");
if(!fpread)
return 0;
fpwrite=fopen("encrypted_file","w");
while((c=(int)fgetc(fpread)) != EOF)
{
putc(c^1,fpwrite);
printf("%c",c^1);
fp_print=fopen("encrypted_file","r");
/*while((c=(int)fgetc(fp_print)) != EOF)
//putc(c^1,fpwrite);
printf("%d",c);
//printf("%c",c);
}*/
fclose(fp_print);
fclose(fpread);
fclose(fpwrite);
fpread=fopen("encrypted_file","r");
fpwrite=fopen("decrypted_file","w");
while((c=(int)getc(fpread)) != EOF)
putc(c^1, fpwrite);
fclose(fpwrite);
fpwrite=fopen("decrypted_file","r");
printf("\n");
while((c=(int)fgetc(fpwrite)) != EOF)
printf("%c",c);
fclose(fpread);
fclose(fpwrite);
getch();
return 0;
Assistance for more information
1. Stallings. W. "Data and Computer Communications", Prentice Hall.
2. Behrouz A. Foruzan, “Data communication and Networking”, Tata McGraw‐Hill
Expt. No:9
Title : Bus, Ring and Star Topology and Protocols
Date :
Aim
The aim of this experiment is to create an Ethernet using Network Hubs and Switches and study how a
token‐passing scheme is implemented.
Objective
Doing this experiment, you will
• Illustrate the operation of a token‐bus/ring LAN. (The scope of the protocol is limited and does
not include token recovery or network reconfiguration operations. Since token recovery is not
supported, a loss of token stops the network operation).
• To illustrate the operation of a star topology.
Equipment
Components Required :
1. CAT 5 E UTP Ethernet Patch Cable – 5 Nos.
2. 10 / 100 Mbps Fast Ethernet Packet Switch – 3 Nos.
3. PC with 10/100 Mbps Fast Ethernet Ports – 3 Nos.
Procedure
1. A token‐bus logical ring is implemented using two types of frames – the normal frame as
outlined in the Addressed Frame Broadcast and Reception Experiment, and a “token” frame
containing only the destination address. Thus the token frame format is: PRE, DID, EOT.
2. The experiment deals with sending and receiving the token: when a token is sent to a successor,
the transmitting node waits for a response. It does not implement any token recovery, so if the
token is lost, the network operations halt.
3. Also the network needs to be started manually by an operator, since no ring initialization
procedure is included.
4. The AL is still unchanged for this experiment. The NL, however, has the following
states: receive, send packet and send token.
5. In the receive state, the NL monitors the frames arriving from the network medium and
awaits a token or packet frame. If a packet is received, the application layer is informed
about it, but the NL remains in the receive state, ready to accept another packet or the
token frame.
6. If the token is received, it means that the node obtained the right to transmit.
7. If a packet is waiting to be transmitted, the state is changed to send packet, and
transmission begins.
8. The request to send a packet is signaled in the application-network interlayer interface by
a flag.
9. After packet transmission has been completed, the state is changed to send token, and
token transmission begins.
/* AL Machine */
repeat forever
if char at the keyboard and TBF == 0 then
AI = 1;
get the char;
Array[0] = PRE
get the next char;
if char == machine ID then /* check address */
while char != CR
place char in the array;
inc array index;
get the char;
end while;
if token sequence has been received
set token received flag to 1;
display message “Token Received….” ;
else
place CR in array;
inc array index;
place LF in array;
inc array index;
place EOT in array;
AI = 0; TF = 1; TBF = 1;
/* end of if statements */
if DF == 1 then
DF = 0; AD = 1;
get the char from buffer;
display the char string until CR;
ignore CR;
ignore LF;
ignore EOT;
AD = 0; RBF = 0;
/* end of if statement */
/* NL Machine */
if char at the network and RBF == 0 then
NR = 1;
get the char;
if char == PRE then continue;
while char != EOT
place in array;
inc array index;
get the char;
/* end while */
NR = 0; DF = 1; RBF = 1;
/*end of if statement */
if (TF == 1 and token received flag set to 1) then
TF = 0; NT = 1;
send char to network until EOT;
NT = 0; TBF = 0;
/*end of if statement */
/* end or repeat loop */
/* end of main */
Observations
• Enter and send a few one‐line frames between various nodes
• Use two nodes as receivers and see the frame broadcast.
• Use two nodes as transmitters and one as receiver and send frames from the two transmitters
simultaneously. Is there a collision taking place? If not, why?
Record of Observations
• Program listings and details (put enough comments in the program to make the code clear)
• Flow chart and the algorithm
• Program output to screen
The Internet’s TCP guarantees the reliable, in-order delivery of a stream of bytes. It includes a flow-
control mechanism for the byte streams that allows the receiver to limit how much data the sender
can transmit at a given time. In addition, TCP implements a highly tuned congestion-control
mechanism. The idea of this mechanism is to throttle how fast TCP sends data to keep the sender from
overloading the network.
The idea of TCP congestion control is for each source to determine how much capacity is available in
the network, so that it knows how many packets it can safely have in transit. It maintains a state
variable for each connection, called the congestion window, which is used by the source to limit
how much data it is allowed to have in transit at a given time.
TCP uses a mechanism, called additive increase/multiplicative decrease, that decreases the
congestion window when the level of congestion goes up and increases the congestion window when
the level of congestion goes down. TCP interprets timeouts as a sign of congestion. Each time a timeout
occurs, the source sets the congestion window to half of its previous value. This halving corresponds
to the multiplicative decrease part of the mechanism. The congestion window is not allowed to fall
below the size of a single packet (the TCP maximum segment size, or MSS). Every time the source
successfully sends a congestion window’s worth of packets, it adds the equivalent of one packet to the
congestion window; this is the additive increase part of the mechanism.
TCP uses a mechanism called slow start to increase the congestion window “rapidly” from a cold start
in TCP connections. It increases the congestion window exponentially, rather than linearly. Finally,
TCP utilizes a mechanism called fast retransmit and fast recovery. Fast retransmit is a heuristic
that sometimes triggers the re-transmission of a dropped packet sooner than the regular timeout
mechanism.
Objective
This lab is designed to demonstrate the congestion control algorithms implemented by the
Transmission Control Protocol (TCP). The lab provides a number of scenarios to simulate these
algorithms. You will compare the performance of the algorithms through the analysis of the simulation
results. In this lab you will set up a network that utilizes TCP as its end-to-end transmission
protocol and analyze the size of the congestion window with different mechanisms.
Procedure
1. The Object Palette dialog box should now be on the top of your project space. If it is not there,
open it by clicking . Make sure that the internet_toolbox item is selected from the pull-
down menu on the object palette.
2. Add to the project workspace the following objects from the palette: Application Config,
Profile Config, an ip32_Cloud, and two subnets.
To add an object from a palette, click its icon in the object palette ⇒ Move your mouse to the
workspace ⇒ Click to drop the object in the desired location ⇒ Right-click to finish creating
objects of that type.
3. Close the palette.
4. Rename the objects you added as shown in Figure 75 and then save your project:
Right-click on the Profiles node ⇒ Edit Attributes ⇒ Expand the Profile Configuration attribute
and set rows to 1.
Name and set the attributes of row 0 as shown in Figure 77 ⇒ Click OK.
1. Double-click on the West subnet node. You get an empty workspace, indicating that the
subnet contains no objects.
2. Open the object palette and make sure that the internet_toolbox item is selected from
the pull-down menu.
3. Add the following items to the subnet workspace: one ethernet_server, one
ethernet4_slip8_gtwy router, and connect them with a bidirectional 100_BaseT link ⇒
a. Edit the value of the Server Address attribute and write down Server_West.
b. Expand the TCP Parameters hierarchy ⇒ Set both Fast Retransmit and Fast
Recovery to Disabled.
1. Double-click on the East subnet node. You get an empty workspace, indicating that the
subnet contains no objects.
2. Open the object palette and make sure that the internet_toolbox item is selected
from the pull-down menu.
3. Add the following items to the subnet workspace: one ethernet_wkstn, one
ethernet4_slip8_gtwy router, and connect them with a bidirectional 100_BaseT link ⇒
a. Expand the Application: Supported Profiles hierarchy ⇒ Set rows to 1 ⇒ Expand the
row 0 hierarchy ⇒ Set Profile Name to FTP_Profile.
b. Assign Client_ East to the Client Address attributes.
c. Edit the Application: Destination Preferences attribute as follows:
Set rows to 1 ⇒ Set Symbolic Name to FTP Server ⇒ Edit Actual Name
⇒ Set rows to 1 ⇒ In the new row, assign Server_West to the Name column.
In the network we just created we assumed a perfect network with no discarded packets. Also, we
disabled the fast retransmit and fast recovery techniques in TCP. To analyze the effects of discarded
packets and those congestion-control techniques, we will create two additional scenarios.
1. Select Duplicate Scenario from the Scenarios menu and give it the name Drop_NoFast
⇒ Click OK.
2. In the new scenario, right-click on the IP Cloud ⇒ Edit Attributes ⇒ Assign 0.05% to
the Packet Discard Ratio attribute.
3. Click OK and then save your project.
4. While you are still in the Drop_NoFast scenario, select Duplicate Scenario from the
Scenarios menu and give it the name Drop_Fast.
5. In the Drop_Fast scenario, right-click on Server_ West, which is inside the West subnet ⇒
Edit Attributes ⇒ Expand the TCP Parameters hierarchy ⇒ Enable the Fast
3. Click OK to run the three simulations. Depending on the speed of your processor, this may
take several minutes to complete.
4. After the three simulation runs complete, one for each scenario, click Close ⇒ Save your
project.
1. Switch to the Drop_NoFast scenario (the second one) and choose View Results from the
Results menu.
2. Fully expand the Object Statistics hierarchy and select the following two results:
Congestion Window Size (bytes) and Sent Segment Sequence Number (Figure 83).
3. Click Show. The resulting graphs should resemble the ones in Figure 84.
4. To zoom in on the details in the graph, click and drag your mouse to draw a rectangle, as
shown above.
5. The graph should be redrawn to resemble Figure 85.
Figure 38 Maps Network – II
6. Notice the Segment Sequence Number is almost flat with every drop in the congestion
window.
7. Close the View Results dialog box and select Compare Results from the Result menu.
8. Fully expand the Object Statistics hierarchy and select the following result: Sent
Segment Sequence Number (Figure 86).
Figure 39 Compare Results
9. Click Show. After zooming in, the resulting graph should resemble the one in Figure 87.
Ex.No : 11
Date :
Aim:
To establish a wireless LAN network and to study its performance by simulation.
Objective:
To create a wireless LAN network and to obtain the following statistics.
Global statistics FTP (Traffic sent , Traffic Recieved)
Wireless LAN(Throughput, Delay,Etc)
Node statistics Wireless LAN(Throughput, Delay,Etc)
Client FTP
Server FTP
Procedure:
Step1: Open the object panel in OPNET browser and select the following components from the
wireless_lan subtools.
Application Configuration‐1
Profile Configuration ‐1
Wireless Lan Router(Fixed)‐1
Wireless Server(Fixed) ‐1
Wireless Workstation(Fixed)‐4
Step 2:
Right click on application config and select edit attribute option and change the following fields:
Name: application
App.Def: Default
Step 3:
Right click on profile config and select edit attribute option and change the following fields:
Name: Profile
Profile config:set no of rows equal to 1
Profile name: FTP
Application column set: rows =1
Select file transfer (light)
Step4:
Right click on Router and select edit attribute option and change the following fields:
Name: Router
Step5:
Right click on workstation(choose similar nodes) and select edit attribute option and change the
following fields
Application(Supported Profiles) set no of rows=1
Select FTP.
Step6: Right click on server and select edit attribute option and change the following fields
Application(Supported Services) set no of rows=1
Select File transfer(light).
Step7:
Right click on OPNET workspace and select choose individual statistics
And select the statistics shown below:
Global Statistics:(Ftp,Wireless LAN)
Node Statistics: (Wireless Lan,Client Ftp, Server FTP).
Step 8:
Click run simulation button , set the simulation duration to 300 seconds and run the simulation.
Step9:
View the results.
Expt. No: 12
Title : Ethernet LAN and Protocols
Date :
Aim
The aim of this experiment is to study the performance of CSMA / CD Protocol using Wireshark Protocol
Analyzer.
Objectives
Doing this experiment, you will
• Understand how Packets are captured and displayed in the Protocol Analyzer
• Calculate Packet Length
• Calculate Port Type
• Draw flow graph of packet transmission
Equipment
1. Wireshark Protocol Analyzer Software – LAN User License.
2. PCs connected in a Local Area Network
Procedure
1. In Wireshark Simulator choose Capture > Start to open a window where you can enter
parameters for frame capturing. You can click Interface to choose the network interface
(Whether wired or wireless) to be used to capture frames.
2. Click OK to begin capturing. After the capturing has finished, you can view the individual
captured frames.
3. Once packet capturing is over click View > Packet Length to view the length of the packets.
4. Similarly calculate other parameters also.
Precautions
• Make sure that you choose the right interface for wired and wireless networked environment
• Make sure your pc either sends or receives some data
Record of Observations
• Record the length of Packets received
• Record the number and types of packets
Interpretation of results
• The length of the Packet received determines the types of packet being transmitted and
received.
Questions based on Experiment
1. What are the different types of packets that can be analyzed using Wireshark ?
OSI Model Layers
INTRODUCTION:
Virtually all networks in use today are based in some fashion on the
Open Systems Interconnection (OSI) standard. OSI was developed in 1984
by the International Organization for Standardization (ISO), a global
federation of national standards organizations representing approximately
130 countries.
The core of this standard is the OSI Reference Model, a set of seven layers that
define the different stages that data must go through to travel from one device to
another over a network. The Open Systems Interconnection Reference Model
(OSI Reference Model or OSI Model) is an abstract description for layered
communications and computer network protocol design. It was developed as part
of the Open Systems Interconnection (OSI) initiative. In its most basic form, it
divides network architecture into seven layers which, from top to bottom, are the
Application, Presentation, Session, Transport, Network, Data-Link, and Physical
Layers. It is therefore often referred to as the OSI Seven Layer Model.
A layer is a collection of conceptually similar functions that provide services to the
layer above it and receives service from the layer below it. For example, a layer
that provides error-free communications across a network provides the path needed
by applications above it, while it calls the next lower layer to send and receive
packets that make up the contents of the path.
History:
Think of the seven layers as the assembly line in the computer. At each
layer, certain things happen to the data that prepare it for the next layer. The seven
layers, which separate into two sets, are:
• Application Set:
Layer 7: Application - This is the layer that actually interacts with the operating
system or application whenever the user chooses to transfer files, read messages or
perform other network-related activities.
• Transport Set :
Layer 1: Physical - This is the level of the actual hardware. It defines the
physical characteristics of the network such as connections, voltage levels and
timing.
The application layer is the OSI layer closest to the end user, which means
that both the OSI application layer and the user interact directly with the software
application. This layer interacts with software applications that implement a
communicating component. Such application programs fall outside the scope of the
OSI model. Application layer functions typically include identifying
communication partners, determining resource availability, and synchronizing
communication. When identifying communication partners, the application layer
determines the identity and availability of communication partners for an
application with data to transmit. When determining resource availability, the
application layer must decide whether sufficient network resources for the
requested communication exist. In synchronizing communication, all
communication between applications requires cooperation that is managed by the
application layer. Some examples of application layer implementations include
Telnet, Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), and
Simple Mail Transfer Protocol (SMTP).
The Transport Layer provides transparent transfer of data between end users,
providing reliable data transfer services to the upper layers. The Transport Layer
controls the reliability of a given link through flow control,
segmentation/desegmentation, and error control. Some protocols are state and
connection oriented. This means that the Transport Layer can keep track of the
segments and retransmit those that fail.
Although not developed under the OSI Reference Model and not strictly
conforming to the OSI definition of the Transport Layer, the best known examples
of a Layer 4 protocol are the Transmission Control Protocol (TCP) and User
Datagram Protocol (UDP)
Of the actual OSI protocols, there are five classes of connection-mode
transport protocols ranging from class 0 (which is also known as TP0 and provides
the least error recovery) to class 4 (which is also known as TP4 and is designed for
less reliable networks, similar to the Internet). Class 0 contains no error recovery,
and was designed for use on network layers that provide error-free connections.
Class 4 is closest to TCP, although TCP contains functions, such as the graceful
close, which OSI assigns to the Session Layer. Also, all OSI TP connection-mode
protocol classes provide expedited data and preservation of record boundaries, both
of which TCP is incapable.
The Data Link Layer provides the functional and procedural means to
transfer data between network entities and to detect and possibly correct errors that
may occur in the Physical Layer. Originally, this layer was intended for point-to-
point and point-to-multipoint media, characteristic of wide area media in the
telephone system. Local area network architecture, which included broadcast-
capable multiaccess media, was developed independently of the ISO work, in IEEE
Project 802. IEEE work assumed sublayering and management functions not
required for WAN use. In modern practice, only error detection, not flow control
using sliding window, is present in modern data link protocols such as Point-to-
Point Protocol (PPP), and, on local area networks, the IEEE 802.2 LLC layer is not
used for most protocols on Ethernet, and, on other local area networks, its flow
control and acknowledgment mechanisms are rarely used. Sliding window flow
control and acknowledgment is used at the Transport Layer by protocols such as
TCP, but is still used in niches where X.25 offers performance advantages.
The ITU-T G.hn standard, which provides high-speed local area networking over
existing wires (power lines, phone lines and coaxial cables), includes a complete
Data Link Layer which provides both error correction and flow control by means
of a selective repeat Sliding Window Protocol.
Both WAN and LAN services arrange bits, from the Physical Layer, into
logical sequences called frames. Not all Physical Layer bits necessarily go into
frames, as some of these bits are purely intended for Physical Layer functions. For
example, every fifth bit of the FDDI bit stream is not used by the Layer.
The Physical Layer defines the electrical and physical specifications for
devices. In particular, it defines the relationship between a device and a physical
medium. This includes the layout of pins, voltages, cable specifications, Hubs,
repeaters, network adapters, Host Bus Adapters (HBAs used in Storage Area
Networks) and more.
To understand the function of the Physical Layer in contrast to the functions
of the Data Link Layer, think of the Physical Layer as concerned primarily with the
interaction of a single device with a medium, where the Data Link Layer is
concerned more with the interactions of multiple devices (i.e., at least two) with a
shared medium. The Physical Layer will tell one device how to transmit to the
medium, and another device how to receive from it (in most cases it does not tell
the device how to connect to the medium). Standards such as RS-232 do use
physical wires to control access to the medium.
The major functions and services performed by the Physical Layer are:--
• Establishment and termination of a connection to a communications
medium.
• Participation in the process whereby the communication resources are
effectively shared among multiple users. For example, contention resolution
and flow control.
• Modulation, or conversion between the representation of digital data in user
equipment and the corresponding signals transmitted over a communications
channel. These are signals operating over the physical cabling (such as
copper and optical fiber) or over a radio link.
Parallel SCSI buses operate in this layer, although it must be remembered that
the logical SCSI protocol is a Transport Layer protocol that runs over this bus.
Various Physical Layer Ethernet standards are also in this layer; Ethernet
incorporates both this layer and the Data Link Layer. The same applies to other
local-area networks, such as Token ring, FDDI, ITU-T G.hn and IEEE 802.11, as
well as personal area networks such as Bluetooth and IEEE 802.15.4.
Tabulation: