0% found this document useful (0 votes)
219 views112 pages

Observation Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
219 views112 pages

Observation Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 112

Observation Manual

Computer Networks Lab

1 Networks Lab – Observation Manual


The information contained in this document represents the current view of tetcos on the
issues discussed as of the date of publication. Because tetcos must respond to changing
market conditions, it should not be interpreted to be a commitment on the part of tetcos,
and tetcos cannot guarantee the accuracy of any information presented after the date of
publication.

This manual is for informational purposes only. TETCOS MAKES NO WARRANTIES,


EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
DOCUMENT.

Warning! DO NOT COPY

Copyright in the whole and every part of this manual belongs to tetcos and may not be
used, sold, transferred, copied or reproduced in whole or in part in any manner or in any
media to any person, without the prior written consent of tetcos. If you use this manual
you do so at your own risk and on the understanding that tetcos shall not be liable for any
loss or damage of any kind.

Tetcos may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in
any written license agreement from Tetcos, the furnishing of this document does not give
you any license to these patents, trademarks, copyrights, or other intellectual property.
Unless otherwise noted, the example companies, organizations, products, domain names,
e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no
association with any real company, organization, product, domain name, email address,
logo, person, place, or event is intended or should be inferred.

Aug 2010 tetcos. All rights reserved.

All trademarks are property of their respective owner.

Contact us at –

TETCOS

214, 39th A Cross, 7th Main, 5th Block Jayanagar,

Bangalore-560 041, Karnataka, INDIA. Phone: + 91 80 2663 0624

E-Mail: [email protected]

Visit: www.tetcos.com

2 Networks Lab – Observation Manual


Table of Contents

1. Experiment 1: …………………………….4
Analyzing Number of Transmitting Nodes vs. Collision count,
Mean Delay for an Ethernet LAN

2. Experiment 2: ……………………………15
Analyzing Bus vs. Star – Switch with respect to number of collisions
(for a fixed number of transmitting nodes) for Ethernet LAN

3. Experiment 3: …………………………...29
Analyzing the performance of Token Ring with Number of Nodes vs.
Response Time, Mean Delay using NetSim

4. Experiment 4: …………………………….43
Comparing the Throughput and Normalized Throughput for Token Ring
and Token Bus protocols for different transmitting nodes

5. Experiment 5: …………………………….54
Comparing CSMA/CA vs. CSMA/CD protocol (for a fixed number
of transmitting nodes)

6. Experiment 6: …………………………….71
Analyzing the difference between uni-cast and broadcast
transmission (for a fixed number of transmitting nodes)

7. Experiment 7: …………………………….81
Verification of Stop and Wait protocol

8. Experiment 8: ..…………………………..90
Verification of Go Back N protocol

9. Experiment 9: …………………………….95
Verification of Selective Repeat Protocol

10. Experiment 10: …………………………….103


Verification of distance vector routing algorithm

11. Experiment 11: …………………………….107


Verification of Link state routing Algorithm

12. Experiment 12: …………………………….110


Socket Programming

3 Networks Lab – Observation Manual


Experiment 1: Analyzing Number of Transmitting Nodes vs. Collision
count, Mean Delay for an Ethernet LAN

Introduction:
Ethernet is a LAN (Local area Network) protocol operating at the MAC (Medium
Access Control) layer. Ethernet has been standardized as per IEEE 802.3. The underlying
protocol in Ethernet is known as the CSMA / CD – Carrier Sense Multiple Access /
Collision Detection. The working of the Ethernet protocol is as explained below,
• A node which has data to transmit senses the channel,
• If the channel is idle then the data is transmitted
• If the channel is busy then the station defers transmission until the channel is
sensed to be idle and then date is immediately transmitted.
• If more than one node starts data transmission at the same time, the data collides.
This collision is heard by the transmitting nodes which enter into contention
phase.
• The contending nodes resolve contention using an algorithm called truncated
binary exponential back off.

Performance Metrics:
Some of the important performance metrics which are recorded during simulation
are given below.

Utilization(%):
Also called as Throughput(%). Fraction of network capacity devoted to carrying
payload of the successful packets / frames /cells. In other words, it is the ratio of
current network traffic to the maximum traffic the network can handle. It is an
important indicator of the bandwidth usage in the network.
Formula :
Utilization (%) = Effective Utilization (%) + Overhead (%) + Loss (%).

Effective Utilization (%):


Also called as Normalized Throughput(%). Fraction of network capacity devoted
to carrying payload of the successful packets/frames/cells.
Formula:
Network Effective Utilization (%) = (Total number of payload transmitted(bits) in
the Network / Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(μsec) * Network Capacity (Mbps).

4 Networks Lab – Observation Manual


Overhead (%):
Fraction of network capacity devoted to carrying Overhead of the successful
packets / frames/cells.
Formula:
Network Overhead = (Total number of overhead transmitted (bits) in the Network
/Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps)

Loss (%):
Fraction of network capacity devoted to carrying error packets/frames/cells. This
includes both payload and overhead of these packets.
Formula:
Network Loss (%) = ( Number of errored bits in the Network / Maximum number
of bits that could have been transmitted ) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps).

Mean delay (Micro Second/Frame):


