You are on page 1of 95

LAN-T Quick reference manual v1.4.

Benchmark LAN-T Quick reference manual April 2009 V 1.4.3 LAN-T is a trademark of Benchmark Electronic Systems (P) Ltd. This manual contains Benchmark proprietary material. All other trademarks and copyrights belong to the respective owners and are hereby acknowledged. All Rights reserved. This manual may not be copied in whole or in part, nor transferred to any other media or language without the express written permission of Benchmark Electronic Systems (P) Ltd. Benchmark Electronic Systems (P) Ltd. reserves the right to make changes to this manual and to the equipment described herein without any notice. Considerable effort has been made to insure that this manual is free of inaccuracies and omissions. However, Benchmark Electronic Systems (P) Ltd. makes no warranty of any kind including, but not limited to, any implied warranties of merchantability and fitness for a particular purpose with regard to this manual or the products described herein. Benchmark Electronic Systems (P) Ltd. assumes no responsibility for, or liability for errors contained in this manual or for incidental, special, or consequential damages arising out of the furnishing of this manual, or the use of this manual in operating the equipment, or in connection with the performance of the equipment when so operated.

Contents

1. Aloha..... 2. CSMA. 3. CSMA/CD......... 4. CSMA/CA...... 5. Token Bus. 6. Token Ring.............. 7. Stop and Wait.. 8. Stop and Wait with BER 9. Sliding Window Go Back N.. 10. Sliding Window Go Back N with BER... 11. Sliding Window Selective Repeat.. 12. Sliding Window Selective Repeat with BER... 13. Packet Transmission. 14. File transfer and Packet Sniffing 15. RC4 Key 16. Encrypting a file using RC4 algorithm. 17. File transfer using Socket FTP 18. Distance vector routing protocol 19. Link state routing protocol.. 20. Appendix 1 Graph plot procedure. 21. Appendix 2 Configuration menu details.. 22. Appendix 3 Developing Lan-T application..

1 6 11 16 24 28 32 35 37 40 42 45 47 50 54 59 62 67 73 78 86 88

LAN-T

ALOHA

Experiment 1 ALOHA
Aim: Implement the ALOHA protocol for packet communication between a number of nodes connected to a common bus

Procedure: 1. Click on the MAC Experiment icon 2. Click the Configuration button twice from the desktop on both PCs. in the window in both the PCs.

PC 1

PC 2

Setting the Configuration menu:

PC 1
Node id

PC 2
Node id

0 on config menu 1 and 1 on config menu 2


ALOHA

0 on config menu 1 and 1 on config menu 2


ALOHA

Protocol Baud Rate Duration Packet Length Bit Delay Direction

Protocol Baud Rate Duration Packet Length Bit Delay Direction

8Kbps (At both the config menu and NEU)


100s 100 bytes 0(at NEU)

8Kbps (At both the config menu and NEU)


100s 100 bytes 0(at NEU)

Sender

Sender

Note: All the nodes have to be configured as Senders. Set the topology as Bus.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T

ALOHA

N*P G = ------C * ta Equation A


G is the generated load in the network. N is the number of nodes participating in the network. For example, let us say that 4 nodes (using 2 computers) P is the packet length expressed in bits; say 100 bytes (800 bits). C is the data rate normally set as 8kbs, which is selected in the NEU.

ta is the inter packet delay expressed in seconds; the time interval between two consecutive
packets generated.

So, lets assume ta= 40 milliseconds and substitute the above mentioned parameters in the Equation A which leads to G = 10. Like wise assume various values for ta to generate offer loads in the range of 0.1 to 10. Substitute the value of ta in the configuration menu.

3. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough.

command.

PC 1

PC 2

4. Run the experiment by clicking button

or by choosing RUN

Start from each application.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T 5. View the statistics window for results. To view the statistics window click on packets and collision count are taken into account for MAC calculation.

ALOHA button. Only Tx

PC 1

PC 2

6. Note down the readings once the experiment is completed. 7. Repeat the above steps for various values of ta. 8. Calculate the Practical offered load from the below given formula and plot the graph between the practical Offered load and Throughput.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T

ALOHA

9. Repeat the experiment for various values of Packet length, Node, Data rate.

Calculation of Practical Throughput (X) from the obtained readings: Successfully transmitted packet by a node = Tx Packets - Collision Count

(Sum of Successfully Tx packet in all the nodes * Packet Length * 8) X = --------------------------------------------------------------------------(Duration of Experiment * Data rate)

Calculation of Theoretical Throughput:

X = Ge

-2G

Calculation of Practical Offered load:

(Sum of Transmitted packets in all the nodes * Packet Length * 8)


G= -------------------------------------------------------------------------(Duration of Experiment * Data rate)

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T

ALOHA

Model tabulation: IPD 4000 2000 800 400 200 100 40 Tx1 23 36 54 52 18 10 4 Tx 2 19 35 48 41 26 1 0 Tx 3 25 38 43 39 11 4 0 Tx 4 16 33 60 45 19 10 6 G Practical Offered Load 0.101 0.2 0.444 0.766 1.293 1.82 2.484 X Practical Throughput 0.083 0.142 0.205 0.177 0.074 0.025 0.01 Theoretical Throughput 0.08 0.13 0.18 0.14 0.04 0.00 0.00

Model Graph:

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T

CSMA

Experiment 2 CSMA
Aim: Implement the CSMA protocol for packet communication between a number of nodes connected to a common bus

Procedure: 1. Click on the MAC Experiment icon 2. Click the Configuration button twice from the desktop on both PCs. in the window in both the PCs.

PC 1

PC 2

Configuration menu:

PC 1
Node id Protocol Baud Rate

PC 2
Node id Protocol Baud Rate

0 on config menu 1 and 1 on config menu 2


CSMA

0 on config menu 1 and 1 on config menu 2


CSMA

8Kbps (At both the config menu and NEU)


100s 100 bytes 10 (at NEU)

8Kbps (At both the config menu and NEU)


100s 100 bytes 10 (at NEU)

Duration Packet Length Bit Delay Direction

Duration Packet Length Bit Delay Direction

Sender

Sender

Note: All the nodes have to be configured as Senders. Set the topology as Bus.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T

CSMA

N*P G = -----C * ta
Equation A

G is the generated load in the network. N is the number of nodes participating in the network. For example, let us say that 4 nodes (using 2 computers) P is the packet length expressed in bits; say 100 bytes (800 bits). C is the data rate normally set as 8kbs, which is selected in the NEU.

ta is the inter packet delay expressed in seconds; the time interval between two consecutive
packets generated.

So, lets assume ta= 40 milliseconds and substitute the above mentioned parameters in the Equation A which leads to G = 10. Like wise assume various values of ta to generate offer loads in the range of 0.1 to 10. Substitute the ta in the configuration menu. 3. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough. command.

PC 1

PC 2

4. Run the experiment by clicking button

or by choosing RUN

Start from each application. button. Only Tx

5. View the statistics window for results. To view the statistics window click on packets and collision count are taken into account for MAC calculation.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T

CSMA

PC 1

PC 2

6. Note down the readings once the experiment is completed. 7. Repeat the above steps for various values of ta. 8. Calculate the Practical offered load from the below given formula and plot the graph between the practical Offered load and Throughput.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template.

9. Repeat the experiments for various values of Packet length, Node, Data rate and Bit delay.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T

CSMA

Calculation of Practical Throughput (X) from the obtained readings:

Successfully transmitted packet by a node = Tx Packets - Collision Count

(Sum of Successfully Tx packet in all the nodes * Packet Length * 8) X= ----------------------------------------------------------------------------(Duration of Experiment * Data rate)

