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

5

Uploaded by CorporalNarwhalMaster1059

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 Answer:- 3.In total 4 DAT packages and 4 ACK packages were sent. 4. There is about 110 characters that were sent. 5. Here I used the same message that the pdf includes, Computing networking: Packet City! Total characters in packages = 110 Useful characters = 33 Overhead = 110-33 = 77 Overhead percentage = 77/110 = 70% 6. Every time Host 0 moves the message and packetize it into 10 characters. = 1000000/10 = 100000 DAT packets. Also after so many examples about 2 times the characters will be send to approximately 2 million. 7. Overhead can be reduced by increasing the number of useful characters. The method may be backfires because this will increase to DAT package. There might be damaged package sometimes, then there will be lot of chaos. b. [10] Exercise 3 Answer: 5) Original Message using "KEGRIN": DAT packet: DAT 1 0 192 ASCII characters: K=75, E=69, G=71, R=82, I=73, N=78 Checksum = 75 + 69 + 71 + 82 + 73 + 78 = 448 Since 448 / 256 = 1.75, the remainder is 192. Computed checksum = 192. Yes, my computed checksum is nearly same as the packet checksum.
3 6) Damaged Message "KFGRI" (Altering "E" to "F"): DAT packet: DAT 1 1 115 ASCII characters: K=75, F=70, G=71, R=82, I=73 = 371 371 / 256 = 1.44921875, the remainder is 115. Computed checksum = 115. The checksum changes with the damaged message. 7) Cases: CASE 1: Altering characters without changing overall characters does not change the checksum. CASE 2: When ASCII characters are close together, even small changes alter the checksum. 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. b. [4] Write down the headers for each DAT and ACK packet, e.g.: DAT 1 0 144 Answer: DAT 1 0 194 ACK 0 0 0 DAT 1 1 168 ACK 0 1 0 DAT 1 2 186 ACK 0 2 0 DAT 1 3 204 ACK 0 3 0 c. [2] Calculate the checksum for the first DAT header. Answer: DAT 1 0 194 (Computer S) ASCII Characters 67 111 109 112 117 116 101 114 32 83 67 + 111 + 109 + 112 + 117 + 116 + 101 + 114 + 32 + 83 = 962 845/256 = 3.7578125 =0.7578125 * 256 = 194.
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
4 d. [2] If each character or space in header counts for one character, and all DAT packets carry 10 characters (except possibly for the last one), and ACK packets have no data characters (just the header), calculate the total number of characters transmitted both ways. Answer: - Message: Computer Science Illuminated CPSC 1050 data packet: 4 ACK packet: 4 Packet 0: characters for data: 10 (Computer S ) characters for DAT: 11 (DAT 1 0 194) characters for ACK: 9 (ACK 0 0 0) Packet 1: characters for data: 10 (cience Ill ) characters for DAT: 11 (DAT 1 1 168) characters for ACK: 9 (ACK 0 1 0) Packet 2: characters for data: 10 (uminated C) characters for DAT: 11 (DAT 1 2 186) characters for ACK: 9 (ACK 0 2 0) Packet 3: characters for data: 10 (PSC 1050) characters for DAT: 11 (DAT 1 3 204) characters for ACK: 9 (ACK 0 3 0) Total characters = 38 + 4*11 + 4*9 = 118. e. [4] How many characters are in the above message? How many extra characters are transmitted according to your answer to part d? Divide this number by the total number of characters to get the "overhead". What is the ratio of "useful data" to the total data transmitted over the network for the given message? Answer: Total characters = 118 Total useful characters = 38 Overhead = 118 38 = 80 Overhead percentage = 80/118 = 67.79%.
5 Useful data = 38/118 = 32.20%. 3. (TCP/IP) The message "Packet is a unit of data sent across the network" is to be sent over a reliable connection from node 0 to node 1. Here is a diagram of the first packet being sent: a. [2] Presuming that each packet can carry 10 characters of data, how many packets of DAT and ACK are required? Answer: 5 packets of DATA and ACK packets. b. [4] Presuming that the data header of each packet and the ACK packet is of the same size as in the diagram above (11 characters and 9 characters respectively), what is the ratio of "useful data" to the total data transmitted over the network for the given message? What is the "overhead"? Answer: Total characters = 48 + 5 * 11 + 5 * 9 = 148 Overhead characters = 148 48 = 100 Useful data = 48/148 = 32.43% Overhead = 100/148 = 67.56% Submit the PDF version of the completed worksheet with D2L