Problem 1 Suppose that the client A initiates a TCP connection to a Web server whose name is S. More or less simultaneously,



Similar documents
Transport Layer Protocols

First Midterm for ECE374 03/09/12 Solution!!

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

Computer Networks. Chapter 5 Transport Protocols

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

Final for ECE374 05/06/13 Solution!!

First Midterm for ECE374 03/24/11 Solution!!

Computer Networks UDP and TCP

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

[Prof. Rupesh G Vaishnav] Page 1

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Access Control: Firewalls (1)

This sequence diagram was generated with EventStudio System Designer (

15-441: Computer Networks Homework 2 Solution

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

First Midterm for ECE374 02/25/15 Solution!!

Visualizations and Correlations in Troubleshooting

(Refer Slide Time: 02:17)

Computer Networks - CS132/EECS148 - Spring

Advanced Computer Networks Project 2: File Transfer Application

CMPE 150 Winter 2009

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

TCP in Wireless Mobile Networks

La couche transport dans l'internet (la suite TCP/IP)

La couche transport dans l'internet (la suite TCP/IP)

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

Chapter 5. Transport layer protocols

1 An application in BPC: a Web-Server

Computer Networks. Data Link Layer

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

Networking part 3: the transport layer

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

Data Networks Summer 2007 Homework #3

CS268 Exam Solutions. 1) End-to-End (20 pts)

Stop And Wait. ACK received; transmit frame 2 CS 455 3

Per-Flow Queuing Allot's Approach to Bandwidth Management

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Network Layer: Network Layer and IP Protocol

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

The Problem with TCP. Overcoming TCP s Drawbacks

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

Network Security: Workshop. Dr. Anat Bremler-Barr. Assignment #2 Analyze dump files Solution Taken from

TCP Adaptation for MPI on Long-and-Fat Networks

IP - The Internet Protocol

NAT & IP Masquerade. Internet NETWORK ADDRESS TRANSLATION INTRODUCTION. NAT & IP Masquerade Page 1 of 5. Internal PC

Improved Digital Media Delivery with Telestream HyperLaunch

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

Computer Networks Homework 1

Digital Audio and Video Data

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

IP Subnetting and Addressing

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

Internet Control Protocols Reading: Chapter 3

Improving Effective WAN Throughput for Large Data Flows By Peter Sevcik and Rebecca Wetzel November 2008

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

TFTP TRIVIAL FILE TRANSFER PROTOCOL OVERVIEW OF TFTP, A VERY SIMPLE FILE TRANSFER PROTOCOL FOR SIMPLE AND CONSTRAINED DEVICES

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

Applications. Network Application Performance Analysis. Laboratory. Objective. Overview

Transport Layer. Chapter 3.4. Think about

Networking Test 4 Study Guide

Computer Networks - CS132/EECS148 - Spring

Protocols. Packets. What's in an IP packet

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

Protocols and Architecture. Protocol Architecture.

How To Design A Layered Network In A Computer Network

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Understanding SAE J1939. by Simma Software, Inc.

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

Challenges of Sending Large Files Over Public Internet

Application Note. Windows 2000/XP TCP Tuning for High Bandwidth Networks. mguard smart mguard PCI mguard blade

Higher Layer Protocols: UDP, TCP, ATM, MPLS

Multipath TCP in Practice (Work in Progress) Mark Handley Damon Wischik Costin Raiciu Alan Ford

Solution of Exercise Sheet 5

Solving complex performance problems in TCP/IP and SNA environments.

Mobile Communications Chapter 9: Mobile Transport Layer

How do I get to

Data Link Layer Overview

Technical Support Information Belkin internal use only

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

Data Link Layer. Flow Control. Flow Control

Written examination in Computer Networks

Servicesin ns-3. Outline SIMULACIÓN DE PROTOCOLOS DE ENRUTAMIENTO PARA REDES MÓVILES AD-HOC MEDIANTE HERRRAMIENTA DE SIMULACIÓN NS-3

SSC - Communication and Networking Java Socket Programming (II)

Quality of Service Analysis of site to site for IPSec VPNs for realtime multimedia traffic.

Chapter 6 Congestion Control and Resource Allocation

Mobile Computing/ Mobile Networks

CSE 123: Computer Networks

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

High Speed Internet Access Using Satellite-Based DVB Networks

Transcription:

Note: Here you have the original answer proposed by working groups. Spelling mistakes from original answers have not been corrected. Sometimes teacher note is included in red. Problem 1 Suppose that the client A initiates a TCP connection to a Web server whose name is S. More or less simultaneously, the client B also initiates a TCP connection to S. a) Indicate possible source and destination port number for: 1. Segments sent from A to S 2. Segments sent from B to S 3. Segments sent from S to A 4. Segments sent from S to B b) If A and B are in different hosts, could source port number from A to S be the same that from B to S? c) What if client process A and B are in the same host? Solution proposed by Group 1: a.1) We choose as Source port value of A 9157 arbitrary within the free ports range, and the destination port of S as 80.That value is the default value for HTTP protocol. a.2) Value of Source Port of B: 9158, and destination port of S:80. a.3) Value of Source Port of S: 80, and destination port of A: 9157. a.4) Value of Source Port of S: 80, and destination port of B: 9158. b) Yes, host A and host B have the possibility to have the same port number because the source port number. There is more information, like the IP to see that both entities are different. c) If process A and B are in the same host, each one must have its own port number. Problem 2 a) What are the source and destination port number values in the segments flowing from the server back to the clients processes? b) What are the IP addresses (source and destination) of N_PDUs carrying these transport layer segments? Solution proposed by Group 2: a) P1 (ip: A, port: 9557) accesses to server (ip: C, port: 80). b) SP=80 client >SP=9157 DP=9157 D IP=C D IP=A S IP=A S IP=C DP=80 DP=80 SP=9157 D IP=B S IP=C Problem 3 UDP and TCP use 1s complement for their checksums. Suppose you have the following three 16 bit words: 1110000001010010 1101010100101111 0010101110101111 a) What is the 1s complement of the sum of these 16 bit words? b) Receiver adds the three words to the received checksum. If the result of the addition, in binary, contains some zero, the receiver realizes there is some error in some bit, is it right? 1/8