Calculation of Theoretical Throughput:

G(1+G+aG(1+G+aG/2))e-G(1+2a) X = -----------------------------------G (1+2a)-(1-e-aG)+(1+aG)e-G(1+a)

a = (end to end bit delay in bits) / (Packet length in bits) = (bit delay*N) / (P)

Calculation of Practical Offered load:

(Sum of Transmitted packets in all the nodes * Packet Length * 8)


G= -------------------------------------------------------------------------(Duration of Experiment * Data rate)

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

LAN-T Model tabulation:

CSMA

For bit delay = 1

IPD 40 100 200 400 800 2000 4000

Tx1 21 114 150 145 96 49 27

Tx 2 19 102 155 149 103 48 29

Tx 3 17 102 144 154 103 48 28

Tx 4 20 87 148 137 98 49 28

G Practical Offered Load 1.825 1.445 1.095 0.733 0.434 0.196 0.116

X Practical Throughput 0.077 0.405 0.597 0.585 0.4 0.194 0.112

Theoretical Throughput 0.363663 0.440856 0.488795 0.470386 0.357479 0.185647 0.11322

Model Graph:

Offered Load Vs Throughput


0.7 0.6 Throughput (X) 0.5 0.4 0.3 0.2 0.1 0 0 0.5 1 1.5 2 2.5 Offered Load (G) X - Theoritical throughput X - Throughput

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

10

LAN-T

CSMA/CD

Experiment 3 CSMA/CD
Aim: Implement the CSMA/CD protocol for packet communication between a number of nodes connected to a common bus

Procedure: 1. Click on the MAC Experiment icon 2. Click the Configuration button twice from the desktop on both PCs. in the window in both the PCs.

PC 1

PC 2

Configuration menu:

PC 1
Node id

PC 2
Node id

0 on config menu 1 and 1 on config menu 2


CSMA/CD

0 on config menu 1 and 1 on config menu 2


CSMA/CD

Protocol Baud Rate

8Kbps (At both the config menu and NEU)

Protocol Baud Rate

8Kbps (At both the config menu and NEU)

Duration 100s Duration 100s Packet 1000 bytes Packet 1000 bytes Length Length Bit Delay 0(at NEU) Bit Delay 0(at NEU) Direction Direction Sender Sender Note: All the nodes have to be configured as Senders. Set the topology as Bus.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

11

LAN-T

CSMA/CD

N*P G = -----C * ta
G is the generated load in the network.

Equation A

N is the number of nodes participating in the network. For example, let us say that 4 nodes (using 2 computers) P is the packet length expressed in bits; say 100 bytes (800 bits). C is the data rate normally set as 8kbs, which is selected in the NEU.

ta is the inter packet delay expressed in seconds; the time interval between two consecutive
packets generated.

So, lets assume ta= 40 milliseconds and substitute the above mentioned parameters in the Equation A which leads to G = 10. Like wise assume various values of ta to generate offer loads in the range of 0.1 to 10. Substitute the value of ta in the configuration menu. 3. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough. command.

PC 1

PC 2

4. Run the experiment by clicking button

or by choosing RUN

Start from each application. button. Only Tx

5. View the statistics window for results. To view the statistics window click on

packets and successfully transmitted packets are taken into account for CSMA/CD calculation.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

12

LAN-T

CSMA/CD

PC 1

PC 2

6. Note down the readings once the experiment is completed. 7. Repeat the above steps for various values of ta. 8. Calculate the Practical offered load from the below given formula and plot the graph between the practical Offered load and Throughput.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template.

9. Repeat the experiment for various values of Packet length, Node, Data rate.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

13

LAN-T

CSMA/CD

Calculation of Practical Throughput (X) from the obtained readings:

(Sum of Successfully Tx packet in all the nodes * Packet Length * 8) X= ----------------------------------------------------------------------------(Duration of Experiment * Data rate)

Calculation of Practical Offered load:

(Sum of Offered load count in all the nodes * Packet Length * 8)


G= -------------------------------------------------------------------------(Duration of Experiment * Data rate)

* offered load count and successfully transmitted packet count is displayed in the main window of CSMA/CD experiment.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

14

LAN-T

CSMA/CD

Model tabulation: IPD 4000 2000 800 400 200 100 40 Tx1 27 49 118 187 117 472 466 Tx 2 25 49 116 189 133 463 458 Tx 3 24 49 119 191 290 13 20 Tx 4 24 49 116 191 300 18 28 G Practical Offered Load 0.101 0.208 0.5 0.976 1.904 3.555 7.687 X Practical Throughput 0.1 0.196 0.469 0.758 0.84 0.966 0.972

Model Graph:

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

15

LAN-T

CSMA/CA

Experiment 4 CSMA/CA
Aim: Implement the CSMA/CA protocol for packet communication between a number of nodes connected to a common bus.

Procedure: Steps to configure Receiver:

1. Click on the CSMA/CA icon

from the desktop on one PC.

2. Click the Configuration

button. PC 1 Receiver

Configuration menu for Access point:

PC 1
Node id 0 Protocol ALOHA Baud Rate 8Kbps (At both the config menu and NEU) Duration 100 s Packet Length 100 Bit Delay 0 (at NEU) Direction Receiver My Address 1 Note: There should be only one Access Point and no clients in PC1. Set the topology as BUS.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

16

LAN-T

CSMA/CA

Steps to configure Clients nodes: 3. Click on the CSMACA icon 4. Click the Configuration from the desktop on the second PC. button in the window in the second PC.

PC 2

Setting the configuration menu for client nodes:

PC 2
Node id 0 on config menu 1 and 1 on config menu 2 Protocol ALOHA Baud Rate 8Kbps (At both the config menu and NEU) Duration 100 s Packet Length 100 Bit Delay 0 (at NEU) Direction Sender My Address 2 on config menu 1 and 3 on config menu 2 Note: Here the My Address should be 2 for Node Id 0 and should be 3 for Node id 1. If PC3 is used, then the My Address should be 4 for Node Id 0 and should be 5 for Node id 1 on that PC.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

17

LAN-T

CSMA/CA

N*P G = -----C * ta

Equation A

G is the generated load in the network. N is the number of nodes participating in the network (for CSMA/CA N is the number of clients). For example, let us say that 2 nodes (using 1 computer; 4 nodes using 2 computers). In CSMA/CA the access point is considered as load generating node. P is the packet length expressed in bits; say 100 bytes (800 bits). C is the data rate normally set as 8kbs, which is selected in the NEU.

ta is the inter packet delay expressed in seconds; the time interval between two consecutive
packets generated.

So, lets assume ta= 40 milliseconds and substitute the above mentioned parameters in the Equation A which leads to G = 5. Like wise assume various values of ta to generate offer loads in the range of 0.1 to 10. Substitute the value of ta in the configuration menu. 5. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough. 6. Run the experiment by clicking button or by choosing RUN Start from each application. command.

Follow the same procedures in the client side also. Once when you press the run button the following window will appear. 7. Set the Back-off time as 40 ms simultaneously in both the windows.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

18

LAN-T

CSMA/CA

PC2

8. Set the Carrier Back-off time as 40 ms simultaneously in both the windows.

PC 2

9. Set the Control Signal Handshake equal to Packet length (for this case it is 100 as the packet length is 100 bytes) simultaneously in both the windows.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

19

LAN-T

CSMA/CA

PC 2

10. Set the Data Signal Handshake equal to twice the Packet length (for this case it is 200 as the packet length is 100 bytes) simultaneously in both the windows.

PC 2

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

20

LAN-T

CSMA/CA

11. After 100 secs both the nodes stops transmitting and the following screen appear.

PC 2

