Question
Please helps me with this project. 1. You are simulating a simple network environment, in which Computer1 (A) sends data to Computer2 (B) (Assume that
Please helps me with this project.
1. You are simulating a simple network environment, in which Computer1 (A) sends data to Computer2 (B) (Assume that A only sends and B only receives data.) The data link layers of the hosts are to be simulated. Whenever a packet from the network layer arrives at the data link layer, the sender encapsulates the packet (datagram) into a link layer frame and sends it to the receiver. If the receiver receives the frame without errors during transmission, it sends an ACK frame to the sender. Note that frames can be lost or corrupted during transmissions. In this case, retransmission of frames should be handled by Stop-and-Wait ARQ. Assume that (a) It randomly takes [1,10] msec for a frame to travel from A to B (i.e., propagation time). So the average round trip time(RTT)betweentwohostscanbeassumedtobe11(=5.52)msec. Assume a very high-speed link between the hosts so that the frame transmission time can be ignored.
(b) Assume that packets arrive at the link layer randomly with the average rate of (1/20) packets/msec and the size of a packet is 2000 bytes.
(c) The header of a frame contains a Sequence number and an ACK number.
(d) Note that the time-out values of timers should be a little greater than RTT, e.g., 15 msec.
(e) Frames may be corrupted or lost during transmission. You may simulate the frame corruption/loss by randomly generating frame corruptions/losses with the frame error probability of pe(0
(f) Assume that the number of re-transmissions Nr = 4, i.e., if a frame is re-transmitted more than Nr, it is dropped.
2. You need to provide the followings for simulation setup. (Ausertypesinthefollowinginformation when a simulation starts.) (a) Number of packets to send
(b) Simulation time (T)
(c) Frame loss/corruption probability (pe)
3. Measure the number of correctly received bytes(B) at Bunder the frame loss/corruption probability pe. And compute the throughput (=B 8/T) for each simulation. You may run many simulations to get the average throughput. 4. Measure the frame transmission delay between the start of frame transmission and the end of successful frame reception for each of a new frame under a pe. You can add them and divide it by the number of successfully received frames during T. You may run many simulations to get the average delay.
5. Plot the average throughput for varying pe.
6. Plot the average delay for varying pe.
7. You may need to run a simulation long enough to collect a reasonable result. (To observe many frame losses/corruptions, the long simulation may be needed for a large.) Youcandecidereasonable T by observing cumulative throughput B8/T vs. T as T increases for a ?xed pe.
Please submit a report containing
11. Please submit a report containing (a) Introduction (b) Block diagram of the program structure
(c) Brief output results showing exchanges of frames(sequence numbers,ACK numbers), occurrences of frame losses/corruptions, and operation of timers.
(d) Plot of the average throughput for varying pe: Average throughput vs. pe (e) Plot of the average delay for varying pe: Average delay vs. pe (f) Observations (g) Conclusion (h) Appendix: Source codes (well-documented)
#include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started