lant v1_4_3

95
LAN-T Quick reference manual v1.4.3

Upload: sudha1406

Post on 24-Oct-2014

43 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LANT v1_4_3

LAN-T Quick reference manual v1.4.3

Page 2: LANT v1_4_3

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.

Page 3: LANT v1_4_3

Contents

1. Aloha…………………………………………………………………………..... 1

2. CSMA……………………………………………………………………………. 6

3. CSMA/CD……………………………………………………………...……...... 11

4. CSMA/CA……………………………………………………………………...... 16

5. Token Bus………………………………………………………………………. 24

6. Token Ring…………………………………………………………….............. 28

7. Stop and Wait………………………………………………………………….. 32

8. Stop and Wait with BER……………………………………………………… 35

9. Sliding Window Go Back N………………………………………………….. 37

10. Sliding Window Go Back N with BER……………………………………... 40

11. Sliding Window Selective Repeat………………………………………….. 42

12. Sliding Window Selective Repeat with BER……….…………………….. 45

13. Packet Transmission…………………………………………………………. 47

14. File transfer and Packet Sniffing…………………………………………… 50

15. RC4 Key………………………………………………………………………… 54

16. Encrypting a file using RC4 algorithm……………………………………. 59

17. File transfer using Socket FTP……………………………………………… 62

18. Distance vector routing protocol…………………………………………… 67

19. Link state routing protocol………………………………………………….. 73

20. Appendix 1 Graph plot procedure…………………………………………. 78

21. Appendix 2 Configuration menu details………………………………….. 86

22. Appendix 3 Developing Lan-T application……………………………….. 88

Page 4: LANT v1_4_3

LAN-T ALOHA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 1

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 twice from the desktop on both PC’s.

2. Click the Configuration button in the window in both the PC’s.

PC 1 PC 2

Setting the Configuration menu:

PC 1 PC 2

Node id 0 on config menu 1 and

1 on config menu 2

Node id 0 on config menu 1 and

1 on config menu 2

Protocol ALOHA Protocol ALOHA

Baud Rate 8Kbps (At both the config

menu and NEU)

Baud Rate 8Kbps (At both the config

menu and NEU) Duration 100s Duration 100s

Packet Length 100 bytes Packet Length 100 bytes

Bit Delay 0(at NEU) Bit Delay 0(at NEU)

Direction Sender Direction Sender

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

Page 5: LANT v1_4_3

LAN-T ALOHA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 2

→ 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 command.

Booting from any one of the applications is enough.

PC 1 PC 2

4. Run the experiment by clicking button or by choosing RUN ���� Start from each application.

N * P G = -------

C * ta

Page 6: LANT v1_4_3

LAN-T ALOHA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 3

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

packets and collision count are taken into account for MAC calculation.

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.

Page 7: LANT v1_4_3

LAN-T ALOHA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 4

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

Calculation of Theoretical Throughput:

Calculation of Practical Offered load:

(Sum of Successfully Tx packet in all the nodes * Packet Length * 8)

X = ---------------------------------------------------------------------------

(Duration of Experiment * Data rate)

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

G = --------------------------------------------------------------------------

(Duration of Experiment * Data rate)

X = Ge-2G

Page 8: LANT v1_4_3

LAN-T ALOHA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 5

Model tabulation:

IPD Tx1 Tx 2 Tx 3 Tx 4 G – Practical

Offered Load

X – Practical

Throughput

Theoretical

Throughput

4000 23 19 25 16 0.101 0.083 0.08

2000 36 35 38 33 0.2 0.142 0.13

800 54 48 43 60 0.444 0.205 0.18

400 52 41 39 45 0.766 0.177 0.14

200 18 26 11 19 1.293 0.074 0.04

100 10 1 4 10 1.82 0.025 0.00

40 4 0 0 6 2.484 0.01 0.00

Model Graph:

Page 9: LANT v1_4_3