12. Once the Sender stops press the OK button in the receiver Node and Press the stop and the following screen appears

Button

PC1

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

21

LAN-T Note down the readings once the experiment is completed.

CSMA/CA

13. Repeat the above steps for various values of ta. 14. Calculate the Practical offered load from the below given formula and plot the graph between the practical Offered load and Throughput.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template.

15. Repeat the experiment for various values of Packet length, Node, Data rate.
Calculation of Practical Throughput for CSMA/CA:

(Sum of ACK counts in all the clients * Packet Length * 8) X= --------------------------------------------------------------------------(Duration of Experiment * Data Rate)

Calculation of Practical Offered Load for CSMA/CA:

X=

(No of G count in all the clients * Packet Length * 8) ---------------------------------------------------------------------(Duration of Experiment * Data Rate)

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

22

LAN-T

CSMA/CA

Model Tabulation: IPD 2000 800 400 200 100 40 20 10 Tx 2 43 74 70 89 121 51 209 290 Tx 3 42 70 77 77 67 203 70 7 G- Practical Offered Load 0.104 0.245 0.499 0.923 1.797 4.156 6.842 10.468 X- Practical Throughput 0.085 0.144 0.147 0.166 0.188 0.254 0.279 0.297

Model Graph:
0.35 0.3 Throughput 0.25 0.2 0.15 0.1 0.05 0 0 2 4 6 Offered Load 8 10 12

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

23

LAN-T

Token Bus

Experiment 5 - TOKEN BUS


Aim: To implement the token passing access in BUS-LAN

Procedure: 1. Click on the Token Bus icon 2. Click the Configuration twice from the desktop. button in the window in both the PCs.

PC 1 Sender

PC 2 Sender

Setting the configuration menu:

PC 1
Node id Protocol Baud Rate Duration Packet Length My Address

PC 2
Node id Protocol Baud Rate Duration Packet Length My Address

0 on config menu 1 and 1 on config menu 2


ALOHA

0 on config menu 1 and 1 on config menu 2


ALOHA

8Kbps (At both the config menu and NEU)


100s 100 bytes

8Kbps (At both the config menu and NEU)


100s 100 bytes

0 on config menu 1 and 1 on menu 2

2 on config menu 1 and 3 on menu 2

Bit Delay 0(at NEU) Bit Delay 0(at NEU) Direction Direction Sender Sender Note: All the nodes have to be configured as Senders. Set the topology as Bus. 1: If you connect two PCs and configured four nodes then set the My Address as 0 to 3 in all four nodes, if you connect three PCs and configured six nodes then set the My Address as 0 to 5 in all six nodes. 2: Start running the experiment from the lowest priority node (i.e., from My Address 3 in case of four nodes and 5 in the case of six nodes)

_________________________________________________________________________________
BENCHMARK Quick Reference Manual

24

LAN-T

Token Bus

3: No of Nodes has to be set as 4 when two PCs are connected and 6 when three PCs are connected.

N*P G = -----C * ta
G is the generated load in the network.

Equation A

N is the number of nodes participating in the network. For example, let us say that 4 nodes (using 2 computers) P is the packet length expressed in bits; say 100 bytes (800 bits). C is the data rate normally set as 8kbs, which is selected in the NEU.

ta is the inter packet delay expressed in seconds; the time interval between two consecutive
packets generated.

So, lets assume ta= 40 milliseconds and substitute the above mentioned parameters in the Equation A which leads to G = 10. Like wise assume various values of ta to generate offer loads in the range of 0.1 to 10. Substitute the value of ta in the configuration menu.

3. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough. 4. Run the experiment by clicking button Run the all the experiments at the same time. or by choosing RUN

command.

Start from each application.

PC 1

PC 2

Note: While you do this THT window pops up, enter the THT time in all nodes and press the OK button first in the node, which has the lowest priority of My Address. 5. Set the Token Holding Time (THT) (say 10000 ms).

_________________________________________________________________________________
BENCHMARK Quick Reference Manual

25

LAN-T 6. View the statistics window for results. To view the statistics window click on

Token Bus button.

PC 1

PC2

7. Note down the readings once the experiment is completed. 8. Repeat the above steps for various values of ta. 9. Calculate the Practical offered load from the below given formula and plot the graph between the practical Offered load and Throughput.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template.

10. Repeat the experiment for various values of Packet length, Node, Data rate. 11. Repeat the above steps, while running the experiment set the BER to 10-2 in the NEU or try to stop one of the nodes and observe the behavior and explain the same.

Calculation of Practical Throughput (X) from the obtained readings:

(Sum of Tx packet in all the nodes * Packet Length * 8) X= ----------------------------------------------------------------------------(Duration of Experiment * Data rate)

_________________________________________________________________________________
BENCHMARK Quick Reference Manual

26

LAN-T

Token Bus

Calculation of the Offered load:

N*P G = -----C * ta
G Offered load N Number of nodes P Packet length in bits C Data rate in bits/sec

ta Inter packet delay in millisecs.

Model Tabulation: IPD 16000 8000 4000 2000 1000 Tx 1 7 11 18 24 20 Tx 2 7 11 21 20 18 Tx 3 9 11 26 21 30 Tx 4 5 13 19 24 20 G - Offered Load 0.25 0.5 1 2 4 X Practical Throughput 0.28 0.46 0.84 0.89 0.88 Avg Delay 12205.5 7787.75 11265 28604.75 38216

Model Graph

_________________________________________________________________________________
BENCHMARK Quick Reference Manual

27

LAN-T

Token Ring

Experiment 6 - TOKEN RING


Aim: To implement the token passing access in RING-LAN

Procedure: 1. Click on the Token ring icon 2. Click the Configuration twice from the desktop. button in the window in both the PCs.

PC-1

PC2

Setting the configuration menu:

PC 1
Node id Protocol Baud Rate

PC 2
Node id Protocol Baud Rate

0 on config menu 1 and 1 on config menu 2


RING

0 on config menu 1 and 1 on config menu 2


RING

8Kbps (At both the config menu and NEU)


100s 1000 bytes 0(at NEU)

8Kbps (At both the config menu and NEU)

Duration Packet Length Bit Delay Direction Note: All the nodes

Duration 100s Packet Length 1000 bytes Bit Delay 0(at NEU) Direction Sender Sender have to be configured as Senders. Set the topology as Ring.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

28

LAN-T

Token Ring

N*P G = -----C * ta
G is the generated load in the network.

Equation A

N is the number of nodes participating in the network. For example, let us say that 4 nodes (using 2 computers) P is the packet length expressed in bits; say 100 bytes (800 bits). C is the data rate normally set as 8kbs, which is selected in the NEU.

ta is the inter packet delay expressed in seconds; the time interval between two consecutive
packets generated.

So, lets assume ta= 40 milliseconds and substitute the above mentioned parameters in the Equation A which leads to G = 10. Like wise assume various values of ta to generate offer loads in the range of 0.1 to 10. Substitute the value of ta in the configuration menu.

3. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough. 4. Run the experiment by clicking button Run the all the experiments at the same time. 5. Set the Token Holding Time (THT) (say 10000 ms). 6. View the statistics window for results. To view the statistics window click on or by choosing RUN

command.

Start from each application.

button.

PC 1

PC2

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

29

LAN-T 7. Note down the readings once the experiment is completed. 8. Repeat the above steps for various values of ta.

Token Ring

9. Calculate the Practical offered load from the below given formula and plot the graph between the practical Offered load and Throughput.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template.

10. Repeat the experiments for various values of Packet length, Node, Data rate. 11. Repeat the above steps, while running the experiment set the BER to 10-2 in the NEU or try to stop one of the nodes and observe the behavior and explain the same.

