Lab_11_worksheet

.pdf

School

Langara College *

*We aren’t endorsed by this school

Course

1050

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

6

Uploaded by AmbassadorBeeMaster868

Report
1 Lab 11: Chapter 15, Networks. Lab19_Manual.pdf, Networking. [40 marks] In all of the problems, you must show your work to qualify for the mark. Type your answer in this worksheet after each question. Submit the PDF version of completed worksheet with D2L. Introduction The "Packet Switching" applet simulates a reliable connection, which means that a big message is sent from source to destination without any packet loss. Host 0 (on the left) "packetize" the message into 10 character packets. Here you can see the first 10 characters, A very lon (the two spaces are part of the message) moving in a packet across the wire. The packet header contains type, destination (host 1 here), packet number, and checksum. There are three types of packets: DAT for data, ACK for acknowledgment, and NAK for negative acknowledgment. Checksum is used to detect errors in transferring data. This applet uses a simple checksum algorithm. It takes the ASCII value of each character, adds them up, and calculates the remainder of the sum over 256. For example for this message checksum is: After the first packet arrives at host 1, it sends back an ACK packet to acknowledge that the data arrived successfully. The type of the packet is ACK; the destination is 0 (host 0), and the packet number that it sends back is 0, meaning that the packet number 0 has been received. There is no real data in an ACK packet, so the checksum is 0. This explains why the header is ACK 0 0 0. type destination packet_no. checksum
2 NAK means the packet received is damaged. Similar to ACK, the header indicates type, destination, packet number, and checksum (which is zero). Lab Readings 1. Chapter 15 Networks 2. Lab 19 Networking (Lab19_Manual.pdf) Lab Questions 1. Lab 19 Networking (Lab19_Manual.pdf) a. [10] Exercise 1 NOTE: The example message in the Applet has 78 characters. Ignore the figure 52 mentioned in the PDF file and use 78 instead which matches the example. 3). In total 4 DAT packages and 4 ACK packages were sent. 4). # of data packet: 4 # of ACK packet: 4 Packet 0: # of characters for data: 10 (Computer N) # of characters for DAT: 11 (DAT 1 0 189) # of characters for ACK: 9 (ACK 0 0 0) Packet 1: # of characters for data: 10 (etworking:) # of characters for DAT: 10 (DAT 1 1 20) # of characters for ACK: 9 (ACK 0 1 0) Packet 2: # of characters for data: 10 (Packet Ci) # of characters for DAT: 10 (DAT 1 2 68) # of characters for ACK: 9 (ACK 0 2 0) Packet 3: # of characters for data: 3 (ty!) # of characters for DAT: 10 (DAT 1 3 14) # of characters for ACK: 9 (ACK 0 3 0) Total # of characters = 33+10*3+11+9*4 = 110
3 110 characters were sent in total. 5). The same message was used that the pdf includes i.e., Computer networking: Packet city! Total characters in packages = 110 Useful characters -33 Overhead = 110-33 = 77 Overhead percentage = 77/110*100 = 70% 6). Every time Host 0 moves the message, it packetizes it into ten characters. So, 1,000,000 divided by 10 equals 100,000 DAT packets. Also, after a certain number of examples, the character will be sent around 2 million times. 7). To reduce overhead, increase the amount of usable characters. This strategy could fail by raising the total number of DAT packages. Conditions- Occasionally, the package will be damaged, resulting in chaos. b. [10] Exercise 3 1. Message I wrote is:- Amritpal!! DAT Packet = DAT 1 0 124 3. ASCII Characters: 65 109 114 105 116 112 97 108 33 33 4. Adding Values of ASCII characters:- 65+109+114+105+116+112+97+108+33+33 = 892 892/256 = 3.484375 0.484375*256 = 124 5. Yes, my computed checksum is almost equal to packet checksum 6. Damaged Message :- Amritpal%! DAT Packet : DAT 1 0 144 ASCII Character : : 65 109 114 105 116 112 97 108 37 33 Addition:- 65+109+114+105+116+112+97+108+37+33 = 896 896/256 = 3.5 0.5*256 = 128 7. CASE 1 = Altering characters with each other by keeping overall characters same. CASE 2 = When ASCII characters are close together. 2. (TCP/IP) Start the TCP/IP applet. Send the following message: Computer Science Illuminated CPSC 1050 a. [2] How many packets of DAT and ACK are transmitted? Answer: 4 DAT and 4 ACK packets.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help