LAN-T CSMA

__________________________________________________________________________________BENCHMARK Quick Reference Manual

6

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 twice from the desktop on both PC’s.

2. Click the Configuration button in the window in both the PC’s.

PC 1 PC 2

Configuration menu:

PC 1 PC 2

Node id 0 on config menu 1 and

1 on config menu 2

Node id 0 on config menu 1 and

1 on config menu 2

Protocol CSMA Protocol CSMA

Baud Rate 8Kbps (At both the config

menu and NEU)

Baud Rate 8Kbps (At both the config

menu and NEU)

Duration 100s Duration 100s

Packet Length 100 bytes Packet Length 100 bytes

Bit Delay 10 (at NEU) Bit Delay 10 (at NEU)

Direction Sender Direction Sender

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

Page 10: LANT v1_4_3

LAN-T CSMA

__________________________________________________________________________________BENCHMARK Quick Reference Manual

7

→ 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 command.

Booting from any one of the applications is enough.

PC 1 PC 2

4. Run the experiment by clicking button or by choosing RUN � Start from each application.

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

packets and collision count are taken into account for MAC calculation.

N * P

G = ------

C * ta

Page 11: LANT v1_4_3

LAN-T CSMA

__________________________________________________________________________________BENCHMARK Quick Reference Manual

8

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.

Page 12: LANT v1_4_3

LAN-T CSMA

__________________________________________________________________________________BENCHMARK Quick Reference Manual

9

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

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

Calculation of Theoretical Throughput:

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

Calculation of Practical Offered load:

(Sum of Successfully Tx packet in all the nodes * Packet Length * 8)

X = -----------------------------------------------------------------------------

(Duration of Experiment * Data rate)

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

G = --------------------------------------------------------------------------

(Duration of Experiment * Data rate)

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)

Page 13: LANT v1_4_3

LAN-T CSMA

__________________________________________________________________________________BENCHMARK Quick Reference Manual

10

Model tabulation:

For bit delay = 1

IPD Tx1 Tx 2 Tx 3 Tx 4 G – Practical Offered Load

X – Practical Throughput

Theoretical Throughput

40 21 19 17 20 1.825 0.077 0.363663

100 114 102 102 87 1.445 0.405 0.440856

200 150 155 144 148 1.095 0.597 0.488795

400 145 149 154 137 0.733 0.585 0.470386

800 96 103 103 98 0.434 0.4 0.357479

2000 49 48 48 49 0.196 0.194 0.185647

4000 27 29 28 28 0.116 0.112 0.11322

Model Graph:

Offered Load Vs Throughput

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0 0.5 1 1.5 2 2.5

Offered Load (G)

Th

rou

gh

pu

t (X

)

X - Throughput

X - Theoritical

throughput

Page 14: LANT v1_4_3

LAN-T CSMA/CD

__________________________________________________________________________________BENCHMARK Quick Reference Manual 11

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 twice from the desktop on both PC’s.

2. Click the Configuration button in the window in both the PC’s.

PC 1 PC 2

Configuration menu:

PC 1 PC 2

Node id 0 on config menu 1 and

1 on config menu 2

Node id 0 on config menu 1 and

1 on config menu 2

Protocol CSMA/CD Protocol CSMA/CD

Baud Rate 8Kbps (At both the config menu

and NEU)

Baud Rate 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 Sender Direction Sender

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

Page 15: LANT v1_4_3

LAN-T CSMA/CD

__________________________________________________________________________________BENCHMARK Quick Reference Manual 12

→ 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 value of ta in the configuration menu.

3. Click OK button and Download the driver to the NIU using the BOOT button command.

Booting from any one of the applications is enough.

PC 1 PC 2

4. Run the experiment by clicking button or by choosing RUN � Start from each application.

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

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

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

Page 16: LANT v1_4_3

LAN-T CSMA/CD

__________________________________________________________________________________BENCHMARK Quick Reference Manual 13

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.