Calculation of Practical Throughput (X) from the obtained readings:

(Sum of Tx packet in all the nodes * Packet Length * 8) X= ----------------------------------------------------------------------------(Duration of Experiment * Data rate)

Calculation of the Offered load:

N*P G = -----C * ta
G Offered load N Number of nodes P Packet length in bits C Data rate in bits/sec

ta Inter packet delay in millisecs.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

30

LAN-T

Token Ring

Model Tabulation: Tx IPD 16000 8000 4000 2000 1000 Node1 6 12 19 22 30 Tx Node2 6 13 19 22 27 Tx Node3 6 14 28 30 21 Tx Node4 6 14 28 25 21 G - Offered Load 0.25 0.5 1 2 4 XThroughput 0.24 0.53 0.94 0.99 0.99 Avg Delay 3779.75 3708.25 3658.5 28270.75 37720.25

Model Graph
G Vs X 1 Throughput 0.8 G Vs X
Delay
40000 30000 20000 10000 0

Avg Delay

Avg Delay

0.6 0.4 0.2 0 0 1 2 3 4 5 Offered Load

0.2

0.4 0.6 Throughput

0.8

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

31

LAN-T

STOP AND WAIT

Experiment 7 STOP & WAIT


Aim: Provide reliable data transfer between two nodes over an unreliable network using the stopand-wait protocol

Procedure:

1. Click on the Stop & Wait icon 2. Click the Configuration

from the desktop on both PCs.

button in the window in both the Pcs.

PC 1 SENDER

PC 2 RECEIVER

Setting the configuration menu:

PC 1
Node id Protocol Baud Rate

PC 2
Node id Protocol Baud Rate

0
CSMA/CD

0
CSMA/CD

8Kbps (At both the config menu and NEU)

8Kbps (At both the config menu and NEU)

Duration 100s Duration 100s Packet Length 1000 bytes Packet Length 1000 bytes Bit Delay 0(at NEU) Bit Delay 0(at NEU) Direction Direction Sender Receiver 3. Set the Inter Packet Delay to 400msecs _____________________________________________________________________ BENCHMARK Quick Reference Manual

32

LAN-T 4. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough. 5. Run the experiment by clicking button 6. Set the Timeout Value to 1500 ms or by choosing RUN

STOP AND WAIT command.

Start from each application.

PC 1 SENDER

PC 2 RECEIVER

7. Note down the no of successfully Transmitted Packets. 8. Repeat the above steps for various time out values and plot the graph between timeout Value & Throughput. Find the optimum timeout value from the plot.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template

9. Explain why the throughput is less compared to CSMACD protocol.

Calculation of Practical Throughput:

(Sum of Successfully Tx packets * Packet Length * 8) X = --------------------------------------------------------------------------------(Duration of Experiment * Data rate)

_____________________________________________________________________ BENCHMARK Quick Reference Manual

33

LAN-T

STOP AND WAIT

Model Tabulation: Time out value in ms 1000 1500 2000 3000 4000 Model Graph: Successfully Tx packets 1 2 52 52 52 Practical Throughput 0.01 0.02 0.52 0.52 0.52

Time out Vs Throughput


0.6

Throughput

0.4 X - Throughput 0.2

0 0 1000 2000 3000 4000 5000 Time Out

_____________________________________________________________________ BENCHMARK Quick Reference Manual

34

LAN-T

STOP AND WAIT WITH BER

Experiment 8 STOP & WAIT WITH BER


Aim: Provide reliable data transfer between two nodes over an error network using the stop-andwait protocol

Procedure: 1. Set the error rate to 10-2 in the NEU. 2. Follow the Stop and Wait Experiment procedure for running the experiment. 3. Set the time out value as 3000 ms in the sender window.

PC 1 SENDER

PC 2 RECEIVER

4. From the Statistics window note down the number of successfully transmitted packets and calculate the throughput. (Calculation of throughput is same as explained in the previous expt.) 5. Repeat the Experiment by setting different BER in the NEU. 6. Use the values to plot the graph between BER Vs Throughput
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

35

LAN-T

STOP AND WAIT WITH BER

Model Tabulation: BER 10-6 10-5 10-4 10-3 10-2 Successfully Tx packets 53 52 9 40 0 Theoretical Throughput 0.53 0.52 0.49 0.39 0 Practical Throughput 0.53 0.5232 0.4675 0.1787 0

Model Graph:
BER Vs Throughput
0.6 0.5 Throughput 0.4 0.3 0.2 0.1 0 0 2 4 BER 6 8 X - Throughput Actual X

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

36

LAN-T

SLIDING WINDOW GO BACK N

Experiment 9 SLIDING WINDOW GO BACK N


Aim: Provide reliable data transfer between two nodes over an unreliable network using the sliding window go back N protocol Procedure: 1. Click on the Sliding Window GBN icon 2. Click the Configuration from the desktop on both PCs.

button in the window in both the Pcs.

PC 1 SENDER

PC 2 RECEIVER

Setting the configuration menu:

PC 1
Node id Protocol Baud Rate

PC 2
Node id Protocol Baud Rate Duration Packet Length Bit Delay Direction No of packets the window size.

0
CSMA/CD

0
CSMA/CD

8Kbps (At both the config menu and NEU)

8Kbps (At both the config menu and NEU)


100s 1000 bytes 0(at NEU)

Duration 100s Packet Length 1000 bytes Bit Delay 0(at NEU) Direction Sender No of packets 4 Note: The No of Packets parameter defines

Receiver 4

3. Set the Inter Packet Delay to 400msecs _____________________________________________________________________ BENCHMARK Quick Reference Manual

37

LAN-T

SLIDING WINDOW GO BACK N command.

4. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough.

5. Run the experiment by clicking button 6. Set the Timeout Value to 1500 ms

or by choosing RUN

Start from each application.

PC 1 SENDER

PC 2 RECEIVER

7. Note down the no of successfully Transmitted Packets. 8. Repeat the above steps for various time out values and plot the graph between timeout Value & Throughput. Find the optimum timeout value from the plot.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template

9. Explain why the throughput is less compared to CSMACD protocol.

Calculation of Practical Throughput:

(Sum of Successfully Tx packets * Packet Length * 8) X = --------------------------------------------------------------------------------(Duration of Experiment * Data rate)

_____________________________________________________________________ BENCHMARK Quick Reference Manual

38

LAN-T

SLIDING WINDOW GO BACK N

Model Tabulation: Time out value in ms 1000 1500 2000 3000 4000 Successfully Tx packets 0 33 65 66 67 Practical Throughput 0 0.33 0.65 0.66 0.67

Model Graph:

Time out Vs Throughput


0.8 0.6 0.4 0.2 0 0 1000 2000 3000 4000 5000 Time Out

Throughput

X - Throughput

_____________________________________________________________________ BENCHMARK Quick Reference Manual

39

LAN-T

SLIDING WINDOW GO BACK N WITH BER

Experiment 10 SLIDING WINDOW GO BACK N WITH BER


Aim: Provide reliable data transfer between two nodes over an error network using the sliding window GBN protocol

Procedure: 1. Set the error rate to 10-2 in the NEU. 2. Follow the Sliding Window GBN experiment procedure for running the experiment. 3. Set the time out value as 3000 ms in the sender window.

PC 1 SENDER

PC 2 RECEIVER

4. From the Statistics window note down the number of successfully transmitted packets and calculate the throughput. (Calculation of throughput is same as explained in the previous expt.) 5. Repeat the Experiment by setting different BER in the NEU. 6. Use the values to plot the graph between BER Vs Throughput
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template