Single packet delay is also called as Mean delay. Mean time a frame waits at a
station before being successfully transmitted (queuing time and medium access
time) and the transmission time per frame.
Formula:
Mean Delay (Micro Second/Frame) = (Queuing Time + Medium Access Time +
Transmission Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Response Time (Micro Second / Frame):


Also called as Service Time, Sum of medium access time and transmission time
per frame.
Formula:
Response Time (Micro Second/Frame) = (Medium Access Time + Transmission
Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Collision Count(s):
Total number of collisions occurring in a network.

The definitions of all parameters / variables are available in NetSim.

1(a). Simulation
Study of Number of Transmitting Nodes vs. Collision count, Mean Delay for an
Ethernet LAN (NetSim)

5 Networks Lab – Observation Manual


1(b). Real time
Real time files transfer and study of application and network performance.
Compare collision count for 1 client 1 server, and for 2 client 2 server (LAN
Trainer-Bus Topology).

Hardware / Software Requirements:


1. NetSim Academic Version simulation software (for simulation)
2. LAN trainer (Model LT 01) (for real time)
3. LT Soft – Operational software for LAN Trainer (for real time)

Sample Questions
1. Measure and plot the variation in Mean Delay against Number of Transmitting
Nodes (varying from 1 to 6) using NetSim. Comment on the result.
2. Measure and plot the variation of collision count against Number of
Transmitting Nodes (varying from 1 to 6) using NetSim. Comment on the result.

Experiment 1(a):
Analyzing Number of Transmitting Nodes vs. Collision count, Mean Delay for an
Ethernet LAN

Description:
To begin with the experiment, run NetSim

Fig 1.1

Click on Simulation, select New, then LAN network, then Ethernet protocol and
then select Traditional from the sub menu. The simulation environment is now open.

6 Networks Lab – Observation Manual


Click here
to Validate

Click here
to Simulate

Fig 1.2

i. Drag and drop the hub on the environment (depending on the number of nodes
required). 8 is the maximum number of nodes which can be connected to one hub.
ii. Drag and drop the node on the hub. Two is the minimum number of nodes
required for transmission to take place. This scenario would look like the one
shown.

Fig 1.3

In fig 1.3, right click on the 1st node and the following dialog box will appear.

7 Networks Lab – Observation Manual


Set Transmission
Type as Broadcast

Select Traffic Type


as Data

Fig 1.4

On selecting Traffic type as Data, you will get the following window. In the
window shown below set Mean interval time as 1177 micro seconds, so that generation
rate will be 10 Mbps approximately.

Set Distribution
as Constant

Set Distribution
as Constant
Set Mean Inter
Arrival Time as
1177 micro sec

Click OK

Fig 1.5

8 Networks Lab – Observation Manual


Click OK to close the dialog box.

Then, In Fig 1.4, click Accept to close the window.

Now you will get back the simulation environment. Here on the left panel we have
validate button followed by simulation button. First validate the experiment by clicking
validate button and then when you click simulate button a small window will appear, here
set the simulation time to 10 seconds and click ok.

Then, you will see the performance metrics screen as shown below.

Click here to
Save

Click here to
go to NetSim
Analytics

Click here to
Export data to
Excel

Click here to
View Network

Fig 1.6

Here click Save button to save the experiment.


Save:
Give any name of your choice to save it and if you want to give any comments
you can give or else click No for comments and proceed to save your experiment by
clicking OK button.

When Save button is clicked, a dialog box will appear as shown below.

9 Networks Lab – Observation Manual


Click OK to close

Fig 1.7
An example is shown in the above figure.
.
Retrieve:
Rather then creating new scenarios each time, previous scenarios can be opened
and modified.
After saving the experiment, click Simulation, Open and select Network from the
sub menu on the menu bar.
A Dialog box will appear as shown in the figure below.

Select Network

Select Protocol
Select Experiment

Fig 1.8

10 Networks Lab – Observation Manual


Select LAN, Traditional Ethernet-Protocol and the experiment which you have
saved for the Sample from fig 1.8. Click Ok button you will obtain the initial scenario.

Set the Point to Point traffic on one additional node (total of 2 nodes), Click
Validate and Simulate. Follow the same procedure increasing the number of Point to
Point nodes by 1 every time, till 6 nodes generate traffic. Save the experiments each time.

Results (to be filled up by the students):


To view the output by using NetSim the Sample experiments need to be added
onto the Analytics interface. Given below is the navigation for analytics -“Simulation Æ
Analytics”.
You will get following Analytics screen.

Select LAN
Select Delay

Select the
experiments for
which you have to
make comparison

Fig 1.9

Select the experiments by selecting your Traditional Ethernet Protocols


experiments.
Select the Experiments (Note: Click on one experiment after the other to add
multiple experiments onto the Analytics interface).
Click on “Export to .csv” which is available in Metrics Screen to export data to
excel sheet, using the Chart Wizard option in excel sheet plot a line graph with X axis as
Number of nodes and Y axis as Collision Count. The Graph below shows the exponential
increase in the collision count as the number of transmitting nodes increases.

11 Networks Lab – Observation Manual


Fig 1.10
Inference (to be filled up by the students):
As per the working of the Ethernet protocol if more than one node transmits data
at the same time data collisions occur, which is detected by the transmitting nodes. As the
number of transmitting nodes increases the total traffic increases. This leads to increased
contention for the medium, which directly results in higher number of collisions. More
collisions mean more back-offs and more retransmits. This directly increases the delays
experienced.

Experiment 1(b):
Real time file transfer and study of application and network performance. Compare
collision count for 1 Client 1 Server and for 2 Clients 2 Servers. (LAN Trainer)

Description:
To begin with the experiment, run Lan Trainer

Fig 1.11 Fig 1.12

Note: To view the details on how to proceed with the experiments click on the question
mark. This is the “Help” section for the respective protocol.

12 Networks Lab – Observation Manual


The systems required for file transmission should have LAN connection. Move
the cursor over the icon to check for LAN connection as shown above. If the required
system is not connected then go to Start Menu>>Right click at My Network
places>>Select Properties>>Click the icon to Enable LAN.

Select BUS topology to perform this experiment. For Bus topology, click on
in the file panel. Connect the cable from the system to the required topology in the kit.
Turn on the LT Kit by turning the manual switch to the Bus topology.

User should select one system/computer as the Server and one system as the
Client. Transfer the file between the two systems through the LAN Trainer and save the
received metrics.

Server Client
Fig 1.13

At the Server, 1500 as value for Packet Size (Bytes) and click Send. This is the
standard size of Ethernet Payload.

At the Client:

• Enter the Server IP Address.


• Request for File: Enter the location where the file exists in the Server system
(Mention the name of the file along with the path. Eg: C:\test.txt)
• Save in (Path): Click browse and select the file path where you want to save
(Do not give a file name. The file will be stored in the original name as it was in
the server)
• Inter Packet Gap (ms): Select 0 (Zero)
• Select the correct adapter and click Receive. (If an incorrect adapter is select, an
error message will be shown)

13 Networks Lab – Observation Manual


First perform the experiment when one pair of system transmits and receives.
Then perform the experiment with two pairs of client-servers simultaneously sending and
receiving files.

Note:
Only after the Server clicks Send, the Client should click Receive.

Results (to be filled up by the students):

Client/ Server Pair Vs Packets Collided

350

300

250
Packets Collided

200

Packets Collided

150

100

50

0
1 2
Client/ Server Pair

Fig 1.14

Inference (to be filled up by the students):


The number of collisions when 1 client 1 server operate is zero. When there are
multiple pairs of client-servers operating increase in collisions are observed. This is
because the file transfers occur in a shared medium. The number of collisions depends on
the size of the files being transferred.

14 Networks Lab – Observation Manual


Experiment 2: Analyzing Bus vs. Star-Switch with respect to number of
collisions (for a fixed number of transmitting nodes) for Ethernet LAN

Introduction:
Ethernet is a LAN (Local area Network) protocol operating at the MAC (Medium
Access Control) layer. Ethernet has been standardized as per IEEE 802.3. The underlying
protocol in Ethernet is known as the CSMA / CD – Carrier Sense Multiple Access /
Collision Detection. The working of the Ethernet protocol is as explained below,
• A node which has data to transmit senses the channel,
• If the channel is idle then, the data is transmitted
• If the channel is busy then, the station defers transmission until the channel is
sensed to be idle and then immediately transmitted.
• If more than one node starts data transmission at the same time, the data collides.
This collision is heard by the transmitting nodes which enter into contention
phase.
• The contending nodes resolve contention using an algorithm called truncated
binary exponential back off.

Characteristics of Traditional Ethernet:

• IEEE 802.3i Standard for twisted pair cable


• IEEE 802.3j Standard for twisted pair cable
• BUS Topology
• Data Rate at 10 Mbps only.
• Transmission Mode: Half Duplex
• CSMA/CD algorithm
• Device: Hub

Characteristics of Fast Ethernet:

• IEEE 802.3u Standard


• Star Topology
• Data Rate at 10/100 Mbps.
• Transmission Mode: Full Duplex
• CSMA/CD algorithm
• Device: Switch

Performance Metrics:
Some of the important performance metrics which are recorded during simulation
are given below.

15 Networks Lab – Observation Manual


Utilization(%):
Also called as Throughput(%). Fraction of network capacity devoted to carrying
payload of the successful packets / frames /cells. In other words, it is the ratio of
current network traffic to the maximum traffic the network can handle. It is an
important indicator of the bandwidth usage in the network.
Formula :
Utilization (%) = Effective Utilization (%) + Overhead (%) + Loss (%).

Effective Utilization (%):


Also called as Normalized Throughput(%). Fraction of network capacity devoted
to carrying payload of the successful packets/frames/cells.
Formula:
Network Effective Utilization (%) = (Total number of payload transmitted(bits) in
the Network / Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(μsec) * Network Capacity (Mbps).

Overhead (%):
Fraction of network capacity devoted to carrying Overhead of the successful
packets / frames/cells.
Formula:
Network Overhead = (Total number of overhead transmitted (bits) in the Network
/Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps)

Loss (%):
Fraction of network capacity devoted to carrying error packets/frames/cells. This
includes both payload and overhead of these packets.
Formula:
Network Loss (%) = ( Number of errored bits in the Network / Maximum number
of bits that could have been transmitted ) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps).

Mean delay (Micro Second/Frame):


Single packet delay is also called as Mean delay. Mean time a frame waits at a
station before being successfully transmitted (queuing time and medium access
time) and the transmission time per frame.

16 Networks Lab – Observation Manual


Formula:
Mean Delay (Micro Second/Frame) = (Queuing Time + Medium Access Time +
Transmission Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Response Time (Micro Second / Frame):


Also called as Service Time, Sum of medium access time and transmission time
per frame.
Formula:
Response Time (Micro Second/Frame) = (Medium Access Time + Transmission
Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Collision Count(s):
Total number of collisions occurring in a network.
The definitions of all parameters / variables are available in NetSim.

2(a). Simulation
Study of Bus vs. Star – Switch with respect to number of collisions (for a fixed
number of transmitting nodes) (NetSim)

2(b). Real time


Compare throughput and collision count for Bus topology vs. Star Topology
(LAN Trainer)

Hardware / Software Requirements:


1. NetSim Academic Version simulation software (for simulation)
2. LAN trainer (Model LT 01) (for real time)
3. LT Soft – Operational software for LAN Trainer (for real time)

Sample Questions:
1. Compare and contrast the number of collisions between a Traditional (Hub - Bus)
and Fast (Switch-Star) network with 2 nodes broadcasting (Using NetSim).

Description:
To begin with the experiment, run NetSim

17 Networks Lab – Observation Manual


Fig 2.1

Click on Simulation, select New, then LAN network, then Ethernet protocol and then
select Traditional from the sub menu. The simulation environment is now open.

Click here
to Validate

Click here
to Simulate

Fig 2.2

iii. Drag and drop the hub on the environment (depending on the number of nodes
required). 8 is the maximum number of nodes which can be connected to one hub.
iv. Drag and drop the node on the hub. Two is the minimum number of nodes
required for transmission to take place. This scenario would look like the one
shown below.

18 Networks Lab – Observation Manual


Fig 2.3

In fig 2.3, right click on the both the nodes and the following dialog box will appear.

Set Transmission
Type as Point to Point

Select Traffic Type


as Data

Fig 2.4

In fig 2.4 select Point to Point from the transmission Type option.
On selecting Traffic type as Data, you will get the following window. In the
window shown below set Mean interval time as 1177 micro seconds, so that generation
rate will be 10 Mbps approximately.

19 Networks Lab – Observation Manual


Set Distribution
as Constant

Set Distribution
as Constant
Set Mean Inter
Arrival Time as
1177 micro sec

Click OK
Fig 2.5

Click Accept to close the Properties node 1 window.


Now you will get back the simulation environment. Here on the left panel we
have validate button followed by simulation button. First validate the experiment by
clicking validate button and then when you click simulate button a small window will
appear, here set the simulation time to 10 seconds and click ok.

Then, you will see the performance metrics screen as shown below.
.
Click here to
Save
experiment

Click here to
go to NetSim
Analytics

Click here to
Export data to
Excel

Click here to
View Network

Fig 2.6

20 Networks Lab – Observation Manual


Here click Save button to save the experiment.

Save:
Give any name of your choice to save it and if you want to give any comments
you can give or else click No for comments and proceed to save your experiment by
clicking OK button.

Click OK

Fig 2.7

An example is shown in the above figure.

For Star- Switch experiment, open NetSim

Fig 2.8

Click on Simulation, select New, then LAN network, then Ethernet protocol and
then select Fast from the sub menu. The simulation environment is now open.

21 Networks Lab – Observation Manual


Click here
to Validate
Click here
to Simulate

Fig 2.9

v. Drag and drop the switch on the environment (depending on the number of nodes
required). 8 is the maximum number of nodes which can be connected to one
switch.
vi. Drag and drop the node on the switch. Two is the minimum number of nodes
required for transmission to take place. This scenario would look like the one
shown below.

Fig 2.10

In fig 2.10, right click on the both nodes and the following dialog box will appear.

22 Networks Lab – Observation Manual


Select Transmission
Type as Point to Point

Select Traffic Type


as Data

Fig 2.11
On selecting Traffic type as Data, you will get the following window. In the
window shown below set Mean interval time as 1177 micro seconds, so that generation
rate will be 10 Mbps approximately.

Select Distribution
as Constant

Select Distribution
as Constant

Set Mean Inter


Arrival Time as
1177 micro secs

Click OK

Fig 2.12

23 Networks Lab – Observation Manual


Click Accept to close the Properties node 1 window.

Now you will get back the simulation environment. Here on the left panel we
have validate button followed by simulation button. First validate the experiment by
clicking validate button and then when you click simulate button a small window will
appear, here set the simulation time to 10 seconds and click ok.

Then, you will see the performance metrics screen as shown below.
.

Click here to
Save experiment

Click here to
go to NetSim
Analytics

Click here to
Export data to
Excel

Click here to
View Network

Fig 2.13

Here click Save button to save the experiment.

Save:
Give any name of your choice to save it and if you want to give any comments
you can give or else click No for comments and proceed to save your experiment by
clicking OK button.

24 Networks Lab – Observation Manual


Click OK to close

Fig 2.14

An example is shown in the above figure.

Analyze and compare results between an experiment done in Traditional (Hub)


and Fast (Switch).

Result (to be filled up by the students):

To view the output by using NetSim the Sample experiments need to be added
onto the Analytics interface. Given below is the navigation for analytics -“Simulation Æ
Analytics”.
Select the experiments by selecting your Fast Ethernet Protocols(STAR topology)
and Traditional Ethernet Protocols (BUS topology) experiments.
Select the Experiments (Note: Click on one experiment after the other to add
multiple experiments onto the Analytics interface).
Click on “Export to .csv” which is available in Metrics Screen to export data to
Excel sheet, using the Chart Wizard option in excel sheet plot a line graph with X axis as
topologies (STAR and BUS) and Y axis as Collision Count.

25 Networks Lab – Observation Manual


Topology Vs Collision Count

1800
1600
Collision Count

1400
1200
1000
Collision Count
800
600
400
200
0
BUS STAR
Topology

Fig 2.15
Inference (to be filled up by the students):
The difference between Traditional (hub) and Fast (switch) can be noted from this graph,
for a fixed number of transmitting nodes the collision count is high for hub whereas for
switch it is zero. This is because hub is a shared medium where as switch has collision
separated domains.

Experiment 2(b):
Compare throughput for Bus topology vs. Star Topology (LAN Trainer)

Description:

To begin with the experiment, run LAN Trainer.

Fig 2.16

To view the details on how to proceed with the experiments click on the question
mark. This is the “Help” section for the respective protocol.

26 Networks Lab – Observation Manual


To select Bus topology, click on in the file panel. User should select one
system/computer as the Server and one system as the Client.

Server Client
Fig 2.17

At the Server, 1500 as value for Packet Size (Bytes) and click Send. This is the
standard size of Ethernet Payload.

At the Client:

• Enter the Server IP Address.


• Request for File: Enter the location where the file exists in the Server system
(Mention the name of the file along with the path. Eg: C:\test.txt)
• Save in (Path): Click browse and select the file path where you want to save
(Do not give a file name. The file will be stored in the original name as it was in
the server)
• Inter Packet Gap (ms): Select 0 (Zero)
• Select the correct adapter and click Receive. (If an incorrect adapter is select, an
error message will be shown)
• Export the metrics table to excel.

For Star topology perform the experiment as given for the bus topology. The
cable should be connected to star topology in the kit.

From the metrics obtained at the receiver side export the values to the excel sheet.
Now, compare the throughput and collision count for the Bus and Star topology from the
values obtained in the excel sheet.

27 Networks Lab – Observation Manual


Note:
After the Server sets the value for the packet size, one should wait for the Client
to enter in all the fields, like required address etc. Then once the Client is ready, the
Server should click Send and the receiver should click Receive.

Depending on the experiment connect the cable from the system to the required
topology in the kit. Turn on the LT Kit by turning the manual switch to the Bus topology
or Star topology.

Results (to be filled up by the students):

100 94.176
90
80
70
Throughput

60
50
40
30
20
8.808
10
0
Bus Star

Fig 2.18

Inference (to be filled up by the students):


Bus topology operates at 10 Mbps while Star topology operates at 100 Mbps. Star
topology also operates at a higher efficiency than bus topology. This is because Bus
topology is a shared medium where as star topology separates the collision domains.

28 Networks Lab – Observation Manual


Experiment 3: Analyzing the performance of Token Ring with Number
of Nodes vs. Response Time, Mean Delay using NetSim

Introduction:
Token ring is a LAN protocol operating in the MAC layer. Token ring is
standardized as per IEEE 802.5. Token ring can operate at speeds of 4mbps and 16 mbps.
The operation of token ring is as follows

When there is no traffic on the network a simple 3-byte token circulates the ring.
If the token is free (not reserved by a station of higher priority as explained later), then
the station which prefers to transmit data may seize the token and start sending the data
frame. As the frame travels around the ring ach station examines the destination address
and is either forwarded (if the recipient is another node) or copied. After copying data,
the four bits of the last byte is changed. This packet then continues around the ring till it
reaches the originating station. After the frame makes a round trip the sender receives the
frame and releases a new token onto the ring.

Performance Metrics:
Some of the important performance metrics which are recorded during simulation
are given below.

Utilization(%):
Also called as Throughput(%). Fraction of network capacity devoted to carrying
payload of the successful packets / frames /cells. In other words, it is the ratio of
current network traffic to the maximum traffic the network can handle. It is an
important indicator of the bandwidth usage in the network.
Formula :
Utilization (%) = Effective Utilization (%) + Overhead (%) + Loss (%).

Effective Utilization (%):


Also called as Normalized Throughput(%). Fraction of network capacity devoted
to carrying payload of the successful packets/frames/cells.
Formula:
Network Effective Utilization (%) = (Total number of payload transmitted(bits) in
the Network / Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(μsec) * Network Capacity (Mbps).

Overhead (%):

29 Networks Lab – Observation Manual


Fraction of network capacity devoted to carrying Overhead of the successful
packets / frames/cells.
Formula:
Network Overhead = (Total number of overhead transmitted (bits) in the Network
/Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps)

Loss (%):
Fraction of network capacity devoted to carrying error packets/frames/cells. This
includes both payload and overhead of these packets.
Formula:
Network Loss (%) = ( Number of errored bits in the Network / Maximum number
of bits that could have been transmitted ) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps).

Mean delay (Micro Second/Frame):


Single packet delay is also called as Mean delay. Mean time a frame waits at a
station before being successfully transmitted (queuing time and medium access
time) and the transmission time per frame.
Formula:
Mean Delay (Micro Second/Frame) = (Queuing Time + Medium Access Time +
Transmission Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Response Time (Micro Second / Frame):


Also called as Service Time, Sum of medium access time and transmission time
per frame.
Formula:
Response Time (Micro Second/Frame) = (Medium Access Time + Transmission
Time) / (Pay Load Delivered / Maximum Data Size per Frame).

All other definitions of parameters / variables are available in NetSim.

3(a). Simulation:
Study the performance of Token Ring with Number of Nodes vs. Response Time, Mean
Delay (NetSim).

3(b). Real time:


Increase the number of nodes in a token ring network and transfer a file between a client
– server and observe throughput (LAN Trainer).

30 Networks Lab – Observation Manual


Hardware / Software Requirements:
1. NetSim Academic Version simulation software (for simulation)
2. LAN trainer (Model LT 01) (for real time)
3. LT Soft – Operational software for LAN Trainer (for real time)

Sample Questions:
1. Measure and plot the variation in Mean Delay, Reponse time and Throughput
against Number of Transmitting Nodes (varying from 1 to 8) using NetSim.
Comment on the result.

Experiment 3(a):
Study the performance of Token Ring with Number of Nodes vs. Response Time, Mean
Delay (NetSim).

Description:
To begin with the experiment, open NetSim

Fig 3.1

Click on Simulation, select LAN network and Token Ring from the sub menu. The
simulation environment is now open.

31 Networks Lab – Observation Manual


Click here
to Validate

Click here
to Simulate

Fig 3.2

i. Drag and drop the concentrator on the environment (depending on the number of
nodes required). 8 is the maximum number of nodes which can be connected to
the concentrator. Here, in some cases two concentrators are required.
ii. Drag and drop the nodes to the concentrator only. Two is the minimum number of
nodes required for transmission to take place.
iii. For a single concentrator click at the ends to make a ring connection. Whereas for
two or more concentrators, click at the ends of each concentrators to make a ring
connection.

Single Concentrator Multiple concentrators

Fig 3.3 Fig 3.4

32 Networks Lab – Observation Manual


In Scenario using Single concentrator, the ring shape should be formed within the
concentrator, whereas in Scenario using two concentrators, the concentrators should be
interconnected as shown in fig 3.3 & 3.4.

For fig 3.1, right click on the 1st node and select Point to Point from the
transmission option. Right click on the 2nd node and again set the traffic to Point to point.

Set Transmission Type


as Point to Point
Set Traffic Type as
Data

Fig3.5

On selecting Traffic type as Data, you will get the following window. In the
window shown below set Mean interval time as 8943 micro seconds, so that Generation
Rate will be 16 Mbps exactly.

33 Networks Lab – Observation Manual


Select Distribution
as Constant
Data size 17886

Select Distribution
as Constant
Set Mean interval
time as 8943 micro
seconds

Fig 3.6

Click Accept to close the Properties node 1 window.

Now you will get back the simulation environment. Here on the left panel we
have validate button followed by simulation button. First validate the experiment by
clicking validate button and then when you click simulate button a small window will
appear, here set the simulation time to 10 seconds and click ok.

Then, you will see the performance metrics screen as shown below.

34 Networks Lab – Observation Manual


Click here to
Save experiment

Click here to
go to NetSim
Analytics

Click here to
Export data to
Excel

Click here to
View Network
Fig 3.7

Here click Save button to save the experiment.

Save:
Give any name of your choice to save it and if you want to give any comments
you can give or else click No for comments and proceed to save your experiment by
clicking OK button.

Click Ok

Fig 3.8

35 Networks Lab – Observation Manual


An example is shown in the above figure.

Retrieve:
Rather then creating new scenarios each time, earlier scenarios can be modified
after saving the experiment. Click simulation and Open from the sub menu on the file
panel.

Select the Network

Select Topology
Select the
experiment

Fig 3.9

Select LAN, Token Ring- Protocol, token Ring Topology and the experiment
which you have saved for the Sample from fig a. Click Ok button you will obtain the
initial scenario.

Set the Point to Point traffic on one additional node (total of 2 nodes), Click
Validate and Simulate. Follow the same procedure increasing the number of Point to
Point nodes by 1 every time, till 6 nodes generate traffic.

Results (to be filled up by the students):


To view the output by using NetSim the Sample experiments need to be added
onto the Analytics interface. Given below is the navigation for analytics -“Simulation Æ
Analytics”.
You will get following Analytics screen.
Select the experiments by selecting your Token Ring Protocols experiments.

36 Networks Lab – Observation Manual


Select the Experiments (Note: Click on one experiment after the other to add
multiple experiments onto the Analytics interface).

Select LAN

Select Delay

Select the
experiments
for which you
have to make
comparison

Fig 3.10

Click on “Export to .csv” which is available in Metrics Screen to export data to


Excel sheet. Calculate the Response time using the formula given under the Performance
metrics. Select the Chart Wizard option in excel sheet plot a line graph with X axis as
Number of nodes and Y axis as Response time. The Graph below shows the exponential
increase in the response time as the number of transmitting nodes increases.

Response time vs No. of Transmitting Nodes

60
Response time (ms)

50
40
30
20
10
0
2 3 4 5 6
No. of Transmitting nodes

Delay

Fig 3.11

37 Networks Lab – Observation Manual


Inference (to be filled up by the students):
Since token ring protocol operates on a ring topology the data is transmitted in the
network hop by hop. Node 1 sends data to node 2 if node 2 is the destination it sends the
ACK to node 3 and node 3 sends the ACK to node 4 and node 4 sends the ACK to node
1. If the number of nodes increase in the ring time taken for the data to reach the
destination and the ACK to the source will increase which is reflected in delay.

Experiment 3(b):
Increase the number of nodes in a Token Ring network and transfer a file between a
client – server and observe throughput (LAN Trainer).

Description:

To begin with the experiment, run LAN Trainer LT 01

Fig 3.12

For Token Ring, select from the file panel. User should select one
system/computer as the Server and the other system as the Client.

Server Client
Fig 3.13

File Transfer between two systems:


Connect system 1 and system 2 as Ring, so system 1 is the neighbour for system
2.

38 Networks Lab – Observation Manual


Fig 3.14

Enter the IP address of the neighbour for the system and click “Insert into the
Ring”.Set the Data Rate as 4Mbps.

At the Client, enter the File path of the server, select the file path where file has to
be saved and enter the Server’s IP address, click Receive.

Note: After the transfer of file between the systems if you want to receive another file
from the other system click Receive Again.

At the Server, user has to just click send.

File Transfer increasing the number of nodes:

Now, connect system 1, system 2 and system 3 as a Ring. Here, system 1 is the
transmitter, system 2 as the receiver and system 3 is in idle state.

Fig 3.15

At system 1, enter the neighbour IP address of system 2 and click “Insert into the Ring”.
At system 2, enter the neighbour IP address of system 3 and click “Insert into the Ring”.

39 Networks Lab – Observation Manual


At system 3, enter the neighbour IP address of system 1 and click “Insert into the Ring”.
Set the Data Rate as 4Mbps.

At the Client, enter the File path of the server, select the file path where file has to be
saved and enter the Server’s IP address, click Receive.

Note: After the transfer of file between the systems if you want to receive another file
from the other system click Receive Again.

At the Server, user has to just click send.

Important:
Only 1 system will act as the Server and the 2nd system as Client. The 3rd system
will just have to enter the neighbour IP address, click “Insert into the Ring” and wait for
the file transfer to take place.

File Transfer increasing the number of nodes:


Now, connect system 1, system 2 and system 3 as a Ring. Here, system 1 is the
transmitter, system 2 as the receiver; system 3 and system 4 are in idle state.

Fig 3.16

At system 1, enter the neighbour IP address of system 2 and click “Insert into the Ring”.
At system 2, enter the neighbour IP address of system 3 and click “Insert into the Ring”.
At system 3, enter the neighbour IP address of system 4 and click “Insert into the Ring”.
At system 4, enter the neighbour IP address of system 1 and click “Insert into the Ring”.

Set the Data Rate as 4Mbps.

Note: After the transfer of file between the systems if you want to receive another file
from the other system click Receive Again.

40 Networks Lab – Observation Manual


At the Client, enter the File path of the server, select the file path where file has to
be saved and enter the Server’s IP address, click Receive.

Important:
Only 1 system will act as the Server and the 2nd system as Client. The 3rd and 4th
system will just have to enter the neighbour IP address and click “Insert into the Ring”
and wait for the file transfer to take place.

At the Server, user has to just click send.

From the metrics obtained at the receiver side export the values to the excel sheet
and observe the throughput for the Token Ring network.

Fig 3.17

Note:
After the Server sets the value, it should wait for the Client to set up the required
address etc. Then, only after the Client is ready, the Server should click Send and the
receiver should click Receive.

Depending on the experiment connect the cable from the system to the required
topology in the kit. Turn on the LT Kit by turning the manual switch to the Ring
topology.

Results (to be filled up by the students):

41 Networks Lab – Observation Manual


Comparison of Throughput

2
1.75
1.5
Throughput

1.13
1
0.8
0.5

0
2 3 4
Number of Nodes

Token Ring

Fig 3.18

Inference (to be filled up by the students):


The result above is obtained for 10Mbps.

Since token ring protocol operates on a ring topology the data is transmitted in the
network hop by hop. i.e node 1 sends data to node 2 if node 2 is the destination it sends
the ack to node 3 and node 3 sends the ack to node 4 and node 4 sends the ack to node 1.
if the number of nodes increase in the ring time taken for the data to reach the destination
and the ack to the source will increase which is reflected in delay.

42 Networks Lab – Observation Manual


Experiment 4: Comparing the Throughput and Normalized
Throughput for Token Ring and Token Bus protocols for different
transmitting nodes using NetSim.

Introduction:
Token bus is a LAN protocol operating in the MAC layer. Token bus is
standardized as per IEEE 802.4. Token bus can operate at speeds of 5Mbps, 10 Mbps and
20 Mbps. The operation of token bus is as follows

Unlike token ring, in token bus the ring topology is virtually created and
maintained by the protocol. A node can receive data even if it is not part of the virtual
ring. A node joins the virtual ring only if it has data to transmit. In token bus, data is
transmitted to the destination node only where as other control frames are forwarded hop
by hop. After each data transmission, a solicit_successsor control frame is transmitted
which reduces the performance of the protocol.

Performance Metrics:
Some of the important performance metrics which are recorded during simulation
are given below.

Utilization(%):
Also called as Throughput(%). Fraction of network capacity devoted to carrying
payload of the successful packets / frames /cells. In other words, it is the ratio of
current network traffic to the maximum traffic the network can handle. It is an
important indicator of the bandwidth usage in the network.
Formula :Utilization (%) = Effective Utilization (%) + Overhead (%) + Loss (%).

Effective Utilization (%):


Also called as Normalized Throughput(%). Fraction of network capacity devoted
to carrying payload of the successful packets/frames/cells.
Formula:
Network Effective Utilization (%) = (Total number of payload transmitted(bits) in
the Network / Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(μsec) * Network Capacity (Mbps).

Overhead (%):
Fraction of network capacity devoted to carrying Overhead of the successful
packets / frames/cells.
Formula:

43 Networks Lab – Observation Manual


Network Overhead = (Total number of overhead transmitted (bits) in the Network
/Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps)

Loss (%):
Fraction of network capacity devoted to carrying error packets/frames/cells. This
includes both payload and overhead of these packets.
Formula:
Network Loss (%) = ( Number of errored bits in the Network / Maximum number
of bits that could have been transmitted ) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps).

Mean delay (Micro Second/Frame):


Single packet delay is also called as Mean delay. Mean time a frame waits at a
station before being successfully transmitted (queuing time and medium access
time) and the transmission time per frame.
Formula:
Mean Delay (Micro Second/Frame) = (Queuing Time + Medium Access Time +
Transmission Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Response Time (Micro Second / Frame):


Also called as Service Time, Sum of medium access time and transmission time
per frame.
Formula:
Response Time (Micro Second/Frame) = (Medium Access Time + Transmission
Time) / (Pay Load Delivered / Maximum Data Size per Frame).

All other definitions of the parameters / variables are available in NetSim.

4(a). Simulation:
Comparing the Throughput and Normalized Throughput for Token Ring and Token Bus
protocols for different transmitting nodes (NetSim).

4(b). Real time:


Create a common scenario in token ring and token bus, transfer a file between client -
server and measure the performance (LAN Trainer).

Hardware / Software Requirements:


1. NetSim Academic Version simulation software (for simulation)

44 Networks Lab – Observation Manual


2. LAN trainer (Model LT 01) (for real time)
3. LT Soft – Operational software for LAN Trainer (for real time)
Sample Questions:
1. Compare and contrast the throughput of Token Ring and Token Bus while
transferring the same file, (e.g. if 4 Mbps in Token Ring, then 5 Mbps in Token Bus)
using LAN Trainer. What do you infer from the results?

Experiment 4(a):
Comparing the Throughput and Normalized Throughput for Token Ring and Token Bus
protocols for different transmitting nodes using NetSim.

Description:
To begin with the experiment, open NetSim

Fig 4.1

Click on Simulation, select LAN network and Token Bus from the sub menu. The
simulation environment is now open.

45 Networks Lab – Observation Manual


Click here to
Validate
Click here to
Simulate

Fig 4.2

i. Drag and drop the bus on the environment


ii. Drag and drop the nodes to the bus only. Two is the minimum number of nodes
required for transmission to take place.

Fig 4.3

For fig 4.3, right click on the 1st node and set the transmission to Point to Point.
Select Traffic type as Data.

46 Networks Lab – Observation Manual


Set Transmission Type
as Point to Point
Set Traffic
type as data

Fig 4.4

On Selecting Data option, you will get the window shown below. Set the
Distribution value as Constant and set Mean interval time as 6510, so that Generation
Rate will be 10Mbps exactly

47 Networks Lab – Observation Manual


Set Distribution as
Constant
Data size 8138

Constant
Distribution
Set Mean
interval time
as 6510

Fig 4.5

Now you will get back the simulation environment. Here on the left panel we
have validate button followed by simulation button. First validate the experiment by
clicking validate button and then when you click simulate button a small window will
appear, here set the simulation time to 10 seconds and click ok.

Then, you will see the performance metrics screen.

48 Networks Lab – Observation Manual


Click here to
Save
experiment

Click here to go
to NetSim
Analytics

Click here to
export data to
Excel

Click here to
view Network

Fig 4.6

Here click Save button to save the experiment.

Save
Give any name of your choice to save it and if you want to give any comments
you can give or else click No for comments and proceed to save your experiment by
clicking OK button.

Click Ok

Fig 4.7

An example is shown in the above figure.

49 Networks Lab – Observation Manual


Retrieve
Rather then creating new scenarios each time, this can be done as follows.
After saving the experiment, click Simulation from the sub menu on the file panel.

Select the Network

Select Topology
Select the
experiment

Fig 4.8

Select LAN Token Bus - Protocol, Bus Topology and the experiment which you
have saved for the Sample from fig 4.8. Click Ok button, you will obtain the initial
scenario. Set the traffic on one additional node (total of 2 nodes)

Click Configure and Simulate. Follow the same procedure increasing the number
of transmitting node by 1 every time. Similarly generate traffic for 3 nodes. Follow the
same procedure for Token Ring.

Results (to be filled up by the students):


To view the output by using NetSim the Sample experiments need to be added
onto the Analytics interface. Given below is the navigation for analytics -“Simulation Æ
Analytics”.
Select the experiments by selecting your Token ring and Token bus protocols
experiments
Select the Experiments (Note: Click on one experiment after the other to add
multiple experiments need to be added onto the Analytics interface).
Click on “Export to .csv” which is available in Metrics Screen to export data to
Excel sheet, using the Chart Wizard option in excel sheet plot a line graph with X axis as
Number of nodes and Y axis as throughput and normalized throughput of Token ring &

50 Networks Lab – Observation Manual


token Bus. The Graphs shows the Difference in Throughput & Normalized Throughput
for token ring and token bus.

Token bus vs token ring

99.9
Throughput(Mbps)

99.8
99.7
99.6
99.5
99.4
99.3
99.2
99.1
99
2 3 4 5
No. of nodes

token bus token ring

Fig 4.9

Token Ring Vs Token Bus

99.9
Normalized Throughput (%)

99.8

99.7

99.6

99.5

99.4

99.3
1 2 3 4 5
Transmitting Node s

Token Ring Token Bus

Fig 4.10

51 Networks Lab – Observation Manual


Inference (to be filled up by the students):
Due to more overheads and complicated ring maintenance procedure token bus
always performs less than token ring.

Experiment 4(b):
Create a common scenario in token ring and token bus, transfer a file between client -
server and measure the performance (LAN Trainer).

Description:

To begin with the experiment, run LAN Trainer LT 01.

Fig 4.11
For Token Ring, select from the file panel. User should select one
system/computer as the Server and the other system as the Client.

Fig 4.12

At the Client, enter the File path of the server, select the file path where file has to
be saved and enter the Server’s IP address, click Receive.

At the Server, user has to just click send.

In the same way, perform the above experiment for Token Bus between a server
and a client.

From the metrics obtained at the receiver side export the values to the excel sheet
and observe the throughput for the Token bus and Token Ring network.

52 Networks Lab – Observation Manual


Note:
After the Server sets the value, it should wait for the Client to set up the required
address etc. Then, only after the Client is ready, the Server should click Send and the
receiver should click Receive.

Depending on the experiment connect the cable from the system to the required
topology in the kit. Turn on the LT Kit by turning the manual switch to the Bus topology
or Ring topology.

Results (to be filled up by the students):


Token Ring: Set File size as 10Mb and Data rate as 4Mbps
Token Bus: Set File size as 10Mb and Data rate as 5Mbps

1.8 1.75
1.75
1.7
Throughput

1.65
1.6
1.55 1.51
1.5
1.45
1.4
1.35
Token Bus Token Ring

Fig 4.13

Inference (to be filled up by the students):


Due to more overheads and complicated ring maintenance procedure token bus
always performs at a lower efficiency than token ring.

53 Networks Lab – Observation Manual


Experiment 5: Comparing CSMA/CA vs. CSMA/CD protocol (for a
fixed number of transmitting nodes)

Introduction:
Wireless LAN is basically a LAN that transmits data over air, without any
physical connection between devices. The transmission medium is a form of
electromagnetic radiation. Wireless LAN is ratified by IEEE in the IEEE 802.11
standard. The underlying algorithm used in Wireless LAN is known as the CSMA / CA –
Carrier Sense Multiple Access / Collision Avoidance algorithm. The working of CSMA /
CA algorithm is given below.

• The node which has data to transmit senses the medium. If the medium has been
idle for longer than the DIFS (DCF Inter Frame Space), it finishes its back off
interval & transmits Request To Send (RTS) signal immediately.
• The access point responds with Clear to Send (CTS) signal .Now the node has
reserved the medium and transmits data.
• If the medium is busy, the node waits for the channel to become idle for the DIFS.
• If two nodes sense the medium at the same time & transmit RTS simultaneously,
RTS collision occurs and the transmission is retried. Hence data collision is
avoided.
• For each retransmission, contention window increases exponentially hence back
off time is selected from larger contention window.
This is explained in the timing diagram given below:

Fig 5.1

54 Networks Lab – Observation Manual


Performance Metrics:
Some of the important performance metrics which are recorded during simulation
are given below.

Utilization(%):
Also called as Throughput(%). Fraction of network capacity devoted to carrying
payload of the successful packets / frames /cells. In other words, it is the ratio of
current network traffic to the maximum traffic the network can handle. It is an
important indicator of the bandwidth usage in the network.
Formula :Utilization (%) = Effective Utilization (%) + Overhead (%) + Loss (%).

Effective Utilization (%):


Also called as Normalized Throughput(%). Fraction of network capacity devoted
to carrying payload of the successful packets/frames/cells.
Formula:
Network Effective Utilization (%) = (Total number of payload transmitted(bits) in
the Network / Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(μsec) * Network Capacity (Mbps).

Overhead (%):
Fraction of network capacity devoted to carrying Overhead of the successful
packets / frames/cells.
Formula:
Network Overhead = (Total number of overhead transmitted (bits) in the Network
/Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps)

Loss (%):
Fraction of network capacity devoted to carrying error packets/frames/cells. This
includes both payload and overhead of these packets.
Formula:
Network Loss (%) = ( Number of errored bits in the Network / Maximum number
of bits that could have been transmitted ) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps).

55 Networks Lab – Observation Manual


Mean delay (Micro Second/Frame):
Single packet delay is also called as Mean delay. Mean time a frame waits at a
station before being successfully transmitted (queuing time and medium access
time) and the transmission time per frame.
Formula:
Mean Delay (Micro Second/Frame) = (Queuing Time + Medium Access Time +
Transmission Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Response Time (Micro Second / Frame):


Also called as Service Time, Sum of medium access time and transmission time
per frame.
Formula:
Response Time (Micro Second/Frame) = (Medium Access Time + Transmission
Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Collision Count(s):
Total number of collisions occurring in a network.

The definitions of all parameters / variables are available in NetSim.

5(a). Simulation:
Comparison of CSMA / CD vs. CSMA / CA protocols (for a fixed number of
transmitting nodes) (NetSim).

5(b). Real time:


Real time file transfer (through LAN trainer) and study of application and
network performance. Compare throughput for 1 client server pair between
Wireless LAN and Star Topology. (LAN Trainer)

Hardware / Software Requirements:

1. NetSim Academic Version simulation software (for simulation).


2. LAN trainer (Model LT 01) (for real time).
3. LT Soft – Operational software for LAN Trainer (for real time).

Sample Questions:
1. Simulate and plot a graph for throughput versus transmitting nodes (varying from
1 to 8) using NetSim. Analyze and comment on the results.
2. Simulate and compare the throughput of single BSS and multiple BSS by varying
number of transmitting nodes (from 1 to 8) using NetSim. What are the
inferences?

56 Networks Lab – Observation Manual


Experiment 5(a):
Comparison of CSMA / CD vs. CSMA / CA protocols (for a fixed number of
transmitting nodes) (NetSim).

Description:
To begin with the experiment, open NetSim

Fig 5.12

Click on Simulation, select LAN network and Wireless LAN from the sub menu. The
simulation environment is now open.

i. Drag and drop the BSS and the Switch on the environment. Connect the BSS and
the Switch.
ii. Drag and drop the node near to the BSS only. Two is the minimum number of
nodes required for transmission to take place.

57 Networks Lab – Observation Manual


CSMA/CA
Fig 5.13

Now right click on the 1st node you will see the window shown below. Here set
the transmission to Point to Point and select Traffic type as Data.

Set Transmission Type


as Point to Point

Set Traffic type as


Data

Fig 5.14

On Selecting Data option, you will get the window shown below. Set the
Distribution value as Constant and set Mean interval time as 1070 micro seconds, so that
Generation Rate will be 11Mbps approximately.

58 Networks Lab – Observation Manual


Set Distribution as
Constant
Set Distribution as
Constant

Click OK button

Fig 5.15
Right click on AP and select properties as shown below.

Enter the value as Zero.

Set to No Path Loss.

Click on Accept button.


Fig 5.16

Now you will get back the simulation environment. Here on the left panel we
have validate button followed by simulation button. First validate the experiment by
clicking validate button and then when you click simulate button a small window will
appear, here set the simulation time to 10 seconds and click ok.

Then, you will see the performance metrics screen. Click save to save the metrics.

59 Networks Lab – Observation Manual


Select Save to
save the Metrics.

Click to go to
Analytics screen.

Click to view
the Network.

Fig.5.17
Here click Save button to save the experiment.

Save:
Give any name of your choice to save it.

Fig 5.18

Enter any file name as shown above and click OK.

60 Networks Lab – Observation Manual


Fig.5.19

If you don’t want to add any comments Click on “No” Or else If You wants to
add comments click on “Yes” Then Finally click on Ok Button to proceed to save the
experiment.

Retrieve:
Rather then creating new scenarios each time, this can be done as follows.
After saving the experiment, SimulationÆOpenÆ Change protocol. Then following
window will appear.

Fig 5.20

Select Wireless LAN Protocol then select Traditional Ethernet protocol and then
select experiment which you have saved for the Sample
Click on the Ok button

61 Networks Lab – Observation Manual


Now, you will obtain the initial scenario as

CSMA\CD
Fig 5.21

Set the traffic to Point to Point on one additional node (total of 2 nodes)
Click Configure and Simulate. Follow the same procedure increasing the number of
nodes by 1 every time, till all 6 nodes transmit Point to Point.

Result (to be filled up by the students):


To view the output by using NetSim the Sample experiments need to be added
onto the Analytics interface. Given below is the navigation for analytics -“Simulation Æ
Analytics”.
Select the experiments by selecting your Traditional Ethernet and WLAN
protocols experiments
Select the Experiments (Note: Click on one experiment after the other to add
multiple experiments need to be added onto the Analytics interface).
Click on “Export to .csv” which is available in Metrics Screen to export data to
Excel sheet, using the Chart Wizard option in excel sheet plot a line graph with X axis as
Number of nodes and Y axis as Throughput (%) of Wireless LAN and Traditional
Ethernet. The Graph shows the Difference in Throughput for Wireless LAN and
Traditional Ethernet.

62 Networks Lab – Observation Manual


Transmitting Nodes Vs Throughput
(% )

120
Throughput(%)

100
80
60
40
20
0
2 3 4 5 6
Transmitting Nodes

Wireless LAN Traditional Ethernet

Fig 5.22

Inference (to be filled up by the students):

The collision avoidance concept in wireless LAN protocol, avoids the possibility
of collision of data frames. The working of wireless LAN is such that when a node
transmits to the destination the data reaches the access point (coordination point) and
from there it is transmitted to the destination node. Due to its nature of double
transmission and protocol overheads, the throughput is reduced by 50% when compared
to Ethernet.

63 Networks Lab – Observation Manual


Wireless LAN- Setup
To activate the Wireless LAN keep the position of the rotary switch at position 1.

Fig 5.2

Keep the antennas of the access point vertically up.

Fig 5.3

Click on the icon at the task bar to view the following screen.

64 Networks Lab – Observation Manual


Fig 5.4

Select

Fig 5.5

The available wireless networks will be listed on the screen. In this case one
wireless network is indicated.

Select the required wireless network.

65 Networks Lab – Observation Manual


Fig 5.6

Click the button.

Fig 5.7

66 Networks Lab – Observation Manual


You are successfully connected to the wireless network. Now close the above
screen and try to access the wireless system.

Go to Start Menu and click . Enter the IP Address of the system you
want to access. Check that you can access all the systems which are involved to do
Wireless LAN experiments.

Fig 5.8

The system is thus accessed through Wireless network.

Fig 5.9

If you are unable to access the system, dialog boxes shown below may pop up.

67 Networks Lab – Observation Manual


Fig 5.10

Fig 5.11

Reason:
Wireless connection is not established properly.

Rectification:
Check if your access point is switched on.
Check if your system and destination system are connected to the same access point.
Check if the IP address is assigned properly for your system and the destination system.

Note: When you want to switch your experiment from Wired LAN to Wireless LAN it
is recommended to restart your system and unplug all the cables from the LAN
Trainer.

Experiment 5(b):
Real time file transfer (through LAN trainer) and study of application and network
performance. Compare throughput for 1 client server pair between Wireless LAN and
Star Topology. (LAN Trainer)

Description:

To begin with the experiment, run LAN Trainer LT 01.

68 Networks Lab – Observation Manual


Fig 5.23

For Wireless LAN, click on in the file panel. User should select one
system/computer as the Server and the other system as the Client.

Server Client
Fig 5.24

At the Server, enter the any integer value for Packet Size (Bytes) and click Send.

At the Client:

• Enter the Server IP Address.


• Request for File: Enter the location where the file exist in the Server system
(Mention the name of the file)
• Save in (Path): Click browse and select the file path where you want to save
(no need to give the file name)
• Inter Packet Gap (ms): Any integer number.
• Select the required adapter and click Receive.

Save the metrics table obtained at the receiver.

Now for Star topology, perform the experiment as given for Wireless LAN. The
cable of the LAN Trainer kit should be connected to star topology.

69 Networks Lab – Observation Manual


From the metrics obtained at the receiver side of both the experiment, export the
values to the excel sheet and compare the throughput for Wireless LAN and Star
topology.

Note:
After the Server sets the value, it should wait for the Client to set up the required
address etc. Then, only after the Client is ready, the Server should click Send and the
receiver should click Receive.

Depending on the experiment connect the cable from the system to the required
topology in the kit. Turn on the LT Kit by turning the manual switch to Star topology.

Results (to be filled up by the students):


100 94.176
90
80
70
Throughput

60
50
40
30
20
10 1.992
0
WirelessLAN Star

Fig 5.25

Inference (to be filled up by the students):

The collision avoidance concept in wireless LAN protocol, avoids the possibility
of collision of data frames. The working of wireless LAN is such that when a node
transmits to the destination the data reaches the access point (coordination point) and
from there it is transmitted to the destination node. Due to its nature of double
transmission, the lower data rate and protocol overheads, the throughput is reduced by
50% when compared to Ethernet.

70 Networks Lab – Observation Manual


Experiment 6: Analyzing the difference between unicast and broadcast
transmission (for a fixed number of transmitting nodes)

Introduction:
Unicast packets are sent from host to host. The communication is from a single
host to another single host. There is one device transmitting a message destined for one
receiver.
Broadcast is when a single device is transmitting a message to all other devices in
a given address range. This broadcast could reach all hosts on the subnet, all subnets, or
all hosts on all subnets.
Broadcast transmission also known as a Best – Effort transmission. All the data
packet transmission consider like a successful transmission. And also before transmitting
the data packet, there is no more handshaking signal (RTS/CTS) process in CSMA/CA.
Account of this result, there is an opportunity to transmit more data packets.

Performance Metrics:
Some of the important performance metrics which are recorded during simulation
are given below.

Utilization(%):
Also called as Throughput(%). Fraction of network capacity devoted to carrying
payload of the successful packets / frames /cells. In other words, it is the ratio of
current network traffic to the maximum traffic the network can handle. It is an
important indicator of the bandwidth usage in the network.
Formula :
Utilization (%) = Effective Utilization (%) + Overhead (%) + Loss (%).

Effective Utilization (%):


Also called as Normalized Throughput(%). Fraction of network capacity devoted
to carrying payload of the successful packets/frames/cells.
Formula:
Network Effective Utilization (%) = (Total number of payload transmitted(bits) in
the Network / Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(μsec) * Network Capacity (Mbps).

Overhead (%):
Fraction of network capacity devoted to carrying Overhead of the successful
packets / frames/cells.
Formula:

71 Networks Lab – Observation Manual


Network Overhead = (Total number of overhead transmitted (bits) in the Network
/Maximum number of bits that could have been transmitted) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps)

Loss (%):
Fraction of network capacity devoted to carrying error packets/frames/cells. This
includes both payload and overhead of these packets.
Formula:
Network Loss (%) = ( Number of errored bits in the Network / Maximum number
of bits that could have been transmitted ) * 100
Where,
Maximum number of bits that could have been transmitted = Simulation End time
(µsec) * Network Capacity (Mbps).

Mean delay (Micro Second/Frame):


Single packet delay is also called as Mean delay. Mean time a frame waits at a
station before being successfully transmitted (queuing time and medium access
time) and the transmission time per frame.
Formula:
Mean Delay (Micro Second/Frame) = (Queuing Time + Medium Access Time +
Transmission Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Response Time (Micro Second / Frame):


Also called as Service Time, Sum of medium access time and transmission time
per frame.
Formula:
Response Time (Micro Second/Frame) = (Medium Access Time + Transmission
Time) / (Pay Load Delivered / Maximum Data Size per Frame).

Collision Count(s):
Total number of collisions occurring in a network.

The definitions of all parameters / variables are available in NetSim.

6(a). Simulation:
Study the difference between unicast and broadcast transmission (for a fixed
number of transmitting nodes) (NetSim).

6(b). Real time:


Compare throughput for Wireless LAN between 1 Client 1 Server and 2 client
2 Server pair (LAN Trainer).

72 Networks Lab – Observation Manual


Hardware / Software Requirements:

1. NetSim Academic Version simulation software (for simulation)


2. LAN trainer (Model LT 01) (for real time)
3. LT Soft – Operational software for LAN Trainer (for real time)

Sample Questions:
1. Compare the throughput of 1 client 1 server & 2 clients 2 servers using LAN
Trainer and comment on the results.
2. Measure the signal strength, data rate at different distances between access point
and Wireless system using LAN Trainer. Plot the variation of these parameters
against distance.

Experiment 6(a):
Study the difference between unicast and broadcast transmission (for a fixed
number of transmitting nodes) (NetSim).

Description:

To begin with the experiment, open NetSim

Fig 6.2

Click on Simulation, select LAN network and Wireless LAN from the sub menu. The
simulation environment is now open.

i. Drag and drop the BSS and the Switch on the environment. Connect the BSS and
the Switch.
ii. Drag and drop the node near to the BSS only. Two is the minimum number of
nodes required for transmission to take place.

73 Networks Lab – Observation Manual


Fig 6.3

Right click on AP and select properties as shown below.

Set the value as Zero.

Set No Path Loss option here.

Click on Accept Button.


Fig 6.3

For fig 6.2, right click on the 1st node and set the transmission to Point to Point.
Select Traffic type as Data.

74 Networks Lab – Observation Manual


Set Transmission type
as Point to Point

Set Traffic type as Data

Fig 6.4

On Selecting Data option, you will get the window shown below. Set the
Distribution value as Constant and set Mean interval time as 1070 micro seconds, so that
Generation Rate will be 11Mbps approximately.

Set Distribution as Constant

Set Distribution as Constant

Click OK button

Fig 6.5

Now you will get back the simulation environment. Here on the left panel we
have validate button followed by simulation button. First validate the experiment by

75 Networks Lab – Observation Manual


clicking validate button and then when you click simulate button a small window will
appear, here set the simulation time to 10 seconds and click ok.

Then, you will see the performance metrics screen. Click save to save the
experiment metrics.

Select Save to
save the Metrics

Click to go to
Analytics screen

Click to view the


Network

Fig 6.6
Give any name of your choice to save it.

Here click Save button to save the experiment.

Save:

Fig 6.7

76 Networks Lab – Observation Manual


Give any name of your choice to save it.

Fig 6.8

If you don’t want to add any comments Click on “No” Or else If You want to add
comments click on “Yes” Then finally click on Ok button to proceed to save the
experiment.

Retrieve:

Rather then creating new scenarios each time, this can be done as follows.
After saving the experiment, SimulationÆOpenÆ Network.

Fig 6.9

Select Wireless LAN- Protocol, and the experiment which you have saved for the
Sample from 6.9. Click on the accept button.

Now, you will obtain the initial scenario.

77 Networks Lab – Observation Manual


Set the broadcast traffic on same node.
Click Configure and Simulate. Follow the same procedure increasing the number
of broadcast nodes by 1 every time, till all 6 nodes broadcast.

For unicast, set the traffic (in the traffic Generator) to Point to Point and follow
the procedure as given for broadcast.

Result (to be filled up by the students):

To view the output by using NetSim the Sample experiments need to be added
onto the Analytics interface. Given below is the navigation for analytics -“Simulation Æ
Analytics”.
Select the experiments by selecting your WLAN protocols experiments
Select the Experiments (Note: Click on one experiment after the other to add
multiple experiments need to be added onto the Analytics interface).
Click on “Export to .csv” which is available in Metrics Screen to export data to
Excel sheet, using the Chart Wizard option in excel sheet plot a line graph with X axis as
Number of nodes and Y axis as Throughput(%) of Unicast and Broadcast. The Graph
shows the Difference in Throughput for Unicast and Broadcast.

Transmitting Nodes Vs Throughput (% )

60
58
Throughput(%)

56
54
52
50
48
46
2 3 4 5 6
Transmitting Nodes

Unicast Broadcast

Fig 6.10

Inference (to be filled up by the students):


For unicast (point to point traffic), the nodes use RTS/CTS mechanism to avoid
data collision. But in broadcast the frames are simply sent without RTS/CTS .The
reduction in protocol overheads results in better throughput, for broadcast transmission.

78 Networks Lab – Observation Manual


Experiment 6(b):
Real time files transfer (through LAN trainer) and study of application and network
performance. Compare throughput for Wireless LAN between 1 and 2 client–Server pair
(LAN Trainer)

Description:
To begin with the experiment, run LAN Trainer.

Fig 6.11

To view the details on how to proceed with the experiments click on the question
mark. This is the “Help” section for the respective protocol.

For Wireless LAN, click on in the file panel. User should select one
system/computer as the Server and the other system as the Client

Server Client
Fig 6.12

At the Server, enter the any integer value for Packet Size (Bytes) and click Send.

At the Client:

• Enter the Server IP Address.


• Request for File: Enter the location where the file exist in the Server system
(Mention the name of the file)
• Save in (Path): Click browse and select the file path where you want to save
(no need to give the file name)
• Inter Packet Gap (ms): Any integer number.

79 Networks Lab – Observation Manual


• Select the required adapter and click Receive.

Save the metrics table obtained at the receiver.

Now, for 2 client- server pair, set 2 systems as the Client and 2 systems as the
Server (Total number of system used is 4). Set the File Transfer Agent as given above
for all the system. Let the 1st server transmit to 1 client and at the same time let the 2nd
server transmit to the other client.

From the metrics obtained at the receiver side export the values to the excel sheet
and compare the throughput v/s transmitting nodes for Wireless LAN.

Note:
After the Server sets the value, it should wait for the Client to set up the required
address etc. Then, only after the Client is ready, the Server should click Send and the
receiver should click Receive.

Turn on the LT Kit by turning the manual switch to Wireless.

Results (to be filled up by the students):


2.5

2
Throughput

1.5

0.5

0
1 2
Transmitting nodes

Wireless LAN

Fig 6.13

Inference (to be filled up by the students):


As the number of transmitting nodes increases there is increased traffic in the
network. This results in higher contention. This leads to higher number of collisions in
the network & the chance for a node to acquire the medium become lower which results
in belated file transfer. So there is lower throughput in 2 client server pair when
compared to 1 client server pair.

80 Networks Lab – Observation Manual


Experiment 7: Verification of Stop and Wait protocol

Introduction:
Stop and Wait is a reliable transmission flow control protocol. This protocol
works only in Connection Oriented (Point to Point) Transmission.
The Source node has window size of ONE. After transmission of a frame the
transmitting (Source) node waits for an Acknowledgement from the destination node.
If the transmitted frame reaches the destination without error, the destination
transmits a positive acknowledgement. If the transmitted frame reaches the Destination
with error, the receiver destination does not transmit an acknowledgement.
If the transmitter receives a positive acknowledgement it transmits the next frame
if any. Else if its acknowledgement receive timer expires, it retransmits the same frame.

Algorithm:
Start with the window size of 1 from the transmitting (Source) node.After
transmission of a frame the transmitting (Source) node waits for a reply
(Acknowledgement) from the receiving (Destination) node.
If the transmitted frame reaches the receiver (Destination) without error, the
receiver (Destination) transmits a Positive Acknowledgement.
If the transmitted frame reaches the receiver (Destination) with error, the receiver
(Destination) do not transmit acknowledgement.
If the transmitter receives a positive acknowledgement it transmits the next frame
if any. Else if the transmission timer expires, it retransmits the same frame again.
If the transmitted acknowledgment reaches the Transmitter (Destination) without
error, the Transmitter (Destination) transmits the next frame if any.

81 Networks Lab – Observation Manual


If the transmitted frame reaches the Transmitter (Destination) with error, the
Transmitter (Destination) transmits the same frame.
This concept of the Transmitting (Source) node waiting after transmission for a
reply from the receiver is known as STOP and WAIT.

7(a). Simulation
Implement the stop and wait protocol using C / C++ program (NetSim)

7(b). Real time


Study the performance of the Stop and Wait protocol as the error rate is
increased while transferring the same file from client to server (LAN trainer)

Hardware/Software Requirements:
1. NetSim Academic Version simulation software (for C/C++ programming
implementation)
2. LAN trainer (Model LT 01) (for study)
3. LT Soft – Operational software for LAN Trainer (for study)

Sample Questions:
Netsim
1. Write a C/C++ program for stop and wait flow control.
a) Explain the algorithm in detail with relevant steps.
b) Draw the flow chart.

LAN Trainer
2. Plot the variation of error packets, ack count and window count in Stop and
Wait protocol as the error rate is increased while transferring the same file from
client to server (LAN trainer)

Experiment 7(a):
Implement the stop and wait protocol using C / C++ program (NetSim)

Description:
To begin with the experiment, open NetSim

82 Networks Lab – Observation Manual


Click on Programming from the file panel and select Transmission Flow Control.
The scenario is as shown in the following two figures.

Select
Programming
Fig 7.1

Select
Transmission
Flow Control

Fig 7.2

Next the following window appears and its description is given.

83 Networks Lab – Observation Manual


Select Mode
Stop & Wait

Enter input &


error rate

Click Run to execute


program
Click here to view concept,
algorithm, pseudo Code &
flow chart
Fig 7.3

When you select the User mode, you have to write your own program in C/C++,
compile and link to NetSim software for validation. Click on the F1 (help) icon for details
on how to proceed with your own code.
Continue with the steps as given for sample mode. As soon as you begin to enter
the input data file the following window appears and you select the input data file from
where you have stored.

Data file that


is added

Fig 7.4

84 Networks Lab – Observation Manual


Result:
Click Run button to view the output.

Output table

Fig 7.5

Experiment 7(b):

Study the performance of Stop and Wait protocol as the error rate is increased while
transferring the same file from client to server (LAN trainer).

Description:

To begin with the experiment, run LAN Trainer.

Fig 7.6

To view the details on how to proceed with the experiments click on the question
mark. This is the “Help” section for the respective protocol.

85 Networks Lab – Observation Manual


Click on in the file panel. User should select one system/computer as the
Server and one system as the Client.

Fig 7.7

At the Server, browse the required file to be transferred.


Note: The port number for both the Server and the Client should be the same.
Port range is from 1024 to 65000.

The window size is constant for Stop and Wait Protocol. Vary the error rate. Click
Send to transfer the file.
At the Client, enter the internet protocol (IP) address of the source and the port id. Select
the file path where data has to be saved and click receive.

Analysis:

Click to view the analysis table. This is used to compare the performed
experiments of same or different protocols with the help of line chart and can also be
exported to excel.

Experiment:
Select the file of any size to be transmitted (Here file size is of 128Mb).Set the port
number. Vary the error rate from No Error to 10^-5.

Note:
After the Server sets the value, it should wait for the Client to set up the required
address etc. Then, only after the Client is ready, the Server should click Send and the
receiver should click Receive.

86 Networks Lab – Observation Manual


Depending on the experiment connect the cable from the system to the required
topology in the kit. Turn on the LT Kit by turning the manual switch to the Bus topology
or Star topology.

Analysis:
Click

Fig 7.8
Follow the Steps given below:

Step 1
Select the required details from the button for the User, Network, Protocol and
the Sample.

Fig 7.9

Example

Fig 7.10
Step 2
The selected sample value will be obtained in the table below.

87 Networks Lab – Observation Manual


Example

Fig 7.11
Step 3
If it is the required sample value click on else .

Step 4
The added values will be obtained on the table

Example

Fig 7.12
Step 5
After the values are added, select the required input and output axis from the
browse button. Select either the Bar Chart or the Line Chart to view the graphs.

Example

Fig 7.13

The various types of expected charts are as shown below

Error Rate Vs Mean Delay

31500000
31000000
30500000
M ean D e la y

30000000
29500000
29000000
28500000
28000000
10^-6 10^-7 10^-8 10^-9 No Error
Error Rate

Token Bus

88 Networks Lab – Observation Manual


Line Chart Line chart from excel
Fig 7.14
Step 6
User can also export to excel and plot the graph. Click close to exit.

Results

File Size Vs Total Packet


Fig 7.15

Inference
Due to increase in the error rate, no of errored packets also increase. If errored
packets increase no of retransmitted packets also increase.

89 Networks Lab – Observation Manual


Experiment 8: Verification of Go Back N protocol

Introduction:
Go Back N is a connection oriented transmission. The sender transmits the frames
continuously. Each frame in the buffer has a sequence number starting from 1 and
increasing up to the window size. The sender has a window i.e. a buffer to store the
frames. This buffer size is the number of frames to be transmitted continuously. The size
of the window depends on the protocol designer.

Operations:
A station may send multiple frames as allowed by the window size.
Receiver sends an negative ACK if frame i has an error. After that, the receiver
discards all incoming frames until the frame with error is correctly retransmitted.
If sender receives an negative ACK it will retransmit frame i and all packets i+1,
i+2,... which have been sent, but not been acknowledged.

Algorithm:
The source node transmits the frames continuously.
Each frame in the buffer has a sequence number starting from 1 and increasing up
to the window size.
The source node has a window i.e. a buffer to store the frames. This buffer size is
the number of frames to be transmitted continuously.

90 Networks Lab – Observation Manual


The size of the window depends on the protocol designer.
For the first frame, the receiving node forms a positive acknowledgement if the
frame is received without error.
If subsequent frames are received without error (up to window size) cumulative
positive acknowledgement is formed.
If the subsequent frame is received with error, the cumulative acknowledgment
error-free frames are transmitted. If in the same window two frames or more frames are
received with error, the second and the subsequent error frames are neglected. Similarly
even the frames received without error after the receipt of a frame with error are
neglected.
The source node retransmits all frames of window from the first error frame.
If the frames are errorless in the next transmission and if the acknowledgment is
error free, the window slides by the number of error-free frames being transmitted.
If the acknowledgment is transmitted with error, all the frames of window at
source are retransmitted, and window doesn’t slide.
This concept of repeating the transmission from the first error frame in the
window is called as GOBACKN transmission flow control protocol.

Sample Questions:
NetSim
Write a C/C++ program for Go Back N flow control.
a) Explain the algorithm in detail with relevant steps.
b) Draw the flow chart.

Hardware/Software Requirements:
NetSim Academic Version simulation software (for C/C++ programming
implementation)

Description:
To begin with the experiment, open NetSim.

Click on Programming from the file panel and select Transmission Flow Control.
The scenario will be as shown in the following two figures.

91 Networks Lab – Observation Manual


Select
Programming

Fig 8.1

Select Transmission
Flow Control

Fig 8.2

Next the following window appears and its description is given.

92 Networks Lab – Observation Manual


Select Mode

Go Back N

Enter input & bit


error rate

Click Run to
execute program

Click here to view


Concept, Algorithm,
Psuedo Code &
Flow chart
Fig 8.3

When you select the User mode, you have to write your own program in C/C++,
compile and link to NetSim software for validation. Click on the F1 (help) for details on
how to proceed with your own code.
Continue with the steps as given for sample mode. As soon as you begin to enter
the input data file the following window appears and you select the input data file from
where you have stored.

93 Networks Lab – Observation Manual


Data file that is
added

Fig 8.4

Result : Click Run to view the output.

Output table

Fig 8.5

94 Networks Lab – Observation Manual


Experiment 9: Verification of Selective Repeat Protocol

Introduction:
Selective repeat is Similar to Go Back N. However, the sender only retransmits
that frame for which a negative ACK is received
Advantage over Go Back N:
Fewer retransmissions.
Disadvantages:
More complexity at sender and receiver.
Receiver may receive frames out of sequence.

Operations:

A station may send multiple frames as allowed by the window size.


Receiver sends a negative ACK if frame i has an error. After that, the receiver
does not discards all incoming frames as in Go Back N.
If sender receives a negative ACK it will retransmit only frame i which is the
error frame.

Fig 9.1

Algorithm:
The source node transmits the frames continuously.

95 Networks Lab – Observation Manual


Each frame in the buffer has a sequence number starting from 1 and increasing up
to the window size.
The source node has a window i.e. a buffer to store the frames. This buffer size is
the number of frames to be transmitted continuously.
The receiver has a buffer to store the received frames. The size of the buffer
depends upon the window size defined by the protocol designer.
The size of the window depends according to the protocol designer.
The source node transmits frames continuously till the window size is exhausted.
If any of the frames are received with error only those frames are requested for
retransmission (with a negative acknowledgement)
If all the frames are received without error, a cumulative positive
acknowledgement is sent.
If there is an error in frame 3, an acknowledgement for the frame 2 is sent and
then only Frame 3 is retransmitted. Now the window slides to get the next frames to the
window.
If acknowledgment is transmitted with error, all the frames of window are
retransmitted. Else ordinary window sliding takes place. (* In implementation part,
Acknowledgment error is not considered)
If all the frames transmitted are errorless the next transmission is carried out for
the new window.
This concept of repeating the transmission for the error frames only is called
Selective Repeat transmission flow control protocol.

9(a). Simulation
Implement the Selective repeat using a simple C / C++ program (NetSim)

9(b). Real time


Compare and Contrast the performance of Go Back N and Selective protocols as
the error rate is increased while transferring the same file from client to server
(LAN trainer)

Hardware/Software Requirements:
1. NetSim Academic Version simulation software (for C/C++ programming
implementation).
2. LAN trainer (Model LT 01) (for study)
3. LT Soft – Operational software for LAN Trainer (for study)

Sample Questions:

96 Networks Lab – Observation Manual


NetSim
Write a C/C++ program for selective repeat flow control.
a) Explain the algorithm in detail with relevant steps.
b) Draw the flow chart.

LAN Trainer

1. Plot the variation of error packets, acknowledgement count and window


count in Go Back N and Selective repeat protocols as the error rate is
increased while transferring the same file from client to server (LAN
trainer)
2. Plot the variation of error packets, acknowledgement count and window
count in Go Back N/ Selective Repeat protocol as the window size is
increased while transferring the same file from client to server (LAN
trainer)

Experiment 9(a):
Implement the Selective repeat using a simple C / C++ program (NetSim)

Description:
To begin with the experiment, open NetSim.

Click on Programming from the file panel and select Transmission Flow Control.
The scenario will be as shown in the following two figures.

Select
Programming

Fig 9.2

97 Networks Lab – Observation Manual


Select Transmission
Flow Control

Fig 9.3

Next the following window appears and its description is given.

Select mode

Selective Repeat
Enter input & bit
error rate

Click Run to execute


the program
Click here to view
Concept, Algorithm,
Pseudo Code &
Flow chart

Fig 9.4

98 Networks Lab – Observation Manual


When you select the User mode, you have to write your own program in C/C++,
compile and link to NetSim software for validation. Click on the F1 (help) for details on
how to proceed with your own code.
Continue with the steps as given for sample mode. As soon as you begin to enter
the input data file the following window appears and you select the input data file from
where you have stored.

Data file that


is added

Fig 9.5

Result : Click Run to view the output.

99 Networks Lab – Observation Manual


Output table

Fig 9.6

Experiment 9(b):
Compare and Contrast the performance of Go Back N and Selective protocols as the error
rate is increased while transferring the same file from client to server (LAN trainer).

Description:

To begin with the experiment, run LAN Trainer.

Fig 9.7

Click on in the file panel. User should select one system/computer as the
Server and the rest of the system as the Client.

100 Networks Lab – Observation Manual


Fig 9.8

At the Server, browse the required file to be transferred.


Note: The port number for both the Server and the Client should be same of a four
digit number.

The window size varies for both Go Back N and Selective Repeat. Vary the error
rate. Click Send to transfer the file.

At the Client, enter the Port id of the source and the port id. Select the file path
where data has to be saved and click receive.

Analysis:

Click to view the analysis table. This is used to compare the performed
experiments of same or different protocols with the help of line chart and can also be
exported to excel.

Select the file of any size to be transmitted (Here file size is of 128Mb).Set the
port number. Vary the error rate from No Error to 10^-5.

Note:
After the Server sets the value, it should wait for the Client to set up the required
address etc. Then, only after the Client is ready, the Server should click Send and the
receiver should click Receive.

Depending on the experiment connect the cable from the system to the required
topology in the kit. Turn on the LT Kit by turning the manual switch to the Bus topology
or Star topology.

101 Networks Lab – Observation Manual


Results:

Go Back N Selective Repeat

Error Rate Vs Retransmitted Packets Error Rate Vs Retransmitted Packets


Fig 9.9

Inference:
Due to increase in the error rate, no of errored packets also increase. If errored
packets increase no of retransmitted packets also increase.

102 Networks Lab – Observation Manual


Experiment 10: Verification of distance vector routing algorithm

Introduction:
Distance Vector Routing is one of the routing algorithms used in a Wide Area
Network for computing shortest path between source and destination. The router is one
of the main devices used in a wide area network. The main task of the router is routing. It
forms the routing table and delivers the packets depending upon the routes in the table –
either directly or via an intermediate device (perhaps another router).
Each router initially has information about its all neighbors (i.e., it is directly
connected). After a period of time, each router exchanges its routing table among its
neighbors. After certain number of exchanges, all routers will have the full routing
information about the area of the network. After each table exchange, router re-computes
the shortest path between the routers. The algorithm used for this routing is called
Distance Vector Routing.

Algorithm:

Repeat the following steps until there is no change in the routing table for all
routers.

1. Take the Next Router routing table and its neighbor routing table.
2. Add the router entry that is not in your own routing table, but exists in any
one of the other routing tables. If the new router entry exists in more than
one neighbor, then find the minimum cost among them. The minimum
cost value details are taken as a new entry: such as source router,
intermediate router, destination router and cost value, etc.
3. Update the source router routing table cost value if both the destination
router and the intermediate router field value have the same value as any
one of the neighbors’ routing entry.
4. Update the source router’s routing table entry with the new advertised one
if the intermediate router value in the source table is not same, but the cost
value is greater than the its neighbor’s entry.
5. Write the next stage of routing table into the file.

Repeat steps 1 to 5 for all routers.

Check whether any changes are made in any of the routers. If yes, then repeat the
above steps, otherwise, quit the process.

103 Networks Lab – Observation Manual


Hardware/Software Requirements:
NetSim Academic Version simulation software (for C/C++ programming
implementation)

Sample Questions:
Netsim
Write a C/C++ program for stop and wait flow control.
a) Explain the algorithm in detail with relevant steps.
b) Draw the flow chart

Description:

To begin with the experiment, open NetSim

Click on Programming from the file panel and select Distance Vector Routing

Fig 10.1

The scenario will be obtained as shown below. Follow the steps.

104 Networks Lab – Observation Manual


Select the
Mode

Connect the
Routers

Click Run to
execute the
Program

Fig 10.2

When you select the User mode, you have to write your own program in C/C++,
compile and link to NetSim software for validation. Click on the F1(Help) for details on
how to proceed with your own code.

Results (to be filled up by the students):

105 Networks Lab – Observation Manual


Output Table

Fig 10.3

106 Networks Lab – Observation Manual


Experiment 11: Verification of Link state routing Algorithm.

Introduction:
The router is one of the main devices used in a wide area network. The main task
of the router is routing. It forms the routing table and delivers the packets depending upon
the routes in the table – either directly or via an intermediate device (perhaps another
router).
Link state algorithm is a method used to find the shortest path between a source
router and a destination router based on the distance and route the packets through that
route.

Algorithm:

1. Start with the router: the root of the tree


2. Assign a cost of 0 to this router and make it the first permanent router.
3. Examine each neighbor router of the router that was the last permanent router.
4. Assign a cumulative cost to each router and make it temporary.
5. Among the list of temporary routers
5. a. Find the router with the smallest cumulative cost and make it permanent.
5. b. If a router can be reached from more than one direction
5. b.1. Select the direction with the shortest cumulative cost.
6. Repeat steps 3 to 5 until every router becomes permanent.

Hardware/Software Requirements:
NetSim Academic Version simulation software (for C/C++ programming
implementation).

Sample Questions:
Netsim
Write a C/C++ program for stop and wait flow control.
a) Explain the algorithm in detail with relevant steps.
b) Draw the flow chart.