Page 17: LANT v1_4_3

LAN-T CSMA/CD

__________________________________________________________________________________BENCHMARK Quick Reference Manual 14

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

Calculation of Practical Offered load:

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

experiment.

(Sum of Successfully Tx packet in all the nodes * Packet Length * 8)

X = -----------------------------------------------------------------------------

(Duration of Experiment * Data rate)

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

G = --------------------------------------------------------------------------

(Duration of Experiment * Data rate)

Page 18: LANT v1_4_3

LAN-T CSMA/CD

__________________________________________________________________________________BENCHMARK Quick Reference Manual 15

Model tabulation:

IPD Tx1 Tx 2 Tx 3 Tx 4 G – Practical

Offered Load

X – Practical

Throughput 4000 27 25 24 24 0.101 0.1

2000 49 49 49 49 0.208 0.196

800 118 116 119 116 0.5 0.469

400 187 189 191 191 0.976 0.758

200 117 133 290 300 1.904 0.84

100 472 463 13 18 3.555 0.966

40 466 458 20 28 7.687 0.972

Model Graph:

Page 19: LANT v1_4_3

LAN-T CSMA/CA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 16

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.

Page 20: LANT v1_4_3

LAN-T CSMA/CA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 17

Steps to configure Clients nodes:

3. Click on the CSMACA icon from the desktop on the second PC.

4. Click the Configuration 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.

Page 21: LANT v1_4_3

LAN-T CSMA/CA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 18

→ 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 command.

Booting from any one of the applications is enough.

6. Run the experiment by clicking button or by choosing RUN � Start from each application.

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.

N * P

G = ------ C * ta

Page 22: LANT v1_4_3

LAN-T CSMA/CA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 19

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.

Page 23: LANT v1_4_3

LAN-T CSMA/CA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 20

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

Page 24: LANT v1_4_3

LAN-T CSMA/CA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 21

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 Button

and the following screen appears

PC1

Page 25: LANT v1_4_3

LAN-T CSMA/CA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 22

Note down the readings once the experiment is completed.

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:

Calculation of Practical Offered Load for CSMA/CA:

(Sum of ACK counts in all the clients * Packet Length * 8)

X = ---------------------------------------------------------------------------

(Duration of Experiment * Data Rate)

(No of G count in all the clients * Packet Length * 8) X = ----------------------------------------------------------------------

(Duration of Experiment * Data Rate)

Page 26: LANT v1_4_3

LAN-T CSMA/CA

__________________________________________________________________________________BENCHMARK Quick Reference Manual 23

Model Tabulation:

IPD Tx 2 Tx 3 G- Practical Offered Load

X- Practical Throughput

2000 43 42 0.104 0.085

800 74 70 0.245 0.144

400 70 77 0.499 0.147

200 89 77 0.923 0.166

100 121 67 1.797 0.188

40 51 203 4.156 0.254

20 209 70 6.842 0.279

10 290 7 10.468 0.297

Model Graph:

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0 2 4 6 8 10 12

Offered Load

Th

rou

gh

pu

t

Page 27: LANT v1_4_3

LAN-T Token Bus

_________________________________________________________________________________

BENCHMARK Quick Reference Manual 24

Experiment 5 - TOKEN BUS

Aim:

To implement the token passing access in BUS-LAN

Procedure:

1. Click on the Token Bus icon twice from the desktop.

2. Click the Configuration button in the window in both the PC’s.

PC 1 – Sender PC – 2 Sender

Setting the configuration menu:

PC 1 PC 2

Node id 0 on config menu 1 and

1 on config menu 2

Node id 0 on config menu 1 and

1 on config menu 2

Protocol ALOHA Protocol ALOHA

Baud Rate 8Kbps (At both the config

menu and NEU)

Baud Rate 8Kbps (At both the config menu

and NEU) Duration 100s Duration 100s

Packet Length 100 bytes Packet Length 100 bytes