_____________________________________________________________________ BENCHMARK Quick Reference Manual

40

LAN-T Model Tabulation: BER 10-6 10-5 10-4 10-3 10-2 Successfully Tx packets 67 16 1 0 0 Theoretical Throughput 0.63 0.55 0.18 0 0 Practical Throughput 0.67 0.16 0.01 0 0

SLIDING WINDOW GO BACK N WITH BER

Model Graph:
BER Vs Throughput
0.8 0.7 Throughput 0.6 0.5 0.4 0.3 0.2 0.1 0 0 2 4 BER 6 8 X - Throughput Actual X

_____________________________________________________________________ BENCHMARK Quick Reference Manual

41

LAN-T

Sliding Window Selective Repeat

Experiment 11 SLIDING WINDOW SELECTIVE REPEAT


Aim: Provide reliable data transfer between two nodes over an unreliable network using the sliding window selective repeat protocol

Procedure:

1. Click on the Selective Repeat icon 2. Click the Configuration

from the desktop on both PCs.

button in the window in both the Pcs.

PC 1 SENDER

PC 2 RECEIVER

Setting the configuration menu:

PC 1
Node id Protocol Baud Rate

PC 2 0
ALOHA Node id Protocol Baud Rate

0
ALOHA

Duration 100s Duration Packet Length 1000 bytes Packet Length Bit Delay 0(at NEU) Bit Delay Direction Direction Sender No of packets No 4 packets Note: The No of Packets parameter defines the window size.

8Kbps (At both the config menu and NEU)

8Kbps (At both the config menu and NEU)


100s 1000 bytes 0(at NEU) of

Receiver 4

_____________________________________________________________________ BENCHMARK Quick Reference Manual

42

LAN-T 3. Set the Inter Packet Delay to 400msecs

Sliding Window Selective Repeat

4. Click OK button and Download the driver to the NIU using the BOOT button Booting from any one of the applications is enough. 5. Run the experiment by clicking button application. 6. Set the Timeout Value to 1000 ms or by choosing RUN

command.

Start from each

PC 1 SENDER

PC 2 RECEIVER

7. Note down the no of successfully Transmitted Packets. 8. Repeat the above steps for various time out values and plot a graph between timeout Value & Throughput. Find the optimum timeout value from the plot.
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template

Explain why the throughput is less compared to CSMACD protocol.

Calculation of Practical Throughput:

(Sum of Successfully Tx packets * Packet Length * 8) X = --------------------------------------------------------------------------------(Duration of Experiment * Data rate)


_____________________________________________________________________ BENCHMARK Quick Reference Manual

43

LAN-T

Sliding Window Selective Repeat

Model Tabulation: Time out value in ms 1000 1500 2000 3000 4000 Model Graph: Successfully Tx packets 36 48 67 67 67 Practical Throughput 0.36 0.48 0.67 0.67 0.67

Time out Vs Throughput


0.8 0.6 0.4 0.2 0 0 1000 2000 3000 4000 5000 Time out X-Throughput

_____________________________________________________________________ BENCHMARK Quick Reference Manual

Throughput

44

LAN-T

Sliding Window Selective Repeat with BER

Experiment 12 SLIDING WINDOW SELECTIVE REPEAT WITH BER


Aim: Provide reliable data transfer between two nodes over an error network using the sliding window selective repeat protocol Procedure: 1. Set the error rate to 10-2 in the NEU. 2. Follow the Sliding Window Selective Repeat experiment procedure for running the experiment. 3. Set the time out value as 3000 ms in the sender window.

PC 1 SENDER

PC 2 RECEIVER

4. From the Statistics window note down the number of successfully transmitted packets and calculate the throughput. (Calculation of throughput is same as explained in the previous expt.) 5. Repeat the Experiment by setting different BER in the NEU. 6. Use the values to plot the graph between BER Vs Throughput
Note: You can also use the template for plotting the graph. Please refer Appendix-1 to plot the graph using the template

_____________________________________________________________________ BENCHMARK Quick reference Manual

45

LAN-T

Sliding Window Selective Repeat with BER

Model Tabulation: BER 10-6 10-5 10-4 10-3 10-2 Successfully Tx packets 64 60 33 0 0 Theoretical Throughput 0.63 0.55 0.19 0 0 Practical Throughput 0.64 0.6 0.33 0 0

Model Graph:
BER Vs Throughput
0.8 0.7 Throughput 0.6 0.5 0.4 0.3 0.2 0.1 0 0 2 4 BER 6 8 X - Throughput Actual X

_____________________________________________________________________ BENCHMARK Quick reference Manual

46

LAN-T

Packet Transmission

Experiment 13 PACKET TRANSMISSION

1. Click on the Pkt icon

from the desktop of both the PCs. in the window in both the PCs.

2. Click the Configuration button

PC 1 SENDER

PC 2 RECEIVER

Setting the configuration menu:

PC 1
Node id Baud Rate Duration Packet Length Bit Delay Direction My Address Node id 0 8Kbps (At both the Config Baud Rate menu and NEU) 100s 100 bytes 0(at NEU) Duration Packet Length Bit Delay Direction My Address

PC 2 0 8Kbps (At both the config menu and NEU)


100s 100 bytes 0(at NEU)

Sender 1

Receiver 2

3. Download the driver to the NIU using the BOOT

button command for both PCs.

4. Run the Receiver node first & then the transmitter window. Enter the receivers my address in the senders dialogue box, once it is prompted.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

47

LAN-T

Packet Transmission

PC 1 SENDER

5. After this the sender will display another Get String dialogue box, here you can key in your string using the keyboard & press the ok button.

PC 1 SENDER

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

48

LAN-T

Packet Transmission

6. Observe the text in the receiver node. If an empty message is sent, both the sender and receiver should terminate.

PC 1 SENDER

PC 2 RECEIVER

Set the BER to 10

-4

and repeat the above-mentioned steps and observe the results.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

49

LAN-T

FTP & PACKET SNIFFING

Experiment 14 FTP & PACKET SNIFFING

1. Click on the FTP icon

from the desktop on both PCs. in the window in both the PCs.

2. Click the Configuration button

PC 1 SENDER

PC 2 RECEIVER

Setting the configuration menu:

PC 1
Node id Baud Rate

PC 2
Node id Baud Rate

0 8Kbps (At both the config menu and NEU)


100s 100 bytes 0(at NEU)

0 8Kbps (At both the config menu and NEU)


100s 100 bytes 0(at NEU)

Duration Packet Length Bit Delay Direction

Sender

Duration Packet Length Bit Delay Direction

Receiver

3. Set the IPD as 40 ms. 4. Download the driver to the NIU using the BOOT button command for both PCs.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

50

LAN-T

FTP & PACKET SNIFFING

5. Run the Receiver node first & then the transmitter window. While you do this, the sender node will display a GetInt message box, if you want to transmit a file from Client to server, Enter 1 or else if you want to download a file from Server to client, press 2.

PC 1 SENDER

6. Then Specify the Path of the file either to transmit or to download (i.e. c:\test.txt) & specify
the timeout value.

PC 1 SENDER

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

51

LAN-T

FTP & PACKET SNIFFING

7. At the end of transmission, the file will be stored in the server nodes desktop.

PC 1 SENDER

PC 2 RECEIVER

8. Now, open Packet Sniffing application

in another computer and set the configuration

parameters of FTP receiver as explained above and set the node ID of the Packet sniffer as 1.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

52

LAN-T

FTP & PACKET SNIFFING

9. Run the packet sniffer application first and then FTP client & server application as explained above.

