c. If the sum contains a zero, the receiver knows there has been an error.

Similar documents
a) Adding the two bytes gives Taking the one s complement gives

PROBLEMSAND EXERCISES

Chapter 3 Review Questions

Practice Problems: P22, 23, P24, P25, P26, P27, P28, P29, P30, P32, P44 and P45. Hand-in the following: P27, P28, P32, P37, P44

Problem 7. Problem 8. Problem 9

Answers to Sample Questions on Transport Layer

COM-208: Computer Networks - Homework 3

Preview Test: HW3. Test Information Description Due:Nov. 3

COMPUTER NETWORK. Homework #2. Due Date: April 12, 2017 in class

ECE 610: Homework 4 Problems are taken from Kurose and Ross.

Computer Networks. Homework #4: No Grading

Review problems (for no credit): Transport and Network Layer

The Transport Layer: TCP & Reliable Data Transfer

Question Points Score total 100

Computer Networks. Homework #3: Due 11 November 2015 (Wednesday) Just before Midterm#2!

CSCD 330 Network Programming

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

Communication Networks

CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay

Transport Protocols. Raj Jain. Washington University in St. Louis

Q23-5 In a network, the size of the receive window is 1 packet. Which of the follow-ing protocols is being used by the network?

CS457 Transport Protocols. CS 457 Fall 2014

Fall 2012: FCM 708 Bridge Foundation I

a. (4pts) What general information is contained in a LSR-PDU update that A might send?

CS 421: Computer Networks SPRING MIDTERM I April 7, minutes

NWEN 243. Networked Applications. Layer 4 TCP and UDP

TCP : Fundamentals of Computer Networks Bill Nace

Student ID: CS457: Computer Networking Date: 3/20/2007 Name:

ECE 650 Systems Programming & Engineering. Spring 2018

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

Basic Reliable Transport Protocols

School of Engineering Department of Computer and Communication Engineering Semester: Fall Course: CENG415 Communication Networks

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

Computer Communication Networks Midterm Review

CSCI-131 Networking: the End-to-End Layer. Rodrigo Fonseca March 12 th, 2013

CS 421: COMPUTER NETWORKS SPRING FINAL May 24, minutes. Name: Student No: TOT

Development of reliable protocol Sliding window protocols. C = channel capacity in bps I = interrupt/service time + propagation delay

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure

Lecture 5. Transport Layer. Transport Layer 1-1

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

Review Questions for Midterm Exam-2 Fall 2016

ECEN Final Exam Fall Instructor: Srinivas Shakkottai

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

ECE 461 Internetworking. Problem Sheet 6

CMPE150 Midterm Solutions

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

CSC 4900 Computer Networks: TCP

c) With the selective repeat protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.

CSCI Topics: Internet Programming Fall 2008

PRACTICE QUESTIONS ON RESOURCE ALLOCATION

SC250 Computer Networking I. Review Exercises. Prof. Matthias Grossglauser. School of Computer and Communication Sciences EPFL.

CSC 401 Data and Computer Communications Networks

Introduction to the Transport Layer

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Problem Set 7 Due: Start of Class, November 2

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

The GBN sender must respond to three types of events:

6.033 Lecture 12 3/16/09. Last time: network layer -- how to deliver a packet across a network of multiple links

CSE 4213: Computer Networks II

MCS-377 Intra-term Exam 1 Serial #:

Department of Computer Science and Engineering. COSC 4213: Computer Networks II (Fall 2005) Instructor: N. Vlajic Date: November 3, 2005

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

RSC Part III: Transport Layer 3. TCP

Homework 3 50 points. 1. Computing TCP's RTT and timeout values (10 points)

CS Lecture 1 Review of Basic Protocols

Department of EECS - University of California at Berkeley EECS122 - Introduction to Communication Networks - Spring 2005 Final: 5/20/2005

Note: This practice midterm only covers a subset of the topics you are required to know.

UNIT IV -- TRANSPORT LAYER

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

Solution to Question 1: ``Quickies'' (25 points, 15 minutes)

CSCI 466 Midterm Networks Fall 2013

Transport Layer: outline

Sequence Number. Acknowledgment Number. Data

ECE 333: Introduction to Communication Networks Fall 2001

Network Management & Monitoring Network Delay

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

CSCI-1680 Link Layer Reliability John Jannotti

Chapter 3: Transport Layer

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

COMP/ELEC 429/556 Introduction to Computer Networks

Department of Computer Science and Engineering. Final Examination. Instructor: N. Vlajic Date: April 15, 2011

cs144 Midterm Review Fall 2010

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Chapter 3: Transport Layer Part A

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

Programming Assignment 3: Transmission Control Protocol

CPSC 441 Tutorial-1. Department of Computer Science University of Calgary

Chapter 3 Transport Layer

Homework 2 COP The total number of paths required to reach the global state is 20 edges.

Transcription:

ENSC-37 Fall 27 Assignment#3 Due Date 6 Oct. 27 Problem-:[4] UDP and TCP use s complement for their checksums. Suppose you have the following three 8-bit bytes:,, and. a. [6] What is the s complement of the sum of these 8-bit bytes? (Note that although UDP and TCP use 6-bit words in computing the checksum, for this problem you are being asked to consider 8-bit sums.) Show all work. b. [2] Why is it that UDP takes the s complement of the sum; that is, why not just use the sum? c. [2] With the s complement scheme, how does the receiver detect errors? d. [2] Is it possible that a -bit error will go undetected? e. [2] How about a 2-bit error? a. Note, wrap around if overflow. and then One's complement =. b. To detect errors, the receiver adds the four words (the three original words and the checksum). c. If the sum contains a zero, the receiver knows there has been an error. d. All one-bit errors will be detected. e. Two-bit errors can be undetected (e.g., if the last digit of the first word is converted to a and the last digit of the second word is converted to a ).

ENSC-37 Fall 27 Assignment#3 Due Date 6 Oct. 27 Problem-2:[6] Consider the cross-country example shown in Figure 3.7. How big would the window size have to be for the channel utilization to be greater than 98 percent? Suppose that the size of a packet is,5 bytes, including both header fields and data. It takes 2 microseconds (or.2 milliseconds) to send a packet, as 5*8/9=2 microseconds. In order for the sender to be busy 98 percent of the time, we must have util.98 (.2n) /3. 2or n approximately 245 packets.

ENSC-37 Fall 27 Assignment#3 Due Date 6 Oct. 27 Problem-3:[] Consider the GBN protocol with a sender window size of 4 and a sequence number range of,24. Suppose that at time t, the next in-order packet that the receiver is expecting has a sequence number of k. Assume that the medium does not reorder messages. Answer the following questions: a. [5] What are the possible sets of sequence numbers inside the sender s window at time t? Justify your answer. b. [5] What are all possible values of the ACK field in all possible messages currently propagating back to the sender at time t? Justify your answer. a. Here we have a window size of N=3. Suppose the receiver has received packet k-, and has ACKed that and all other preceding packets. If all of these ACK's have been received by sender, then sender's window is [k, k+n- ]. Suppose next that none of the ACKs have been received at the sender. In this second case, the sender's window contains k- and the N packets up to and including k-. The sender's window is thus [k-n,k-]. By these arguments, the senders window is of size 3 and begins somewhere in the range [k-n,k]. b. If the receiver is waiting for packet k, then it has received (and ACKed) packet k- and the N- packets before that. If none of those N ACKs have been yet received by the sender, then ACK messages with values of [k-n,k- ] may still be propagating back. Because the sender has sent packets [k-n, k-], it must be the case that the sender has already received an ACK for k- N-. Once the receiver has sent an ACK for k-n- it will never send an ACK that is less that k-n-. Thus the range of in-flight ACK values can range from k-n- to k-.

ENSC-37 Fall 27 Assignment#3 Due Date 6 Oct. 27 Problem-4:[] Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes. a. [5] What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that the TCP sequence number field has 4 bytes. b. [5] For the L you obtain in (a), find how long it takes to transmit the file. Assume that a total of 66 bytes of transport, network, and data-link header are added to each segment before the resulting packet is sent out over a 55 Mbps link. Ignore flow control and congestion control so A can pump out the segments back to back and continuously. There are 2 32 4,294,967, 296 possible sequence numbers. a) The sequence number does not increment by one with each segment. Rather, it increments by the number of bytes of data sent. So the size of the MSS is irrelevant -- the maximum size file that can be sent from A to B is simply the number of bytes representable by 2 32 4.9 Gbytes. 2 b) The number of segments is 32 8,2,999 536. 66 bytes of header get added to each segment giving a total of 528,857,934 bytes of header. The total number of bytes 32 9 transmitted is 2 528,857,934 4.824 bytes. Thus it would take 249 seconds to transmit the file over a 55~Mbps link.

ENSC-37 Fall 27 Assignment#3 Due Date 6 Oct. 27 Problem-5:[6] Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 26. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 8 and 4 bytes of data, respectively. In the first segment, the sequence number is 27, the source port number is 32, and the destination port number is 8. Host B sends an acknowledgment whenever it receives a segment from Host A. a. [4] In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number? b. [4] If the first segment arrives before the second segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number? c. [4] If the second segment arrives before the first segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number? d. [4] Suppose the two segments sent by A arrive in order at B. The first acknowledgment is lost and the second acknowledgment arrives after the first timeout interval. Draw a timing diagram, showing these segments and all other segments and acknowledgments sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of bytes of data; for each acknowledgment that you add, provide the acknowledgment number. a) In the second segment from Host A to B, the sequence number is 27, source port number is 32 and destination port number is 8. b) If the first segment arrives before the second, in the acknowledgement of the first arriving segment, the acknowledgement number is 27, the source port number is 8 and the destination port number is 32. c) If the second segment arrives before the first segment, in the acknowledgement of the first arriving segment, the acknowledgement number is 27, indicating that it is still waiting for bytes 27 and onwards.

ENSC-37 Fall 27 Assignment#3 Due Date 6 Oct. 27 d) Host A Seq = 27, 8 bytes Host B Timeout interval Timeout interval Seq = 27, 4 bytes Ack = 27 Ack = 247 Seq = 27, 8 bytes Ack = 247