My Address 0 on config menu 1 and

1 on menu 2

My Address 2 on config menu 1 and

3 on menu 2

Bit Delay 0(at NEU) Bit Delay 0(at NEU)

Direction Sender Direction Sender

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

1: If you connect two PC’s 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)

Page 28: LANT v1_4_3

LAN-T Token Bus

_________________________________________________________________________________

BENCHMARK Quick Reference Manual 25

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

→→→→ 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 value of ta in the configuration menu.

3. Click OK button and Download the driver to the NIU using the BOOT button command.

Booting from any one of the applications is enough.

4. Run the experiment by clicking button or by choosing RUN � Start from each application.

Run the all the experiments at the same time.

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).

N * P

G = ------ C * ta

Page 29: LANT v1_4_3

LAN-T Token Bus

_________________________________________________________________________________

BENCHMARK Quick Reference Manual 26

6. View the statistics window for results. To view the statistics window click on 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)

Page 30: LANT v1_4_3

LAN-T Token Bus

_________________________________________________________________________________

BENCHMARK Quick Reference Manual 27

Calculation of the Offered load:

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 Tx 1 Tx 2 Tx 3 Tx 4

G - Offered Load

X –Practical Throughput Avg Delay

16000 7 7 9 5 0.25 0.28 12205.5

8000 11 11 11 13 0.5 0.46 7787.75

4000 18 21 26 19 1 0.84 11265

2000 24 20 21 24 2 0.89 28604.75

1000 20 18 30 20 4 0.88 38216

Model Graph

N * P

G = ------ C * ta

Page 31: LANT v1_4_3

LAN-T Token Ring

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 28

Experiment 6 - TOKEN RING

Aim:

To implement the token passing access in RING-LAN

Procedure:

1. Click on the Token ring icon twice from the desktop.

2. Click the Configuration button in the window in both the PC’s.

PC-1 PC–2

Setting the configuration menu:

PC 1 PC 2

Node id 0 on config menu 1 and

1 on config menu 2

Node id 0 on config menu 1 and

1 on config menu 2

Protocol RING Protocol RING

Baud Rate 8Kbps (At both the config

menu and NEU)

Baud Rate 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 Sender Direction Sender Note: All the nodes have to be configured as ‘Senders’. Set the topology as ‘Ring’.

Page 32: LANT v1_4_3

LAN-T Token Ring

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 29

→→→→ 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 value of ta in the configuration menu.

3. Click OK button and Download the driver to the NIU using the BOOT button command.

Booting from any one of the applications is enough.

4. Run the experiment by clicking button or by choosing RUN � Start from each application.

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 button.

PC 1 PC2

N * P

G = ------ C * ta

Page 33: LANT v1_4_3

LAN-T Token Ring

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 30

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 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:

Calculation of the Offered load:

G – Offered load

N – Number of nodes

P – Packet length in bits

C – Data rate in bits/sec

ta – Inter packet delay in millisecs.

(Sum of Tx packet in all the nodes * Packet Length * 8)

X = -----------------------------------------------------------------------------

(Duration of Experiment * Data rate)

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

Page 34: LANT v1_4_3

LAN-T Token Ring

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 31

Model Tabulation:

IPD

Tx

Node1

Tx

Node2

Tx

Node3

Tx

Node4

G - Offered

Load

X -

Throughput

Avg

Delay

16000 6 6 6 6 0.25 0.24 3779.75

8000 12 13 14 14 0.5 0.53 3708.25

4000 19 19 28 28 1 0.94 3658.5

2000 22 22 30 25 2 0.99 28270.75

1000 30 27 21 21 4 0.99 37720.25

Model Graph

G Vs X

0

0.2

0.4

0.6

0.8

1

0 1 2 3 4 5

Offered Load

Th

rou

gh

pu

t

G Vs

X

Avg Delay

0

10000

20000

30000

40000