10. Once the File transfer is over between the client node & the server node, press the stop button in the packet sniffer node and open the CapturedPkt.LanT in the desktop using WordPad or notepad application, the contents of the file which has been transmitted between the client & server node can be seen in the packet sniffer node. 11. Repeat the above-mentioned experiment with the encrypted file and observe the result.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

53

LAN-T

RC4 Key

Experiment 15 - RC4 Key


Aim: Understand the steps involved in RC4 algorithm encryption and decryption process.

Initial set-up: Install jre 1.5(java run time environment) to run this application.

Procedure: 1. Double click on icon.

2. Select Step mode and type any text to encrypt. Type any encryption key in either text or binary mode. 3. Click the Next button from the right side panel.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

54

LAN-T

RC4 Key

4. Now the State table and Key tables are formed. (S Box contains a matrix of 256 values starting from 0 and K Box contains the matrix of repeated ASCII values of the key entered). 5. The flow of the algorithm in each step is explained in the description panel on the right side. 6. In the next step the permutated values are stored in the S Box Permutation. 7. Key bit stream is generated from the values obtained from S Box Permutation.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

55

LAN-T

RC4 Key

8. XOR operation is done between the binary value and key bit stream generated.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

56

LAN-T 9. Cipher text is formed corresponding to the XOR value generated.

RC4 Key

10. Copy the cipher text by selecting and pressing ctrl + c. 11. Click the clear button and paste the cipher text in the text field. 12. Enter the same key that is used for encryption.

13. Now you could retrieve back the original message.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

57

LAN-T

RC4 Key

Exercises: Using the RC4 Encryption scheme, encrypt a character with a key and observe the cipher text. Repeat the same procedure for a different key but with the same text and see if there is any relation between them. Repeat with two same characters and observe whether the cipher text also gets repeated.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

58

LAN-T

Encrypting a file using RC4 algorithm

Experiment 16 - Encrypting a file using RC4 algorithm


Initial Setup: 1. Browse C:\Lantrain\DataSecurity. 2. Copy the RC4 folder and three class files (Connect, RC4Client, Server) and paste it into the Java\jdk1.5\bin folder in both the server and client PCs

Setting up the Server: 1. Open the command prompt window (Start 2. Browse the java bin folder. 3. Type java Server to run the server. Run type cmd).

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

59

LAN-T

Encrypting a file using RC4 algorithm

Encrypting a file: 1. Open command prompt in the client side. 2. Browse the java bin folder. 3. Type java RC4Client. 4. Enter the IP address of the server. 5. Enter the mode of operation. 6. Enter the Encryption key not more than 5 characters. 7. Enter the path name of the file to be encrypted. (for eg: c:\\abc.txt) 8. Type YES if you like to close the session or type NO if you like to continue decrypting the Cipher text. 9. The encrypted text is available in c:\output.txt. 10. Try to re-arrange the cipher text using any crypt-analysis tool.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

60

LAN-T

Encrypting a file using RC4 algorithm

Decrypting the Cipher text file: 1. Enter the mode of operation as DEC for decrypting the cipher text. 2. Enter the Decryption key same as used for Encryption. 3. Enter the full path name of the file to be decrypted. (i.e., c:\\output.txt) 4. Find out the decrypted file in c:\\output.txt.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

61

LAN-T

File transfer using Socket FTP

Experiment 17 File transfer using Socket FTP


Aim: To establish a socket connection between two computers and use it to reliably transfer a file. Initial set-up: Copy and paste FTPGui folder in C: and SocketFTP.exe file in C:\Lantrain\bin\ Connect the Ethernet (RJ-45) ports of two PCs with the supplied swap cable. Since these 2 PCs are connected and there is no DHCP so to assign IP address, setup two PCs IP address and gateway as follows 1st PC: IP address Gateway 2nd PC: IP address Gateway : : 192.168.0.2 192.168.0.2 : : 192.168.0.1 192.168.0.1

Check if there is a connection between them by opening a browser and typing the other PCs IP address. The other PCs Directory structure will be displayed in the browser and this is the indication that the connection is established between the PCs.

Procedure:

1. Double click on

icon from the desktop.

2. Setup username, password, server ip address, and server port no in the application.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

62

LAN-T

File transfer using Socket FTP

3. Ensure that the FTPServer and Overwrite check boxes are checked.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

63

LAN-T 4. Click Start Server button.

File transfer using Socket FTP

5. Click ok to continue. 6. Open FTP client in another PC.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

64

LAN-T

File transfer using Socket FTP

7. Check the FTPClient and Verbose check box. 8. Give the same username, password, server ip address, port number and segment size (say 128 or 256 or 1024) and specify the file that has to be sent. 9. Click Send File. 10. Now you could find your file in C:\FTPGui of the server. Exercises: In this exercise, you will verify the various features of the server. In each case, select a file F and proceed as directed. Note the reason for failure (if any) Give the correct username but wrong password. Give the wrong username but correct password. Give the correct username and password and transfer the file. Now, repeat with overwrite mode turned off. Using the file manager on the server, make the file F read-only. overwrite mode on and transfer the file. Specify the wrong server IP address and port number. Now, on the client turn

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

65

LAN-T

File transfer using Socket FTP

Select a file of size at least 1MB, set verbose mode on and send it to the server. Note the time taken and compute, throughput = file size/time taken. Repeat the experiment with verbose mode off. Compare the throughputs and explain the difference. With verbose mode off, compute the throughput for files of size 1B, 1000 B, 10 KB, 1 MB, and 10 MB. Explain the differences. (Note: it will help to plot a graph of throughput versus file size, with a logarithmic x-axis). Start a transfer of a large file with verbose mode on. Immediately unplug the Ethernet cable. After couple of seconds plug the cable back. Compute the throughput. Now repeat, except do not plug in the cable. Note the time taken for the client to time out and give up.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

66

LAN-T

Distance vector routing protocol

Experiment 18 Distance Vector routing protocol

Aim: To simulate the distance vector routing protocol to maintain routing tables as the traffic and topology of the network changes

Procedure: 1. Double click on 2. Click LanT Routing Simulator icon from the desktop. button and browse open C:\Lantrain\Config\ linear.txt.

3. Click

button and select Distance vector algorithm

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

67

LAN-T

Distance vector routing protocol

4. The icon in the screen represents the nodes and the green colour line represents the path. The values inside the braces represents the Forward and Reverse weights.

5. Click on the node

icon to obtain the routing table.

6. The above picture shows the nodes and its routing table.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

68

LAN-T

Distance vector routing protocol

7. Observe the routing table showing No route to some of the destinations even though there is a physical connection. This is because the routing table of the corresponding nodes is not been updated since there is no hopping. To update the routing table click button.

8. Hopping happens by clicking

button.

9. Now after several hopping the routing table gets updated. As the number nodes increases, the number of hopping increases. This is one of the disadvantages of distance vector algorithm.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

69

LAN-T

Distance vector routing protocol

Exercises: Click on a link and increase its cost. Run the simulation for several periods until convergence is obtained. Calculate the number of periods required for convergence. Try the same experiment for Mesh structure. Load mesh.txt in the simulator and run the simulator until convergence. Now double the cost of a link at the left edge down. Observe how many periods are required for convergence.

Count to Infinity problem 10. Click the green colour line lying between N3 and N4. 11. Enter the forward and reverse weight as -1 in order to disconnect N4 from the other nodes

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

70

LAN-T 12. Now observe the routing table.

Distance vector routing protocol

13. Now you could observe that there are no changes in the routing table, as they are not updated. Click button to update the routing table.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

71

LAN-T

Distance vector routing protocol

14. Even after several hopping the routing tables of N0, N1, N2, N3 shows the path and weight to N4. These false updates are another disadvantage in the Distance vector algorithm.