Description:
To begin with the experiment, open NetSim

Click on Programming from the file panel and select Link State Routing

107 Networks Lab – Observation Manual


Fig 11.1

The scenario will be obtained as shown below. Follow the steps.

Select
Mode
Select Link
State

Connect the
Routers

Click Run to
execute the
Program

Fig 11.2

When you select the User mode, you have to write your own program in C/C++,
compile and link to NetSim software for validation.

Click on the F1(Help) link for details on how to proceed with your own code.

Results (to be filled up by the students):

108 Networks Lab – Observation Manual


Output
table

Fig 11.3

Inference (to be filled up by the students):


Here, Router 1 is taken as the source and Router 3 as the destination. The paths are
connected with input as the distance. The figure indicated in red line shows the shortest
path.

109 Networks Lab – Observation Manual


Experiment 12: Socket Programming

Introduction:

A socket is a software entity that provides the basic building block for inter-
process communications. It is also an interface between the application and the network.
Once the socket is configured, the application can send the data using sockets for network
transmission and receive the data using sockets from the other host. A socket
communication can be connection oriented (TCP sockets) or connectionless (UDP
sockets).
There is a receiver (TCP/UDP) server, which listen the sender (TCP/UDP) client
communications. There can be two-way communication.

Algorithm:

1. Initialize the address family, port no and IP address to communicate using


sockets
2. Establish Connection for that IP address
3. Send the data using the socket id
4. Close the socket connection

Hardware/Software Requirements:
NetSim Academic Version simulation software (for C/C++ programming
implementation).

Sample Questions:

Netsim
Write a C/C++ program for socket programming.
a) Explain the algorithm in detail with relevant steps.
b) Draw the flow chart.

Description:

To begin with the experiment, open NetSim

Click on Programming from the file panel and select Socket Programming.

110 Networks Lab – Observation Manual


Select Socket
Programming

Fig 12.1

The scenario will be obtained as shown below. Follow the steps.

Select Mode

Select Protocol

Select Operation

Enter Destination
IP Address
Click Send to
start transmission Enter data to be transmitted
Click here to
view Concept,
Algorithm,
Pseudo Code
& Flowchart
Fig 12.2

111 Networks Lab – Observation Manual


When you select the User mode, you have to write your own program in C/C++,
compile and link to NetSim software for validation.

Click on the F1(Help) link for details on how to proceed with your own code.

Results (to be filled up by the students):

Click Receive
to get the data
Received data

112 Networks Lab – Observation Manual

You might also like