0 0.2 0.4 0.6 0.8 1

Throughput

Dela

y

Avg Delay

Page 35: LANT v1_4_3

LAN-T STOP AND WAIT

_____________________________________________________________________

BENCHMARK Quick Reference Manual 32

Experiment 7 – STOP & WAIT

Aim:

Provide reliable data transfer between two nodes over an unreliable network using the stop-

and-wait protocol

Procedure:

1. Click on the Stop & Wait icon from the desktop on both PCs.

2. Click the Configuration button in the window in both the Pc’s.

PC 1 SENDER PC 2 RECEIVER

Setting the configuration menu:

PC 1 PC 2

Node id 0 Node id 0

Protocol CSMA/CD Protocol CSMA/CD

Baud Rate 8Kbps (At both the

config menu and NEU)

Baud Rate 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 Sender Direction Receiver 3. Set the Inter Packet Delay to 400msecs

Page 36: LANT v1_4_3

LAN-T STOP AND WAIT

_____________________________________________________________________

BENCHMARK Quick Reference Manual 33

4. Click OK button and Download the driver to the NIU using the BOOT button command.

Booting from any one of the applications is enough.

5. Run the experiment by clicking button or by choosing RUN � Start from each application.

6. Set the Timeout Value to 1500 ms

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)

Page 37: LANT v1_4_3

LAN-T STOP AND WAIT

_____________________________________________________________________

BENCHMARK Quick Reference Manual 34

Model Tabulation:

Time out value in ms Successfully Tx packets Practical Throughput

1000 1 0.01

1500 2 0.02

2000 52 0.52

3000 52 0.52

4000 52 0.52

Model Graph:

Time out Vs Throughput

0

0.2

0.4

0.6

0 1000 2000 3000 4000 5000

Time Out

Th

rou

gh

pu

t

X - Throughput

Page 38: LANT v1_4_3

LAN-T STOP AND WAIT WITH BER

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 35

Experiment 8 – STOP & WAIT WITH BER

Aim:

Provide reliable data transfer between two nodes over an error network using the stop-and-

wait 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

Page 39: LANT v1_4_3

LAN-T STOP AND WAIT WITH BER

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 36

Model Tabulation:

BER Successfully Tx packets

Theoretical Throughput

Practical Throughput

10-6 53 0.53 0.53

10-5 52 0.52 0.5232

10-4 9 0.49 0.4675

10-3 40 0.39 0.1787

10-2 0 0 0

Model Graph:

BER Vs Throughput

0

0.1

0.2

0.3

0.4

0.5

0.6

0 2 4 6 8

BER

Th

rou

gh

pu

t

X - Throughput

Actual X

Page 40: LANT v1_4_3

LAN-T SLIDING WINDOW GO BACK N

_____________________________________________________________________

BENCHMARK Quick Reference Manual 37

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 from the desktop on both PCs.

2. Click the Configuration button in the window in both the Pc’s.

PC 1 SENDER PC 2 RECEIVER

Setting the configuration menu:

PC 1 PC 2

Node id 0 Node id 0

Protocol CSMA/CD Protocol CSMA/CD

Baud Rate 8Kbps (At both the

config menu and NEU)

Baud Rate 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 Sender Direction Receiver No of packets 4 No of packets 4 Note: The No of Packets parameter defines the window size.

3. Set the Inter Packet Delay to 400msecs

Page 41: LANT v1_4_3

LAN-T SLIDING WINDOW GO BACK N

_____________________________________________________________________

BENCHMARK Quick Reference Manual 38

4. Click OK button and Download the driver to the NIU using the BOOT button command.

Booting from any one of the applications is enough.

5. Run the experiment by clicking button or by choosing RUN � Start from each application.

6. Set the Timeout Value to 1500 ms

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)

Page 42: LANT v1_4_3

LAN-T SLIDING WINDOW GO BACK N

_____________________________________________________________________