Exercises Try the same experiment for Mesh structure and observe the impact of Link state routing algorithm. Draw some network on paper and assign costs to each link. Create a file my network.txt following the format in mesh.txt to correspond to this network. Load this file in the simulator. Ensure that the network diagram and the cost matrix are the same as what is on your paper. If they do not tally, check the format of the file carefully.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

72

LAN-T

Distance vector algorithm

Experiment19 Link State routing protocol


Link state algorithm Aim: To simulate the link state routing protocol to maintain routing tables as the traffic and topology of the network changes

Procedure: 1. Double click on 2. Click LanT Routing Simulator icon from the desktop. button and browse open C:\Lantrain\Config\linear.txt.

3. Click

button and select Link state algorithm

4. Click on the nodes to obtain the routing table.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

73

LAN-T

Distance vector algorithm

5. Click the

button to update the routing table. Routing table of entire nodes gets updated

after a single hopping. This is one of the advantages of Link state algorithm over Distance vector algorithm.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

74

LAN-T

Distance vector algorithm

Exercises: Click on a link and increase its cost. Run the simulation for several periods until convergence is obtained. Calculate the number of periods required for convergence. Try the same experiment for Mesh structure. Load mesh.txt in the simulator and run the simulator until convergence. Now double the cost of a link at the left edge down. Observe how many periods are required for convergence.

Count to Infinity problem: 6. Click on the green colour line lying between N3 and N4. 7. Enter forward and reverse weights as -1 to disconnect N4 from the other nodes.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

75

LAN-T

Distance vector algorithm

8. Observe the routing table. The values are not changed as its not updated. 9. Click the single step button.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

76

LAN-T

Distance vector algorithm

10. Now you could see the routing table for each nodes been updated. This is the advantage of Link state algorithm over Distance vector algorithm. Exercises Try the same experiment for Mesh structure and observe the impact of Link state routing algorithm. Draw some network on paper and assign costs to each link. Create a file my network.txt following the format in mesh.txt to correspond to this network. Load this file in the simulator. Ensure that the network diagram and the cost matrix are the same as what is on your paper. If they do not tally, check the format of the file carefully.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

77

LAN-T

Appendix 1 Graph Plot Procedure Procedure to plot graph for MAC Layer experiments using MS EXCEL template

Save the readings of the MAC layer experiments by clicking Save button from the Statistics window in all the nodes.

By default the file get saved in the Desktop. (You can also save it in other location). Organise all the files in a common location. Open MS EXCEL. Browse open .xls file in c:\Lantrain\Stat. (Say:\Lantrain\Stat\Aloha\P100\ALOHAP100.xls). Click Node1 sheet.

Go to Data

Refresh data.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

78

LAN-T

Appendix 1 Graph Plot Procedure

Browse the respective file to be replaced with existing data for Node1.

Repeat the above step for all the four nodes. Now click the RESULT USING 4 nodes sheet to view the graph.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

79

LAN-T

Appendix 1 Graph Plot Procedure

Note: Save exact seven readings for MAC experiments while using this template. Shortage or excess number of readings may produce errors.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

80

LAN-T

Appendix 1 Graph Plot Procedure

Procedure to plot graph for LLC Layer experiments using MS EXCEL template

Save the readings of the LLC layer experiments by clicking Save button from the Statistics window from the sender and receiver nodes.

By default the file get saved in the Desktop. (You can also save it in other location). Organise all the files in a common location. Open MS EXCEL. Browse open .xls file in c:\Lantrain\Stat. (Say:\Lantrain\Stat\Stop and Wait\P1000\Stop and wait P1000.xls). Click Timeout Vs X sheet.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

81

LAN-T

Appendix 1 Graph Plot Procedure

Scroll up to the sender readings.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

82

LAN-T Go to Data Refresh data option.

Appendix 1 Graph Plot Procedure

Browse the respective file to be refreshed for the existing data.

Repeat the same to refresh the existing Receiver data with your data.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

83

LAN-T Scroll down to see the plot

Appendix 1 Graph Plot Procedure

9. Follow the same procedure to Plot BER vs X.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

84

LAN-T

Appendix 2 Configuration menu details

Config View displays the configuration dialog box where all the parameter values are displayed. Node Id - Specify that that particular application/experiment window should be as node 0 or 1.

This is the one that differentiates the two applications in the same PC. Protocol Baud Rate - Specify the MAC Protocol that NIU has to emulate. By default, it is set to Aloha - Specify the data rate between 8Kbps and 1Mbps. (Only for CSMA/CD and Ring

mode, this needs to be set both in the Application window and the NEU. For Aloha and CSMA, settings in NEU are sufficient.) No of Nodes - Specify the number of nodes in the network that are used to do Token Ring experiment. This field may be used for other purposes while writing codes for suggested experiments in exercise also. Duration - Specify the duration of the experiment in seconds.

Packet Length - Specify the length of packets that are used in the experiment. Can be set to a maximum of 1000 bytes.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

86

LAN-T

Appendix 2 Configuration menu details

Inter Packet Delay - Specify the inter packet delay (that is equivalent to the inter packet arrival time) based on the calculation suggested in the experiments. This has to be in milliseconds. Number of Packets - Specify number of packets in a window for Sliding Window experiment. This field may be used for other purposes while writing codes for suggested experiments in exercise, say for example, to specify number of packets to be transmitted or received in a MAC experiment instead of following time. My Address - Specify the address of each node (between 1 and 6) in top layers. For example, the server uses this field in FTP to identify the client for sending and receiving files. Rx Mode - Specify Promiscous or Non-Promiscous mode of packet reception. By default all the

stand-alone experiments use promiscuous mode of reception (receives all the packet). Altering this field will not have effect in the stand-alone experiments. Refer programmers manual for using various types while writing codes for exercises. I/O Mode - Fixes the types of transmit and receive modes. In majority of the stand-alone

experiments, blocking transmit and receive is used and the other types are left for the user to implement wherever necessary as suggested in exercises. Altering this field will not have effect in the stand-alone experiments. Refer programmers manual for using various types while writing codes for exercises. Token Release Mode - Specify the type of token release mode to be followed in token ring.

Manual token release is used in token ring experiment. Altering this field will not have effect in this stand-alone experiment. Refer programmers manual for using various types while writing codes for exercises. Direction - Specify which direction to be followed by each node. In MAC experiments, Sender

will only transmit data packets and Receiver will only receive. In DLL experiments, Sender will transmit data packets and receive acknowledgement packets while Receiver will receive them and transmit acknowledgement packets. In FTP Sender is the client and Receiver is the server. Boot File Name - Name and path of the NIU driver file. This is for future use. The default file and location is C:\Lantrain\bin\LantV13.exe. It may be left to this default name.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

87

LAN-T Developing LAN Trainer Applications

Appendix 3 Developing LAN-T applications

