a brief tutorial for coursework · a brief tutorial for coursework ... coursework overview goal...
TRANSCRIPT
![Page 1: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/1.jpg)
A brief tutorial for coursework
UG3 Computer Communications & Networks(COMN)
![Page 2: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/2.jpg)
Coursework Overview
● Goal○ Implementation and evaluation of three end-to-end reliable data transfer
protocols○ Stop-and-Wait, Go-back-N, and Selective Repeat
● Assessment: 40% of course mark○ Part 1 (30%)
■ Part 1a (10%): rdt1.0■ Part 1b (20%): rdt 3.0 (Stop-and-Wait)
○ Part 2 (70%)■ Part 2a (30%): Go-back-N
■ Part 2b (40%): Selective Repeat + iperf experiment
![Page 3: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/3.jpg)
Virtual Machine (VM) Setup
● Need Oracle’s VirtualBox virtualization software● VirtualBox exists by default on all DICE machines● List of DICE machines can be found at
● The VM image for the assignment○ Can be accessed on DICE machines○ Has dummynet link emulator and other relevant software
![Page 4: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/4.jpg)
Creating VM
1. Log into a DICE machine2. Open a terminal3. Create a directory (e.g., comn-cwk) and ‘cd’ into it
![Page 5: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/5.jpg)
![Page 6: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/6.jpg)
Creating VM
1. Log into a DICE machine2. Open a terminal3. Create a directory (e.g., comn-cwk) and ‘cd’ into it
4. Issue the following command:
![Page 7: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/7.jpg)
![Page 8: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/8.jpg)
![Page 9: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/9.jpg)
![Page 10: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/10.jpg)
![Page 11: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/11.jpg)
Creating and Starting VM
5. Run the following command:
![Page 12: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/12.jpg)
vmuserpw
![Page 13: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/13.jpg)
Terminal
![Page 14: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/14.jpg)
How to shut down VM
● Become a root using ‘su’○ Root password: vmrootpw
● Run the following command:
![Page 15: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/15.jpg)
![Page 16: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/16.jpg)
Shared Folder
● When the VM is set up for you, a directory called "dummynetshared" gets created in your assignment directory
● You can mount this in the VM by (as root):
![Page 17: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/17.jpg)
![Page 18: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/18.jpg)
![Page 19: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/19.jpg)
Conceptual Structure
● Dummynet○ Creates emulated network link(s)○ Configuration of link characteristics (BW, delay, loss)○ Command-line program: ipfw
![Page 20: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/20.jpg)
Conceptual Structure
● Sender○ Reads a file and breaks it into a number of packets○ Sends the packets to a receiver over a simulated network link
● Receiver○ Receives the packets; extracts data in the packets; and saves the data in a file
![Page 21: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/21.jpg)
Effect of Dummynet
● When processes within the same host (or virtual machine) communicate with each other
![Page 22: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/22.jpg)
Header format
● The following formats should be used for both parts○ Exception: no ACK packets for part1a
● Data packet ○ (Sender to Receiver)
● ACK packet○ (Receiver to Sender)
![Page 23: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/23.jpg)
iPerf● iPerf is a tool used to measure network performance
measurement in terms of throughput and latency.
![Page 24: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/24.jpg)
iPerf
● -c → Receiver IP address● -i → Interval, seconds between periodic bandwidth reports ● -t → time in seconds to transmit for (default 10 secs)● -n → number of bytes to transmit (instead of -t)● -F → input the data to be transmitted from a file● -M → set TCP maximum segment size
![Page 25: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/25.jpg)
Wireshark
● Wireshark is an open-source packet analyzer tool that used to capture network packets to understand and troubleshoot network behavior.
1. Type in terminal → wireshark2. Choose the interface to capture the packets from.3. Stop recording and save the file.
![Page 26: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/26.jpg)
Type: wireshark
Choose the interface
![Page 27: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/27.jpg)
Now it starts recording and will display the packets here
Stop recording
![Page 28: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/28.jpg)
1. Packet Number
2. Timestamp
3. Source IP Address
4. Destination IP Address
5. Protocol
6. Source and Destination Ports
![Page 29: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/29.jpg)
7. TCP sequence number
8. TCP window size
![Page 30: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/30.jpg)
Miscellaneous
● Some essential Java packages for the assignment:○ java.io.File○ java.io.FileInputStream○ java.io.FileOutputStream○ java.net.DatagramPacket○ java.net.DatagramSocket○ java.net.InetAddress
![Page 31: A brief tutorial for coursework · A brief tutorial for coursework ... Coursework Overview Goal Implementation and evaluation of three end-to-end reliable data transfer protocols](https://reader033.vdocuments.site/reader033/viewer/2022042803/5f49598c6623880bd248fa08/html5/thumbnails/31.jpg)
Q&A