sit202-a2-solutions - Solutions Task 1 The transport...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Solutions Task 1: The transport layer (1+1+2+1+3+2 = 10 marks) 1. Define, compare and contrast TCP and UDP. TCP is a connection orientated protocol while UDP is connectionless. TCP is a reliable service that uses much more complex mechanisms than unreliable UDP. TCP is reliable in that it ensures all packets arrive in correct sequence and with uncorrupted content while UDP does neither. TCP also suitable for applications where it is vital the data stream sent by one end system process arrives at the receiving end with the exact data stream that was sent by the sender application. These applications may include file transfer, email and http. A software designer would choose the UDP approach in scenarios where it is vital packets are sent and received at a minimum rate. For example live internet telephony. 2. Consider a TCP connection between Host A and Host B. Suppose that the TCP segments traveling from Host A to Host B have source port number x and destination port number y. What are the source and destination port numbers for the segments traveling from Host B to Host A. From Host B b Host A Source port is y Destination port is x 3. Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence number 90; the second has sequence number 110. a) How much data is in the first segment? 20 bytes b) Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgement that Host B sends to Host A, what will be the acknowledgement number? 90
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4. UDP and TCP use 1's complement for their checksums to detect errors. These checksums exploit 8-bit summands (i.e., 8-bit words in computing the checksum). The receiver received three 8-bit bytes: 01010101, 01110000, 01001100. There are the following problems to be solved: a) What is the 1's complement of the sum of these 8-bit bytes? Show all work. Sum of first 2: 01010101 01110000 11000101 Adding 3 rd 11000101 01001100 00010010 Perform 1s complement 11101101 b) Why it is that your protocol takes the 1's complement of the sum; that is, why not just use the sum? Because that’s what the RFC states. c) With the 1's compliment scheme, how does the receiver detect errors? The receiver adds the x-bit word fields together with the checksum. If each bit in the result does not equal 1
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 8

sit202-a2-solutions - Solutions Task 1 The transport...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online