The LAN Trainer API is a Windows DLL (Dynamic Link Library) written in C. Microsoft Visual C++ compiler that comes under Microsoft Visual Studio is used for the Shell and the experiments. Microsoft Visual Studio provides a development environment for Visual C++. This integrated set of tools runs under Windows 95, 98, Windows NT or Windows 2000 or other operating systems as recommended by Microsoft. The Developer Studio user-interface consists of an integrated set of windows, tools, menus, toolbars, directories, and other elements that allow you to create, test, and refine your application in one place. This Appendix describes the organization of the source code into workspaces and projects and how you can use the LAN Trainer to write network software. You can modify the source code of the experiments supplied with the LAN Trainer or implement different protocols and projects by creating them as new experiments. Finally, if you wish, you can customize the LAN Trainer shell. Organisation of LAN Trainer Source Code LAN-T software uses a single workspace for all the experiments and therefore all experiment projects are created under the workspace called Expts.dsw that will be in C:\Lantrain\Src directory. A workspace is the one that contains one or more projects. A project is the one that generates the executable file (ex: MAC.exe). In LAN-T software, Expts.dsw is the workspace and the experiments are the projects namely, MAC (for ALOHA, CSMA, CSMA/CD), TknBus, TknRing, Pkt, SlWinGBN, StopWait, FTP. Modifying an Existing Experiment MAC experiment is taken here as an example to list the steps involved in modifying an existing experiment. Each experiment is a project under the workspace discussed above. Open experiment workspace from the following path C:\Lantain\Src\Expts.dsw in VC++ Make the project that you want to modify, say MAC, active using the option Set Active Project from the Project menu. Open MAC.cpp from the Source folder and do the necessary coding. Save workspace using Save Workspace menu option under File menu and Build the project (Build is the process of compilation and linking that creates the *.exe file that is ready to run) using the key F7. Once the Build result is successful run the experiment by pressing the keys Ctrl+F5. Please refer Microsoft VC++ User Manual for more options in compiling and linking a project file.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

88

LAN-T Creating a New Experiment

Appendix 3 Developing LAN-T applications

Open experiment workspace from the following path C:\Lantrain\Src\Expts.dsw in VC++ Create a new project by clicking New in the File menu. Choose a project name (say Test) and choose MFC Appwizard (EXE) as project type. Check the option Add to current workspace and finally click the OK button. Select Single document and click Finish button. Now the wizard will create a Project Workspace (Test) with three directories namely Source Files (containing *.cpp files), Header Files (containing *.h files) and Resource Files (containing resource files) under it. This project will now be the active project as far as VC++

workspace is concerned. Delete all the files from this project workspace i.e. from Source Files, Header Files and Resource Files directory. [To delete a file from workspace click that file and press Del key.] Open Windows Explorer and delete all files from the working directory

(C:\Lantrain\Src\Test\) including the Res directory except the *.dsp file in our example it is Test.dsp file. Copy the following files from C:\Lantrain\Src\ShellVxy\ to the current project directory C:\Lantrain\Src\Test\ Res directory. stdAfx.cpp and stdAfx.h resource.h and resource.hm lanT.rc and lanT.aps A sample mac.cpp file Rename this mac.cpp file as Test.cpp Note: The directory and filename Shellxy represents the LAN-T Shell with Version specified by x and y. For example SHellV13 denotes LAN-T Shell Ver1.3

Above said files have to be added in the project workspace under the appropriate folder names. To add, click the folder name (say Source Files) and right click the mouse button and select Add files to Folder. This will open up the File Open dialog box through which you can add files that are listed below in their appropriate folders.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

89

LAN-T Select Source Files folder and add the following lanT.rc stdAfx.cpp Test.cpp file

Appendix 3 Developing LAN-T applications

Select Header Files folder and add the following resource.h resource.hm stdAfx.h

Select Resource Files folder and add all the files in the Res directory. Now save the entire workspace. Under Projects menu select Settings and do the following:

Select General tab and choose Use MFC in a static library. Select Link tab and link the libraries by writing Shellvxy.lib Lantrn.lib in the Object/Library modules field.

Select C\C++ tab and select the category as Precompiled headers and select the Automatic use of precompiled headers option.

Click OK button. Under Tools menu select Options and select directories tab.

Pull down Show directories for and select include files. Write C:\Latrain\Include as the last entry in the Directories field that lists already other required files.

Pull down Show directories for and select library files. Write C:\Lantrain\lib as the last entry in the Directories field that lists already other required files.

Save the entire workspace and the project is ready for coding and compilation. Choose the Test.cpp file and do the necessary coding and Build it by pressing the key F7 and run it by pressing Ctrl+F5.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

90

LAN-T Customising the Shell

Appendix 3 Developing LAN-T applications

The user-interface for all LAN Trainer experiments is provided by a collection of functions referred to as the Shell. This method is followed to focus the topic of interest in the algorithm or the method followed in implementing a protocol than on the user-interface part. Even though it is

recommended to concentrate on the protocols and its implementation the complete source code for the Shell is given in C:\Lantrain\Src\ShellVxy directory for the user to customize according to their requirements. The last two alphabets in the filename represent the version number. For example ShellV13 file is the Shell file of version number 1.3. If you wish to customize the Shell, follow the steps given below: Open experiment workspace from the following path C:\Lantrain\Src\Expts.dsw in VC++ Create a new project by clicking New in the File menu. Choose a project name (say ShellTest) and choose Win32 Static Library as project type. Check the option Add to current workspace and finally click the OK button. Click Finish button. Now wizard will create a project with two directories namely Source Files and Header Files. Add a new folder called Resource Files by clicking the right button of mouse on the project name (here ShellTest files) and selecting New Folder. This will open up a dialog box with Name of the Folder field and File extensions field. In the first field give the name as Resource Files and in the second field give *. * as file extensions. Open windows explorer and copy all the files from C:\Lantrain\Src\ShellVxy\ directory to the current project directory C:\Lantrain\Src\ShellTest\. This current

project directory would have been created in the hard disk as soon as the project is added in the workspace as said in the above step. Above said files have to be added in the project workspace under the appropriate folder names. To add, click a folder name (say Source Files) and right click the mouse button and select Add files to Folder. This will open up the File Open dialog box through which you can add files that are listed below in their appropriate folders. Select Source Files folder and add the following all cpp files (*.cpp) lanT.rc

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

91

LAN-T Select Header Files folder and add the following all header files (*.h) resource.hm

Appendix 3 Developing LAN-T applications

Select Resource Files folder and add all the files in the Res directory. Under Projects menu select Settings and do the following:

Select General tab and choose Use MFC in a static library. Select C\C++ tab and select the category as Precompiled headers and select the Automatic use of precompiled headers option.

Click OK button. Under Tools menu select Options and select directories tab.

Pull down Show directories for and select include files. Write C:\Latrain\Include as the last entry in the Directories field that lists already other required files.

Pull down Show directories for and select library files. Write C:\Lantrain\lib as the last entry in the Directories field that lists already other required files.

Save the entire workspace and the project is ready for coding and compilation. Shell has all *.cpp files appropriate for the dialogs used in the user-interface and mainframe.cpp for tool bar and menu. You may modify them or add or remove dialogs as you wish and save them. After finishing the coding, Build it by pressing the key F7 and it will create a lib file (here ShellTest.lib) in the debug directory. Copy this lib file from the debug directory to C:\Lantrain\Lib directory and copy Ltulib.h from the shell working directory (here C:\Lantrain\ShellTest\) to C:\Lantrain\Include directory.

Linking the new Shell library with experiments

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

92

LAN-T 1. 1.

Appendix 3 Developing LAN-T applications Copy the following files from the working directory of the newly created library (here

C:\Lantrain\Src\ShellTest\) to the experiment project directory (say C:\Lantrain\Src\MAC\) - the one you wish to use with the new user-interface: a. a. b. b. c. c. d. d. Res directory. stdAfx.cpp and stdAfx.h resource.h and resource.hm lanT.rc and lanT.aps

2) 2)

Under Projects menu select Settings and select Link tab and link the library by changing

the old library name to new library name alone (say ShellV13.lib to ShellTest.lib) in the Object/Library modules field. Leave the Lantrn.lib as unchanged in that field. 3) 3) Select RebulidAll from the Project menu to compile the experiment. Now the experiment is

ready to run with the new user-interface.

__________________________________________________________________________________
BENCHMARK Quick Reference Manual

93

You might also like