BENCHMARK Quick Reference Manual 39

Model Tabulation:

Time out

value in ms

Successfully

Tx packets

Practical

Throughput

1000 0 0

1500 33 0.33

2000 65 0.65

3000 66 0.66

4000 67 0.67

Model Graph:

Time out Vs Throughput

0

0.2

0.4

0.6

0.8

0 1000 2000 3000 4000 5000

Time Out

Th

rou

gh

pu

t

X - Throughput

Page 43: LANT v1_4_3

LAN-T SLIDING WINDOW GO BACK N WITH BER

_____________________________________________________________________

BENCHMARK Quick Reference Manual 40

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

Page 44: LANT v1_4_3

LAN-T SLIDING WINDOW GO BACK N WITH BER

_____________________________________________________________________

BENCHMARK Quick Reference Manual 41

Model Tabulation:

BER Successfully

Tx packets

Theoretical

Throughput

Practical

Throughput

10-6 67 0.63 0.67

10-5 16 0.55 0.16

10-4 1 0.18 0.01

10-3 0 0 0

10-2 0 0 0

Model Graph:

BER Vs Throughput

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 2 4 6 8

BER

Th

rou

gh

pu

t

X - Throughput

Actual X

Page 45: LANT v1_4_3

LAN-T Sliding Window Selective Repeat

_____________________________________________________________________

BENCHMARK Quick Reference Manual 42

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 from the desktop on both PCs.

2. Click the Configuration button in the window in both the Pc’s.

PC 1 SENDER PC 2 RECEIVER

Setting the configuration menu:

PC 1 PC 2

Node id 0 Node id 0

Protocol ALOHA Protocol ALOHA

Baud Rate 8Kbps (At both the

config menu and

NEU)

Baud Rate 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 Sender Direction Receiver No of packets 4 No of

packets 4

Note: The No of Packets parameter defines the window size.

Page 46: LANT v1_4_3

LAN-T Sliding Window Selective Repeat

_____________________________________________________________________

BENCHMARK Quick Reference Manual 43

3. Set the Inter Packet Delay to 400msecs

4. Click OK button and Download the driver to the NIU using the BOOT button command.

Booting from any one of the applications is enough.

5. Run the experiment by clicking button or by choosing RUN � Start from each

application.

6. Set the Timeout Value to 1000 ms

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)

Page 47: LANT v1_4_3

LAN-T Sliding Window Selective Repeat

_____________________________________________________________________

BENCHMARK Quick Reference Manual 44

Model Tabulation:

Time out value in ms

Successfully Tx packets

Practical Throughput

1000 36 0.36

1500 48 0.48

2000 67 0.67

3000 67 0.67

4000 67 0.67

Model Graph:

Time out Vs Throughput

0

0.2

0.4

0.6

0.8

0 1000 2000 3000 4000 5000

Time out

Th

rou

gh

pu

t

X-Throughput

Page 48: LANT v1_4_3

LAN-T Sliding Window Selective Repeat with BER

_____________________________________________________________________

BENCHMARK Quick reference Manual 45

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

Page 49: LANT v1_4_3

LAN-T Sliding Window Selective Repeat with BER

_____________________________________________________________________

BENCHMARK Quick reference Manual 46

Model Tabulation:

BER Successfully Tx packets

Theoretical Throughput

Practical Throughput

10-6 64 0.63 0.64

10-5 60 0.55 0.6

10-4 33 0.19 0.33

10-3 0 0 0

10-2 0 0 0

Model Graph:

BER Vs Throughput

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 2 4 6 8

BER

Th

rou

gh

pu

t

X - Throughput

Actual X

Page 50: LANT v1_4_3

LAN-T Packet Transmission

__________________________________________________________________________________ BENCHMARK Quick Reference Manual 47

Experiment 13 – PACKET TRANSMISSION

1. Click on the Pkt icon from the desktop of both the PC’s.

2. Click the Configuration button in the window in both the PC’s.

