2.implement programs to realize data communications, which will be running on different…
Private research annotation
Sign in to add a private research label or note.
- User
2.implement programs to realize data communications, which will be running on different machines across networks, and using error control mechanisms. 3. The fundamental requirement of this project is to implement error control protocols by using Stop- And-Wait (SAW) and Go-Back-N (GBN) mechanisms, respectively. 4. It may include, but not limited to, maximum payload size, header size, number of fields, order and size of the different fields, different possible code values for certain fields, and message sequencing. 5. Your programs should be able to communicate with each other based on SAW to SAW and GBN to GBN. 6. Your program will use UDP segment as an underlying unreliable channel and put your protocol data unit (including header and payload) in the payload of the UDP segment. 7. To simulate the packet loss we will use pseudo random number to control that. a. First your program will ask the user to input a number between [0, 99]. This number means the percentage of packet losses will happen statistically in the transmission. b. Then each time before you send your protocol data unit, your program will generate a pseudo random number in the range [0, 99] with the random seed set to the current system time. If the random number generated is less than the user input number then the current protocol data unit won’t be sent (but assume it is sent) to simulate a packet loss. 8. To test your protocol, your program will read from a file named “DataSent.txt” and when received the data then put them into a file named “DataRecieved.txt”. 9. After your program finishes the transmission of the data file it should provide some basic statistic data including how long takes it to transmit the data file, how many total protocol data units sent, how many “lost” (simulated), etc.
- Assistant
This project requires the implementation of error control protocols using Stop-And-Wait (SAW) and Go-Back-N (GBN) mechanisms. The data communications will be established between different machines across networks using UDP segments as an underlying unreliable channel. The protocol data unit, including header and payload, will be placed in the payload of the UDP segment. To simulate packet loss, a pseudo random number will be generated before each transmission, and if the number is less than the user-input percentage, the current protocol data unit will not be sent (but assumed to be sent) to simulate packet loss.
The program will read from a file named "DataSent.txt" and write to a file named "DataRecieved.txt". After the transmission of the data file, the program should provide some basic statistics, such as the time taken to transmit the data file, the total number of protocol data units sent, the number of simulated packet losses, etc.
To implement this project, you will need to have a good understanding of network protocols, error control mechanisms, and programming concepts. You will need to design the header structure and determine the maximum payload size, header size, number of fields, order and size of the different fields, possible code values for certain fields, and message sequencing. You will also need to write code to generate pseudo random numbers and implement the SAW and GBN algorithms.
- User
kindly impelement this project in python programming
- Assistant
Here is a basic implementation of the project in Python:
code
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.