ECS 152 A: Project 2

                                                                                        simulation analysis of ethernet based LAN
                                                                                            Date due: 17th March, by 12 midnight.

In this project you will study some behavior of an Ethernet based Local Area Network. Initially assume that there are two stations on the network and one station is going to send data to the other one. What is the throughput in this case? (throughput is defined to be the number of successful transmission per unit time)(Assume that you have one media with 100 Mbps as the data rate and you have the packet size of 1K). Simulate this case using a simple queue for both the stations. Now, start increasing the number of sender / receiver pair. Each time, whenever you add one pair, how does the throughput change?  Add 4 more sender /receiver pair and study in each case what happens to the throughput if you have a standard packet size of 1K? (at present you have 5 sender / receiver pair). Assume one slot time corresponding to the size of 0.5K (hence you can send one packet using two slot times).  You have to check the no. of collisions per second, throughput and message delay for all the 5 cases (i.e. when you have one sender / receiver pair, when you have two sender /receiver pair till when you have 5 sender /receiver pair). Now, change the packet size to 10K, and start checking the collisions per second, throughput and the message delay again for all the 5 cases. (for all the above case studies, check the behaviour for 1000 slot time). Now, change the slot time to 10,000 and again restart the simulation. Study the throughput, collisions per second and message delay for one sender / receiver pair, two sender/receiver pair, till five sender /receiver pair (for message size of 1K and the message size of 10K).
You should consider the following when you go for simulating the ethernet:
1. Stations can transmit only at slot boundaries and each sender tries to initiate the transmisison  in every 2 seconds.
2. If at a particular slot boundary, there are more than one host ready to transmit, there will be collision. When hosts collide, they will schedule their retransmission using the following exponential backoff algorithm:
. the number of slots to delay after the nth retransmission attempt is chosen as a uniformly random integer in the range of
                   k
0 <= r <= 2   , where k = min (n, 10). (How to generate an integer which is uniformly distributed in the range (0,T)?
Do the following: 1) generate a random variable in the range (0,1) 2) multiply that by T, 3) round off to the nearest integer.)
Finally, plot (for message size of 1K)
1) no. of collisions / second (dependent variable) against the no. of sender / receiver pair (for case I when you have 1000 slot time and  case II when you have 10000 slot time) using some graphics tool.
2) Average message delay (message delay / number of stations) (dependent variable ) against the no. of sender / receiver pair (for case I when you have 1000 slot time and case II when you have 10000 slot time).
3) Plot throughput vs. number of collisions (for case I when you have 1000 slot time and case II when you have 10000 slot time).
4) follow steps 1, 2 and 3 for message size of 10K
5) follow steps 1, 2 and 3 for message size of 100K.
 

What to submit?

You have to submit the code alongwith one README file. The README file should explain your code as well as the behaviour of the curves. Submit the hardcopy of the graphs.

Where to turnin?
use handin to cs152ar prj2 directory.
handin cs152ar prj2 filename. Submit the hardcopy of the graphs to the homework box.

Grading Policy:

Total marks allotted for this project is 50.
The break up is 50% for the code and 50 % for the output curve and the explanation for the behaviour of the curves.