PC 1 SENDER PC 2 RECEIVER

Setting the configuration menu:

PC 1 PC 2

Node id 0 Node id 0

Baud Rate 8Kbps (At both the Config

menu and NEU)

Baud Rate 8Kbps (At both the

config menu and NEU)

Duration 100s Duration 100s

Packet Length 100 bytes Packet Length 100 bytes

Bit Delay 0(at NEU) Bit Delay 0(at NEU)

Direction Sender Direction Receiver My Address 1 My Address 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 receiver’s my address in

the sender’s dialogue box, once it is prompted.

Page 51: LANT v1_4_3

LAN-T Packet Transmission

__________________________________________________________________________________ BENCHMARK Quick Reference Manual 48

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

Page 52: LANT v1_4_3

LAN-T Packet Transmission

__________________________________________________________________________________ BENCHMARK Quick Reference Manual 49

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.

Page 53: LANT v1_4_3

LAN-T FTP & PACKET SNIFFING

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 50

Experiment 14 – FTP & PACKET SNIFFING

1. Click on the FTP icon from the desktop on both PCs.

2. Click the Configuration button in the window in both the PC’s.

PC 1 SENDER PC 2 RECEIVER

Setting the configuration menu:

PC 1 PC 2

Node id 0 Node id 0

Baud Rate 8Kbps (At both the

config menu and

NEU)

Baud Rate 8Kbps (At both the

config menu and

NEU) Duration 100s Duration 100s

Packet

Length

100 bytes Packet

Length

100 bytes

Bit Delay 0(at NEU) Bit Delay 0(at NEU)

Direction Sender Direction Receiver

3. Set the IPD as 40 ms.

4. Download the driver to the NIU using the BOOT button command for both PCs.

Page 54: LANT v1_4_3

LAN-T FTP & PACKET SNIFFING

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 51

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

Page 55: LANT v1_4_3

LAN-T FTP & PACKET SNIFFING

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 52

7. At the end of transmission, the file will be stored in the server node’s 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.

Page 56: LANT v1_4_3

LAN-T FTP & PACKET SNIFFING

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 53

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.

Page 57: LANT v1_4_3

LAN-T RC4 Key

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 54

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.

Page 58: LANT v1_4_3

LAN-T RC4 Key

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 55

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.

Page 59: LANT v1_4_3

LAN-T RC4 Key

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 56

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

Page 60: LANT v1_4_3

LAN-T RC4 Key

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 57

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

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.

Page 61: LANT v1_4_3

LAN-T RC4 Key

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 58

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.

Page 62: LANT v1_4_3

LAN-T Encrypting a file using RC4 algorithm

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 59

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 PC’s

Setting up the Server:

1. Open the command prompt window (Start �Run � type cmd).

2. Browse the java bin folder.

3. Type java Server to run the server.

Page 63: LANT v1_4_3

LAN-T Encrypting a file using RC4 algorithm

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 60

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.

Page 64: LANT v1_4_3

LAN-T Encrypting a file using RC4 algorithm

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 61

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.

Page 65: LANT v1_4_3

LAN-T File transfer using Socket FTP

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 62

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 : 192.168.0.1

Gateway : 192.168.0.1

2nd PC:

IP address : 192.168.0.2

Gateway : 192.168.0.2

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.

Page 66: LANT v1_4_3

LAN-T File transfer using Socket FTP

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 63

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

Page 67: LANT v1_4_3

LAN-T File transfer using Socket FTP

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 64

4. Click Start Server button.

5. Click ok to continue.

6. Open FTP client in another PC.

Page 68: LANT v1_4_3

LAN-T File transfer using Socket FTP

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 65

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. Now, on the client turn

overwrite mode on and transfer the file.

� Specify the wrong server IP address and port number.

Page 69: LANT v1_4_3

LAN-T File transfer using Socket FTP

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 66

� 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.