c) Is it possible that a 1 bit error will go undetected? d) Propose a particular example for a non detectable error. Solution proposed by Group 3: Checksum is a 16 bits word to check if there is any error in the receiver data. In our case, the receiver has the following three words: 1110000001010010 1101010100101111 0010101110101111 We have to sum these words and do the 1s complement to the result: 1110000001010010 + 1101010100101111 = 1011010110000010 1011010110000010 + 0010101110101111 = 1110000100110001 a) 1s complement: 0001111011001110 b) If we sum this last result and the checksum from the transmitter, if the result is 1111111111111111, that means that the data received is correct, and if there is any 0 means that there is any error in the data. c) If there is a 1 bit error, the checksum will always detect it. d) But it`s possible that 2 or more bits error couldn t be detected by the checksum, because if the 2 bits wrong are in the same position in the checksum, the result of the sum will be the same and the error wont be detected. Example: 0100101110010110 0100011110010110 + 0100011110010110 + 0100101110010110 1001001100101100 1001001100101100 Problem 4 Pipeline protocols improve the performance of stop and wait protocols. Suppose a Tx and a Rx with a 1Gbps link, 30ms RTT, 1500 bytes PDUs and header size equal to zero (negligible size in comparison to the data size). How many data PDUs has Tx to have in flight for channel utilization is 95%? Solution proposed by Group 4: The channel utilisation for stop a wait protocols is: For pipeline protocols we have to take into account that we will send several packets before receiving any ACK from the receiver. This means that the channel utilisation is: In the particular case proposed in the exercise we have to calculate how many PDUs has the transmitter to have inflight for a 95% channel utilisation: 1 30 1500 2/8

0,95 30 10 1500 2 10 1500 2 10 2375,95~2376 0,95 3 10 12 10 12 10 0,95 30 1500 1 1500 1 Problem 5 We have said that an application may choose UDP for a transport protocol because UDP offers finer application control (than TCP) of what data is sent in a segment and when. a) Why does an application have more control of what data is sent in a segment? b) Why does an application have more control on when the segment is sent? Solution proposed by Group 2: a) The info flows not controlled, TCP decides how many data can carry in T_UDP. b) TCP has own mechanism to control each T_PDU (buffer and segmentation). Is more control over the moment when data is sent. UDP just passes directly the data. Problem 6 Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes. a) 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. Note: MSS is the maximum size of user data carried by any segment in a TCP connection. In SYN segment, using TCP options header, each TCP entity informs to the other about which MSS wants to use. The smaller will be used. b) 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 155 Mbps link. Ignore flow control and congestion control so A can pump out the segments back to back and continuously. Solution proposed by Group 1: a) To calculate it, we must know that 1byte is 8 bits. So, if there is 4 bytes, we have 32 bits. The maximum value of L must be: 2^32= 4.294.967.296 bits Teacher note: MSS doesn t care because TCP sequence numbers are to enumerate data bytes not segments. b) We have 536 bytes for every packet sent. Of those 536, 66 bytes are needed for transport, network and data link header. This means we have 470 bytes for data in every packet. We would need to sent 4.294.967.296/470 = 9.138.299 packets to send the file So, 9.138.299 packets of 536 bytes, make a total of 4.898.090.744 bits, 4.899 megas in total. 4899 mb/155mbs = 31,6 seconds Teacher note: There is an error in this solution, which is it? 3/8

Problem 7 Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back to back. The first and second segments contain 70 and 50 bytes of data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an acknowledgement whenever it receives a segment from Host A. a) In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number? b) If the first segment arrives before the second segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number? Solution proposed by Group 3: a) The sequence number will be first byte of the next sequence of bytes transmitted. As the first segment sent had 70 bytes, the next sequence number will be 197. The source port will be the same used in the connection: 302. The destination port will be 80. b) The ACK number is the next byte expected, in this case the ACK number of the acknowledgement of the first segment will be 197. The source port: 80 (now, we are in the server side). The destination port: 302. c) In this case the server has received the segment with the seq. number 198, but it hasn t received the segment with the seq. number 127,which is, actually, the segment it has expecting to receive. In this case, the server indicates in the ACK number of the response that it has the first 126 bytes, but it still expects to receive the one with the seq. number 127. So the ACK # would be 127 again. Note that the server always sent as ACK number the number of bytes that has received all the bytes until the ACK# 1. In this case, although the sender retransmits the segment with seq# 127, the server tells the sender that it has everything OK until byte 246. 4/8

Problem 8 Host A and B are directly connected with a 100 Mbps link. There is one TCP connection between the two hosts, and Host A is sending to Host B an enormous file over this connection. Host A can send its application data into its TCP socket at a rate as high as 120 Mbps Host B can read out of its TCP receive buffer at a maximum rate of 60 Mbps. Describe the effect of TCP flow control over the rate that Application layer of A sends data through its TCP socket. Solution proposed by Group 4: In this exercise the main issue is that there are two bottlenecks in the process of delivering the information from host A to host B. The first one is between host A and the link, because host A can send data at a rate up to 120Mbps but the link can only transfer data up to 100Mbps. The second one is between the link and host B, which, in this case, is the receiver; because host B cannot receive data at a rate higher than 60Mbps. In order to avoid data loss, TCP indicates in the T_PCIs the highest rate at which the receiver can receive the data. This way, the transmitter knows at which rate the data can be sent at any moment. Problem 9 We discussed TCP needs to estimate a value for RTT to know how long it has to wait for an ACK. To estimate the RTT, TCP uses SampleRTT values that are the time passed between a segment sending and the arrival of its ACK. However, TCP doesn t use the SampleRTT associated to the retransmitted segments. Why do you think TCP avoids measuring the SampleRTT for retransmitted segments? Solution proposed by Group 5: The reason is that RTTs of retransmitted segments does not reflect the actual RTT in any way. There are many different reasons why a segment has to be retransmitted, and the sender doesn't know which one is it this time. So it's not possible to guess a RTT from retransmitted segments. See slide 3 55 for an example of different reasons and see how the RTT from retransmitted segments can vary, by same RTT. So since the RTTs of retransmitted segments are not in any direct relation to the actual RTT, these sample RTTs are not useful. Solution proposed by Group 7: The retransmitted segments contain the same data and the same sequence numbers as the previously sent packets. Therefore, for the retransmitted segments, we would expect the same ACK numbers as the previously sent TCP segments. When we receive these particular ACKs from the receiver, we don't really know or care whether they were sent as responses to the retransmitted segments or to the previously sent TCP segment. It is possible that after a very short time, we receive the ACK for the retransmitted data segment. But that could actually be a delayed ACK for the original TCP segment. Either the data transmission or the ACK reply was probably delayed. Both of them could result in a late ACK. If we count this time in to compute the RTT estimation, we would mistakenly drop the RTT average by a big percentage. This RTT would trigger a faster retransmission, which would worsen the already jammed network traffic. Ex. Suppose the source sends packet P1, the timer for P1 expires, and the source then sends P2, a new copy of the same packet. Further suppose the source measures SampleRTT for P2 (the retransmitted packet). Finally suppose 5/8

that shortly after transmitting P2 an acknowledgment for P1 arrives. The source will mistakenly take this acknowledgment as an acknowledgment for P2 and calculate an incorrect value of SampleRTT. (As we study in slide transport layer nº 3 59 and we see in the examples in class) Problem 10 What is the relationship between the variable SendBase of TCP transmitter and the variable LastByteRcvd of TCP receiver? Solution proposed by Group 6: Because SendBase is the seq# that indicates the edge between the data which has been acknowledged and the one which has not. When the receiver send the LastByteRcvd the sender checks and if it s the same, then all the data has been ackowledged. SendBase 1 <= lastbytercvd; Problem 11 What is the relationship between the variable LastByteRcvd of TCP receiver and the variable y of TCP sender? Solution proposed by Group 6: When the sender is ready to send data, the y equals to LastByteRcvd. This is because y represents the not yet acknowledged data. Teacher note: This is not right, what is the relationship? Problem 12 We saw that TCP waits until it has received three duplicate ACKs before performing a fast retransmit. When receiving three duplicate ACKs of a segment, TCP does a fast retransmit of this segment that supposes lost, without waiting for timer expires. Why do you think the TCP designers chose not to perform a fast retransmit after the first duplicate ACK for a segment is received? Solution proposed by Group 6: Because it may overflow the connection just for a duplicate ACK. Teacher note: A duplicate ACK may be received in situations that they don t imply a data segment lost. For example, if two segments sent back to back and in order reach out of order the destination, the receiver will send a duplicate ACK. Waiting for three duplicated ACKs is more probable that the segment was lost and it isn t a small disorder. A triple duplicate ACK implies that the segment hasn t reached yet the receiver and three segments behind it have reached the receiver and that is not a small disorder. Problem 13 Host A is sending an enormous file to Host B over a TCP connection. Over this connection there is never any packet loss and the timers never expire. Denote the transmission rate of the link connecting Host A to the Internet by R bps. Suppose that the process in Host A is capable of sending data into its TCP socket at a rate S bps, where S = 10 R. Further suppose that the TCP receive buffer is large enough to hold the entire file, and the send buffer can hold only one percent of the file. What would prevent the process in Host A from continuously passing data to its TCP socket at rate S bps? TCP flow control? TCP congestion control? Or something else? Elaborate. 6/8

Solution proposed by Group 5: TCP has a mechanism called flow control which prohibits sending too much data to the receiver. In all ACKs the receiver tells the sender how much free space there still is in the buffer (the RcvWindow). The sender never sends more unacknowledged data to the receiver than the RcvWindow. Therefore it cannot overflow. Solution proposed by Group 7: In this problem, there is no danger in overflowing the receiver since the receiver s receive buffer can hold the entire file. Also, because there is no loss and acknowledgements are returned before timers expire, TCP congestion control does not throttle the sender. However, the process in host A will not continuously pass data to the socket because the send buffer will quickly fill up. Once the send buffer becomes full, the process will pass data at an average rate or R << S. Teacher note: Flow control doesn t slow A down because in B there is a buffer (in TCP entity) that is able to store the whole file, then reception window always allows A to send. The problem is that TCP entity in A is not able to take out data from its transmission buffer at the same rate that its application layer introduces it, because R is less than S. So, application layer has to go down its data sending rate to TCP socket to not overflow its transmission buffer, where the whole file doesn t fit. Groups and grades (out of 5 points): Surnames Name Group Problems Grade ARCINIEGA FERNANDEZ ALEJANDRO 1 1, 6 3 ARJONILLA COBREROS PABLO MANUEL 1 1, 6 3 DIAZ CASAL DARIO 2 2, 5 3,5 GARCIA MORENO FRANCISCO MANUEL 2 2, 5 3,5 MERCHAN CACHINERO BORJA MANUEL 2 2, 5 3,5 JARANA PEREZ JOSE ANDRES 3 3, 7 5 CASTRO MATEOS HECTOR 3 3, 7 5 GUERRERO MONTORO ALEJANDRO 4 4, 8 5 RODRIGUEZ DE PRA AVILES MARIA JOSE 4 4, 8 5 SANJUAN SEGOVIA FELIX MANUEL 4 4, 8 5 SANCHEZ GUAJARDO FAJARDO CARLOS 5 9, 13 3 SCHUETZ ROLAND 5 9, 13 3 VARO HERRERO PEDRO ANTONIO 5 9, 13 3 VAZQUEZ SANCHEZ RAFAEL 6 10, 11, 12 1,5 VERA HERNANDEZ PABLO 6 10, 11, 12 1,5 YAÑEZ HERRERA ALFONSO 6 10, 11, 12 1,5 ELVIRA PEREZ SERGIO 7 9, 13 5 RINCON BORREGUERO ALBERTO 7 9, 13 5 7/8