Page 70: LANT v1_4_3

LAN-T Distance vector routing protocol

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 67

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 LanT Routing Simulator icon from the desktop.

2. Click button and browse open C:\Lantrain\Config\ linear.txt.

3. Click button and select Distance vector algorithm

Page 71: LANT v1_4_3

LAN-T Distance vector routing protocol

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 68

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.

Page 72: LANT v1_4_3

LAN-T Distance vector routing protocol

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 69

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.

Page 73: LANT v1_4_3

LAN-T Distance vector routing protocol

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 70

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

Page 74: LANT v1_4_3

LAN-T Distance vector routing protocol

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 71

12. Now observe the routing table.

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.

Page 75: LANT v1_4_3

LAN-T Distance vector routing protocol

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 72

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.

Page 76: LANT v1_4_3

LAN-T Distance vector algorithm

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 73

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 LanT Routing Simulator icon from the desktop.

2. Click 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.

Page 77: LANT v1_4_3

LAN-T Distance vector algorithm

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 74

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.

Page 78: LANT v1_4_3

LAN-T Distance vector algorithm

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 75

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.

Page 79: LANT v1_4_3

LAN-T Distance vector algorithm

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 76

8. Observe the routing table. The values are not changed as it’s not updated.

9. Click the single step button.

Page 80: LANT v1_4_3

LAN-T Distance vector algorithm

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 77

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.

Page 81: LANT v1_4_3

LAN-T Appendix – 1 Graph Plot Procedure

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 78

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.

Page 82: LANT v1_4_3

LAN-T Appendix – 1 Graph Plot Procedure

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 79

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.

Page 83: LANT v1_4_3

LAN-T Appendix – 1 Graph Plot Procedure

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 80

Note: Save exact seven readings for MAC experiments while using this template. Shortage or

excess number of readings may produce errors.

Page 84: LANT v1_4_3

LAN-T Appendix – 1 Graph Plot Procedure

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 81

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.

Page 85: LANT v1_4_3

LAN-T Appendix – 1 Graph Plot Procedure

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 82

Scroll up to the sender readings.

Page 86: LANT v1_4_3

LAN-T Appendix – 1 Graph Plot Procedure

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 83

Go to Data � Refresh data option.

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

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

Page 87: LANT v1_4_3

LAN-T Appendix – 1 Graph Plot Procedure

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 84

Scroll down to see the plot

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

Page 88: LANT v1_4_3

LAN-T Appendix 2 Configuration menu details

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 86

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 - Specify the MAC Protocol that NIU has to emulate. By default, it is set to Aloha

Baud Rate - 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.

Page 89: LANT v1_4_3

LAN-T Appendix 2 Configuration menu details

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 87

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 programmer’s 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 programmer’s 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 programmer’s 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.

Page 90: LANT v1_4_3

LAN-T Appendix 3 Developing LAN-T applications

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 88

Developing LAN Trainer 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.

Page 91: LANT v1_4_3

LAN-T Appendix 3 Developing LAN-T applications

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 89

Creating a New Experiment

� 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.

Page 92: LANT v1_4_3

LAN-T Appendix 3 Developing LAN-T applications

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 90

• Select Source Files folder and add the following

� lanT.rc

� stdAfx.cpp

� Test.cpp file

• 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.

Page 93: LANT v1_4_3

LAN-T Appendix 3 Developing LAN-T applications

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 91

Customising the Shell

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

Page 94: LANT v1_4_3

LAN-T Appendix 3 Developing LAN-T applications

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 92

• Select Header Files folder and add the following

� all header files (*.h)

� resource.hm

• 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

Page 95: LANT v1_4_3

LAN-T Appendix 3 Developing LAN-T applications

__________________________________________________________________________________

BENCHMARK Quick Reference Manual 93

1. 1. 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. Res directory.

b. b. stdAfx.cpp and stdAfx.h

c. c. resource.h and resource.hm

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