Module 25 TCP Timers and delayed duplicates problem in TCP

Size: px
Start display at page:

Download "Module 25 TCP Timers and delayed duplicates problem in TCP"

Transcription

1 Computer Networks and ITCP/IP Protocols 1 Module 25 TCP Timers and delayed duplicates problem in TCP Introduction TCP uses timers for many cases. We have seen a case where it needs a retransmission timer in module 15 and we have also seen how timeout value for that timer is calculated on the basis of RTT calculation in the previous module. In this module, we will look at few other types of timers used by TCP. That includes, connection establishment timer, time wait -2 timer, keep alive timer, delayed ACK timer and persist timer. TCP, unlike other layers, is plagued by a problem known as delayed duplicate problem. In this problem, the TCP segments roam around in the network and delivered to the receiver when the duplicates retransmitted reached there already. We will look at that problem in this module and how that problem is solved by a method provided by a researcher called Tomlinson. We will also see how delayed duplicates hampers the process of connection establishment and how the three-way handshake solves that problem. Timers used by TCP TCP uses many timers. This module introduces most commonly used timers. The first timer we will mention here is called connection establishment timer. This timer is used when the TCP establishes the connection. TCP follows a method known as a three-way handshake for connection establishment. We will, in the later part of this module, learn more about that process but here is a short description. A sender sends a connection request to the receiver, upon receipt, the receiver responds back with its own request as well as the ack of the sender's request. The sender completes the handshake by sending the ack to the receiver s response. In this process, it is possible that receiver does not receive the connection request or might also send the response but the response is lost, then, it is possible that the sender might wait forever for the response. This timer eliminates that possibility. As soon as the sender sends the connection request, it starts the timer, if it does not get the response before the timer goes off, it will resend the connection request. Another timer which we have already seen in module 15 is the delayed ack timer. When the acks are piggybacked, the receiver waits for the reverse traffic. It starts this timer when it receives a segment from the other side. If this timer goes off before the receiver generates a reverse traffic, it sends a special ack frame, otherwise, the ack is piggybacked on the reverse traffic. We will discuss other timers one by one now. We have already described retransmission timer process in detail in the previous module so we will not discuss that further here.

2 Computer Networks and ITCP/IP Protocols 2 Persist Timer The persist timer s function is depicted in figure We have already seen in the previous module that TCP deploys flow control using window advertisement process. The process stops the traffic from the sender altogether if the receiver advertises a zero window. It is, in this case, possible that after a while the receiver application reads the data and the receiver transport layer sends a non-zero window advertisement. What if this segment is lost? We run into a deadlock. The sender believes that the receiver has given a zero window so he keeps waiting. Receiver believes that it has already sent a clear signal to the sender so it should send whenever it wishes to and continue waiting for segments on that connection. Thus both of them are waiting for the other to initiate something and connection remains on hold forever. To avoid this problem, persist timer is invoked. It works as shown in the figure Figure 25.1 The persist timer Closely observe how the sender starts the persist timer when it receives a zero window advertisement. You can see that subsequent nonzero window advertisement is lost and receiver keeps on waiting for a sender to start transmitting. Only when the persist timer goes off, the sender sends a probe, a special segment which inquires if the window size is still zero. This probe is always responded back by a receiver, however busy it is, as it is of highest priority communication. You can see that in a response of sender's probe, the receiver repeats the nonzero window advertisement, the deadlock is broken and communication starts all over again. What if the persist timer goes off but the receiver still has zero-window? The receiver responds back with zero-window yet again and the persist timer starts running afresh. Keepalive timer The keep alive timer is kept to handle a normal case where users shut off their machine, or close the application or their devices batteries drain off and normal connection close does not take place. For example, when we open our browser, it instructs the TCP process

3 Computer Networks and ITCP/IP Protocols 3 running underneath to establish a connection with the web server and when we log out, it requests the same TCP process to terminate that connection. If we do not log out and close the mail client, or shut the machine off or the battery of our machine is drained, the log out is not executed and thus our TCP won't send connection close request to the other end and closes down. The problem it creates is, the server keeps on waiting for us to send something, keeps a process open for us waiting for our commands, spares some memory for us to store our segments etc. If the server does not come to know that we are done from our side, and if it keeps on waiting on such dead connections, it will soon run out of memory and processes to handle new incoming clients. To sort this problem out, another timer, called keep alive timer is used. The process is depicted in figure Figure 25.2 The keep alive timer for making sure the server gets rid of a dead connection. As soon as the server (Sender here) receives a query from a client (Receiver here), and responds back, it starts this timer. If there is no activity from the receiver for a substantial period, the keep alive timer goes off. Once the timer goes off, the server sends a typical message normally known as Are you alive message. If the client is really running, it will respond as shown in the figure, indicating it is running. The server restarts the keep alive

4 Computer Networks and ITCP/IP Protocols 4 timer yet again. If a client sends a query, it might respond yet again and restart that timer yet again. If a long enough period of inactivity again forces the keep alive timer to go off, the server again sends the are you alive message. If this time, as shown in the figure, the client is down and cannot send the response back, the server tries calling it a few more times before concluding that the client is down and release resources. Fin-Wait-2 Timer TCP closes connection using a process known as four-way handshake, in which case, the sender TCP sends a disconnection request (DR) to the receiver when it feels it has sent everything it wanted to. The receiver provides the ack to the DR and keeps on sending whatever it has to. Once the receiver is done, it will send its own Disconnection Request and sender provides the ack in the final move. The problem occurs when the sender sends its DR and received the ACK but receiver s DR does not reach the sender. The sender should not keep on waiting forever. The solution is called Fin-Wait-2 timer 1. This timer is initiated upon receipt of the ack from the receiver to the DR request. If the timer goes off before getting the DR from the receiver, sender closes on its own. Figure 25.3 disconnection process in TCP Figure 25.3 depicts the connection close process that we described. You can see that the receiver responds to the sender s DR first and after a while sends its own request. Such a closing process is sometimes denoted as asynchronous close; that means sender and receiver do not close at the same point in time. However, the process depicted in figure 25.3 indicates a perfect close without any trouble. Now pay attention to figure The connection close runs into trouble as the receiver fails to send the DR request, may be because the receiver process is crashed or user has shut off 1 This name is given on the basis of the connection status at that point in time. When the DR is sent, the TCP is said to have sent a Final segment. The wait for the ACK is known as Fin-Wait-1. When the ack is received, the sender further waits for the DR from the other side, which is subsequently called Fin-Wait-2.

5 Computer Networks and ITCP/IP Protocols 5 that process inadvertently or receiver has sent the DR but lost in transit. In whatever case, the sender does not receive the response from the receiver in time. The sender does not end up in an infinite loop though, the Fin-wait-2 timer goes off and sender closes on its own, without waiting for the receiver s DR any longer. Figure 25.4 Fin-wait-2 timer Time-Wait timer Final timer we are going to learn is known as a time-wait timer. TCP works with the internet where the packets may take a much longer path due to congestion and take an inordinate time, forcing the sender to retransmit. Figure 25.5 time wait timer In this case, the original packets delayed to the point that they are received after the retransmitted packets. Such packets are known as delayed duplicates and are a serious problem. When a connection is closed, such delayed duplicates may still be around and reach the communicating party after the connection is closed. As per the laws of Internet, such delayed duplicates live for maximum two minutes and thus whenever a connection is

6 Computer Networks and ITCP/IP Protocols 6 closed, for two additional minutes, there is a likelihood of a segment belonging to that connection might reach the communicating party. To pick up these delayed duplicates and thrown them to the dustbin (discard them), we need a timer. This timer is known as a timewait timer. Observe the figure The connection close process is completed. As soon as it is completed, the time wait timer commences and runs for the default 2 minutes or some lesser value which is provided at the time of installation. The receiver waits for all delayed duplicates and discards them if they ever turn up. These timers help TCP come out of situations where the receiver fail to respond in time or if the delayed duplicates arrive after the connection is closed. We will throw some more light on the delayed duplicates now. Delayed duplicates Delayed duplicates, as mentioned earlier, are packets sent earlier and after having taken a much longer route, reach the destination later than the retransmitted copies of them. Let us take an example to understand. The complete process is depicted in four figures, 25.6 to Figure 25.6 a normal path from O to N Figure 25.7 a longer path taken from O to N when the original path is congested Closely observe 25.6 and describes a normal path (which is shorter) through which a packet reaches at the other end quickly. Once in a while, when the usual path is congested, the packets take a longer route describes that longer route. The longer route obviously takes more time of the packets traveling over them. Such a case presents a situation where there are variable times to reach to the receiver, some take short while some take long paths and thus there is no guarantee that a packet will ever reach the destination in order of sending. The other point to note is that our retransmission timer, which is set for the normal traffic, times out and forces the sender to retransmit assuming the delayed duplicates are lost while in the true sense they aren't. The serious problem arises when such assumed lost duplicate packets reach at the receiver at later times. Figures

7 Computer Networks and ITCP/IP Protocols and 25.9 depicts such a case. An employee's paychecks are calculated at the location we call O in the network The printer is situated at a place known as N. For each of the employees, the connection is established by the paycheck calculation system (O) to the printer (N), paycheck details are sent, and the connection is closed. In a typical case mentioned in the figure, all three packets are assumed lost when traveling over a longer path and retransmitted. They reach before the delayed duplicates, the printer prints that fortunate employee's paycheck and when delayed duplicates arrive, does that again without really knowing them to be duplicated and not a new data. The lucky employee gets two paychecks! Figure 25.8 retransmitted packets reaching at the receiver before the original packets Figure 25.9 delayed duplicates now arrive at the receiver Understanding the problem with delayed duplicates, one must understand that the transport layer must find a solution to this problem. TCP designers have provided a solution based on a few important principles. Here is the description. The first principle is to provide unique sequence numbers for each segment. The idea is simple. Provide a sequence number to each segment makes sure the receiver can easily identify two different segments with the same sequence number. The problem solved! No! a small problem still remains. How long should one remember these sequences? A node might be receiving many connections from many senders across the world and if it tries to remember all sequence numbers for each of the senders forever, it just cannot work! The amount of memory needed will soon go beyond the reasonable level. The solution to the second problem boils down to another restriction, no segment is allowed to roam around forever in the network. There is a lifetime associated with every segment after which it is considered dead and discarded. With both these measures, providing a unique sequence number, and a restricted lifetime for each of the segments, the solution to delayed duplicate problem is possible. The receiver, after accepting a typical segment, should not accept the segment from the same sender, with the same sequence number, for the lifetime of the segment. For example,

8 Computer Networks and ITCP/IP Protocols 8 consider a segment with sequence number 12 is received by a receiver at 12:15:10 with a lifetime of two minutes getting over at 12:17:10. If the segment with sequence number 12 from the same sender is received at the receiver till 12:17:10 it will be considered a duplicate and discarded. Any delayed duplicate will reach the sender only if its lifetime is not over and receiver will surely catch it as the time wait timer is not yet off. Let us try to understand it by an example. Suppose a receiver receives a segment with sequence number at time 12:30:15 with lifetime 60 seconds (earlier lifetime was of two minutes). Suppose receiver receives the segment with sequence number at 12:30:25, one minute is not yet elapsed and the receiver understands it to be duplicate and it is discarded. TCP uses a 32-bit sequence number for this work. Internet default lifetime is 2 minutes. TCP can use a window scaling option to increase the window size to 2 32 and default lifetime can be reduced at the time of installation. The problem is solved but again with a minor glitch. What if a machine goes down and forgets all these sequence number calculations? When the machine goes down Suppose sender is sending and TCP is obliging it with sending segments one after another. TCP has sent the segments till 1 to 5000 for example. The sender should not number any other segment any value between 1 to 5000 for next two minutes. If the machine runs without any problem, the TCP successfully remembers the sequence numbers of the segments sent during last two minutes and do not repeat them. However, there is a problem. What if a machine goes down and TCP goes down with it? If the machine starts immediately, the user may restart the application without any delay and TCP also starts blasting at full speed yet again. There is a possibility that the new TCP connection accidentally uses the same sequence number which it was using a few seconds back. In that case, the innocuous new segment with the same sequence number as old is falsely considered to be duplicate and discarded. A researcher called Tomlinson found the solution to this problem. Every computer has RTC (real time clock) as part of its hardware. The RTC is designed in a way that even when the computer goes down, it continues to run. The idea that Tomlinson gave was to pick up 32 higher digits of the clock as an initial sequence number of a TCP connection (and more if the window scale factor is used). Even when the TCP is down and forgot the older sequence numbers, the clock keeps ticking and when a new connection is established and a new initial sequence number is chosen, it is larger than the previous values.

9 Computer Networks and ITCP/IP Protocols 9 Great! But the problem is not yet solved. The initial sequence number is different for different connection as well as larger than the previous connection. The sequence number of other segments are decided based on the amount of data being sent over each segment. The TCP may start sending at a very fast speed; faster than the clock itself, it might generate a duplicate sequence number which clock would choose for a new connection, as an initial sequence number. On the other hand, if the clock wraps around, it starts all over from zero and repeats numbers. This might match with a running connection if the connection is sending data at a much slower speed. To handle that, two measures are taken. First, the clock runs much faster than the TCP speed. And second, the clock uses a much larger number of digits and does not wrap around quickly. Finally, the connection establishment process also is plagued by the delayed duplicate problem. Tomlinson also provided a solution to that problem. When the connection is being established, we are beginning with new sequence numbers and thus we should be careful about delayed duplicates of connection requests and acknowledgments coming in and establishing a connection when none of the communicating parties want it. Connection establishment problem and solution Let us try to understand this problem by an example. Consider two cases depicted in figure The figures are self-explanatory. In both cases, there is one connection which is established without the knowledge of either of the parties. Tomlinson also suggested a solution to that problem, known as 3-way-handshake. If you have closely observed the figure you can see that this process is basically a 2-way handshake where a sender sends and the receiver acknowledges. The three-way handshake increases one additional phase. Figure two cases, in case 1, sender expects one while receiver considers two connections, in case 2, sender understands no connection but receiver believes that there is one connection

10 Computer Networks and ITCP/IP Protocols 10 Here is the solution in form of a three-way handshake. In this solution, the sender sends a CR with a typical initial sequence number (based on the RTC value) and the receiver responds back with its own initial sequence number (from its own RTC) as well as the ack of the CR. The sender, finally responds back with the ack of the receiver's response. The (a) depicts a normal 3-way handshake where the sender uses initial sequence number as 45 while the receiver uses a number 99. Case depicted in 25.11(b) indicates a delayed duplicate of CR reaching a receiver. The receiver, unknowingly, sends the ack with its own initial sequence number 99. The receiver cannot complete the connection unless the sender sends back the ack. Sender, upon receipt of the receiver's Ack 46, understands it to be an answer to request not sent and so denies the connection (c) depicts a case where the receiver not only has the duplicate CR but duplicate ack as well. The sequence number, which receiver used in its response is different than what the sender has sent and thus it won t match and the connection is not established yet again. Is there a possibility that receiver s response (with sequence 149) and duplicate ack (with sequence number 99) ever use the same sequence number? No way, the receiver cannot use the same sequence number till the time old segment with same sequence number dies and thus it is unlikely that receiver has generated one segment with sequence number 99 and again generate that when the duplicates are still around. Thus, all problems are handled with 3-way-handshake. Figure The solution to delayed duplicate problem Summary We have looked at different types of timers in this module including persist timer, keep alive timer, time wait, and fin-wait-2 timers. We have also seen how delayed duplicates pose a

11 Computer Networks and ITCP/IP Protocols 11 serious threat to TCP communication and how Tomlinson solved the problem by providing a simple method to choose an initial sequence number for a new TCP connection. Finally, we have seen that connection establishment process also is plagued by the same problem and the solution is to use a three-way handshake.

Module 15 Communication at Data Link and Transport Layer

Module 15 Communication at Data Link and Transport Layer Computer Networks and ITCP/IP Protocols 1 Module 15 Communication at Data Link and Transport Layer Introduction Communication at data link layer is very important as it is between two adjacent machines

More information

CS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581)

CS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581) : Computer Networks Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581) TCP as seen from above the socket The TCP socket interface consists of: Commands to start

More information

ECE 435 Network Engineering Lecture 9

ECE 435 Network Engineering Lecture 9 ECE 435 Network Engineering Lecture 9 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 2 October 2018 Announcements HW#4 was posted, due Thursday 1 HW#3 Review md5sum/encryption,

More information

Chapter 24. Transport-Layer Protocols

Chapter 24. Transport-Layer Protocols Chapter 24. Transport-Layer Protocols 23.1 Introduction 23.2 User Datagram Protocol 23.3 Transmission Control Protocol 23.4 SCTP Computer Networks 24-1 Position of Transport-Layer Protocols UDP is an unreliable

More information

TCP Strategies. Keepalive Timer. implementations do not have it as it is occasionally regarded as controversial. between source and destination

TCP Strategies. Keepalive Timer. implementations do not have it as it is occasionally regarded as controversial. between source and destination Keepalive Timer! Yet another timer in TCP is the keepalive! This one is not required, and some implementations do not have it as it is occasionally regarded as controversial! When a TCP connection is idle

More information

EEC-682/782 Computer Networks I

EEC-682/782 Computer Networks I EEC-682/782 Computer Networks I Lecture 15 Wenbing Zhao w.zhao1@csuohio.edu http://academic.csuohio.edu/zhao_w/teaching/eec682.htm (Lecture nodes are based on materials supplied by Dr. Louise Moser at

More information

Basic Protocols and Error Control Mechanisms

Basic Protocols and Error Control Mechanisms Basic Protocols and Error Control Mechanisms Nicola Dragoni Embedded Systems Engineering DTU Compute ACK/NACK Protocol Polling Protocol PAR Protocol Exchange of State Information Two-Way Handshake Protocol

More information

TCP: Flow and Error Control

TCP: Flow and Error Control 1 TCP: Flow and Error Control Required reading: Kurose 3.5.3, 3.5.4, 3.5.5 CSE 4213, Fall 2006 Instructor: N. Vlajic TCP Stream Delivery 2 TCP Stream Delivery unlike UDP, TCP is a stream-oriented protocol

More information

Problem 7. Problem 8. Problem 9

Problem 7. Problem 8. Problem 9 Problem 7 To best answer this question, consider why we needed sequence numbers in the first place. We saw that the sender needs sequence numbers so that the receiver can tell if a data packet is a duplicate

More information

Basic Reliable Transport Protocols

Basic Reliable Transport Protocols Basic Reliable Transport Protocols Do not be alarmed by the length of this guide. There are a lot of pictures. You ve seen in lecture that most of the networks we re dealing with are best-effort : they

More information

Management of Protocol State

Management of Protocol State Management of Protocol State Ibrahim Matta December 2012 1 Introduction These notes highlight the main issues related to synchronizing the data at both sender and receiver of a protocol. For example, in

More information

ECE 435 Network Engineering Lecture 10

ECE 435 Network Engineering Lecture 10 ECE 435 Network Engineering Lecture 10 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 28 September 2017 Announcements HW#4 was due HW#5 will be posted. midterm/fall break You

More information

User Datagram Protocol

User Datagram Protocol Topics Transport Layer TCP s three-way handshake TCP s connection termination sequence TCP s TIME_WAIT state TCP and UDP buffering by the socket layer 2 Introduction UDP is a simple, unreliable datagram

More information

Unit 2.

Unit 2. Unit 2 Unit 2 Topics Covered: 1. PROCESS-TO-PROCESS DELIVERY 1. Client-Server 2. Addressing 2. IANA Ranges 3. Socket Addresses 4. Multiplexing and Demultiplexing 5. Connectionless Versus Connection-Oriented

More information

Transport Protocols and TCP: Review

Transport Protocols and TCP: Review Transport Protocols and TCP: Review CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 1 19 September 2010 1 Connection Establishment and Termination 2 2 1 Connection Establishment

More information

CS457 Transport Protocols. CS 457 Fall 2014

CS457 Transport Protocols. CS 457 Fall 2014 CS457 Transport Protocols CS 457 Fall 2014 Topics Principles underlying transport-layer services Demultiplexing Detecting corruption Reliable delivery Flow control Transport-layer protocols User Datagram

More information

User Datagram Protocol (UDP):

User Datagram Protocol (UDP): SFWR 4C03: Computer Networks and Computer Security Feb 2-5 2004 Lecturer: Kartik Krishnan Lectures 13-15 User Datagram Protocol (UDP): UDP is a connectionless transport layer protocol: each output operation

More information

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

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H... 1 of 9 11/26/2017, 11:28 AM Homework 3 solutions 1. A window holds bytes 2001 to 5000. The next byte to be sent is 3001. Draw a figure to show the situation of the window after the following two events:

More information

Transport Protocols & TCP TCP

Transport Protocols & TCP TCP Transport Protocols & TCP CSE 3213 Fall 2007 13 November 2007 1 TCP Services Flow control Connection establishment and termination Congestion control 2 1 TCP Services Transmission Control Protocol (RFC

More information

Occasionally, a network or a gateway will go down, and the sequence. of hops which the packet takes from source to destination must change.

Occasionally, a network or a gateway will go down, and the sequence. of hops which the packet takes from source to destination must change. RFC: 816 FAULT ISOLATION AND RECOVERY David D. Clark MIT Laboratory for Computer Science Computer Systems and Communications Group July, 1982 1. Introduction Occasionally, a network or a gateway will go

More information

CS164 Final Exam Winter 2013

CS164 Final Exam Winter 2013 CS164 Final Exam Winter 2013 Name: Last 4 digits of Student ID: Problem 1. State whether each of the following statements is true or false. (Two points for each correct answer, 1 point for each incorrect

More information

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods 1 Timeout freezing of transmission (TFT) Used in situations where

More information

Chapter 3 Transport Layer

Chapter 3 Transport Layer Chapter 3 Transport Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and delete

More information

Question 1 (6 points) Compare circuit-switching and packet-switching networks based on the following criteria:

Question 1 (6 points) Compare circuit-switching and packet-switching networks based on the following criteria: Question 1 (6 points) Compare circuit-switching and packet-switching networks based on the following criteria: (a) Reserving network resources ahead of data being sent: (2pts) In circuit-switching networks,

More information

CSCI Topics: Internet Programming Fall 2008

CSCI Topics: Internet Programming Fall 2008 CSCI 491-01 Topics: Internet Programming Fall 2008 Transport Layer Derek Leonard Hendrix College October 15, 2008 Original slides copyright 1996-2007 J.F Kurose and K.W. Ross 1 Chapter 3: Roadmap 3.1 Transport-layer

More information

6.2 Elements of Transport Protocols

6.2 Elements of Transport Protocols CEN445 Network Protocols and Algorithms Chapter 6 Transport Layer 6.2 Elements of Transport Protocols Dr. Mostafa Hassan Dahshan Department of Computer Engineering College of Computer and Information Sciences

More information

Lixia Zhang M. I. T. Laboratory for Computer Science December 1985

Lixia Zhang M. I. T. Laboratory for Computer Science December 1985 Network Working Group Request for Comments: 969 David D. Clark Mark L. Lambert Lixia Zhang M. I. T. Laboratory for Computer Science December 1985 1. STATUS OF THIS MEMO This RFC suggests a proposed protocol

More information

TCP/IP-2. Transmission control protocol:

TCP/IP-2. Transmission control protocol: TCP/IP-2 Transmission control protocol: TCP and IP are the workhorses in the Internet. In this section we first discuss how TCP provides reliable, connectionoriented stream service over IP. To do so, TCP

More information

Chapter 3 Transport Layer

Chapter 3 Transport Layer Chapter 3 Transport Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and delete

More information

Outline. CS5984 Mobile Computing

Outline. CS5984 Mobile Computing CS5984 Mobile Computing Dr. Ayman Abdel-Hamid Computer Science Department Virginia Tech Outline Review Transmission Control Protocol (TCP) Based on Behrouz Forouzan, Data Communications and Networking,

More information

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

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors CRC Implementation Error control An Engineering Approach to Computer Networking Detects all single bit errors almost all 2-bit errors any odd number of errors all bursts up to M, where generator length

More information

Transport Layer: outline

Transport Layer: outline Transport Layer: outline Transport-layer services Multiplexing and demultiplexing Connectionless transport: UDP Principles of reliable data transfer Connection-oriented transport: TCP Segment structure

More information

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22 23-3 TCP 23.22 TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms at the transport level. Topics

More information

Jaringan Komputer. The Transport Layer

Jaringan Komputer. The Transport Layer Jaringan Komputer Transport Layer The Transport Layer The heart of the whole protocol hierarchy Task: To provide reliable, cost-effective data transport from the source machine to the destination machine,

More information

The Transport Layer. Why is there a transport layer? Addressing

The Transport Layer. Why is there a transport layer? Addressing The Transport Layer Provides logical communication between processes network layer: data transfer between end systems transport layer: data transfer between processes Two types of transport service is

More information

Sequence Number. Acknowledgment Number. Data

Sequence Number. Acknowledgment Number. Data CS 455 TCP, Page 1 Transport Layer, Part II Transmission Control Protocol These slides are created by Dr. Yih Huang of George Mason University. Students registered in Dr. Huang's courses at GMU can make

More information

Sequence Number. Acknowledgment Number. Checksum. Urgent Pointer plus Sequence Number indicates end of some URGENT data in the packet

Sequence Number. Acknowledgment Number. Checksum. Urgent Pointer plus Sequence Number indicates end of some URGENT data in the packet TCP Urgent Source Port Destination Port Sequence Number Acknowledgment Number HdrLen Reserved UA P RS F Checksum Window Size Urgent Pointer Urgent Pointer plus Sequence Number indicates end of some URGENT

More information

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections ICS 451: Today's plan Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections Alternating Bit Protocol: throughput tied to latency with

More information

ADVANCED COMPUTER NETWORKS

ADVANCED COMPUTER NETWORKS ADVANCED COMPUTER NETWORKS Congestion Control and Avoidance 1 Lecture-6 Instructor : Mazhar Hussain CONGESTION CONTROL When one part of the subnet (e.g. one or more routers in an area) becomes overloaded,

More information

Chapter 3 Review Questions

Chapter 3 Review Questions Chapter 3 Review Questions. 2. 3. Source port number 6 and destination port number 37. 4. TCP s congestion control can throttle an application s sending rate at times of congestion. Designers of applications

More information

TCP Adaptive Retransmission Algorithm - Original TCP. TCP Adaptive Retransmission Algorithm Jacobson

TCP Adaptive Retransmission Algorithm - Original TCP. TCP Adaptive Retransmission Algorithm Jacobson TCP Adaptive Retransmission Algorithm - Original TCP Theory Estimate RTT Multiply by 2 to allow for variations Practice Use exponential moving average (A = 0.1 to 0.2) Estimate = (A) * measurement + (1-

More information

CMPE150 Midterm Solutions

CMPE150 Midterm Solutions CMPE150 Midterm Solutions Question 1 Packet switching and circuit switching: (a) Is the Internet a packet switching or circuit switching network? Justify your answer. The Internet is a packet switching

More information

Congestion Control 3/16/09

Congestion Control 3/16/09 Congestion Control Outline Resource Allocation Queuing TCP Congestion Control Spring 009 CSE3064 Issues Two sides of the same coin pre-allocate resources so at to avoid congestion control congestion if

More information

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

CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay CS 716: Introduction to communication networks - 18 th class; 7 th Oct 2011 Instructor: Sridhar Iyer IIT Bombay Reliable Transport We have already designed a reliable communication protocol for an analogy

More information

Stream Control Transmission Protocol

Stream Control Transmission Protocol Chapter 13 Stream Control Transmission Protocol Objectives Upon completion you will be able to: Be able to name and understand the services offered by SCTP Understand SCTP s flow and error control and

More information

Reliable Transport I: Concepts and TCP Protocol

Reliable Transport I: Concepts and TCP Protocol Reliable Transport I: Concepts and TCP Protocol Stefano Vissicchio UCL Computer Science COMP0023 Today Transport Concepts Layering context Transport goals Transport mechanisms and design choices TCP Protocol

More information

CS/ECpE 5516, Spring 1998, Midterm Exam 75 minutes, 120 points Prof. Abrams

CS/ECpE 5516, Spring 1998, Midterm Exam 75 minutes, 120 points Prof. Abrams CS/ECpE 5516, Spring 1998, Midterm Exam 75 minutes, 120 points Prof. Abrams Write your answers on your own paper; a stapler and scrap paper are available at the front of the room. Arrange the answer pages

More information

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall TCP Kai Shen 10/19/2009 CSC 257/457 - Fall 2009 1 TCP: Overview connection-oriented: handshaking (exchange of control msgs) to initialize sender, receiver state before data exchange pipelined: multiple

More information

Elements of Transport Protocols

Elements of Transport Protocols CEN445 Network Protocols and Algorithms Chapter 6 Transport Layer 6.2 Elements of Transport Protocols Dr. Mostafa Hassan Dahshan Department of Computer Engineering College of Computer and Information Sciences

More information

CS Transport. Outline. Window Flow Control. Window Flow Control

CS Transport. Outline. Window Flow Control. Window Flow Control CS 54 Outline indow Flow Control (Very brief) Review of TCP TCP throughput modeling TCP variants/enhancements Transport Dr. Chan Mun Choon School of Computing, National University of Singapore Oct 6, 005

More information

Selecting Sequence Numbers Raymond S. Tomlinson. Bolt Beranek and Newman Inc. Cambridge, Massachusetts

Selecting Sequence Numbers Raymond S. Tomlinson. Bolt Beranek and Newman Inc. Cambridge, Massachusetts Selecting Sequence Numbers Raymond S. Tomlinson Bolt Beranek and Newman Inc. Cambridge, Massachusetts Introduction A characteristic of almost all communication protocols is the use of unique numbers to

More information

TCP : Fundamentals of Computer Networks Bill Nace

TCP : Fundamentals of Computer Networks Bill Nace TCP 14-740: Fundamentals of Computer Networks Bill Nace Material from Computer Networking: A Top Down Approach, 6 th edition. J.F. Kurose and K.W. Ross Administrivia Lab #1 due now! Reminder: Paper Review

More information

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain ERROR AND FLOW CONTROL Lecture: 10 Instructor Mazhar Hussain 1 FLOW CONTROL Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most important

More information

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

COMPUTER NETWORK. Homework #2. Due Date: April 12, 2017 in class Computer Network Homework#2 COMPUTER NETWORK Homework #2 Due Date: April 12, 2017 in class Question 1 Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A and Host B

More information

MODELS OF DISTRIBUTED SYSTEMS

MODELS OF DISTRIBUTED SYSTEMS Distributed Systems Fö 2/3-1 Distributed Systems Fö 2/3-2 MODELS OF DISTRIBUTED SYSTEMS Basic Elements 1. Architectural Models 2. Interaction Models Resources in a distributed system are shared between

More information

The flow of data must not be allowed to overwhelm the receiver

The flow of data must not be allowed to overwhelm the receiver Data Link Layer: Flow Control and Error Control Lecture8 Flow Control Flow and Error Control Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before

More information

Internet Networking recitation #10 TCP New Reno Vs. Reno

Internet Networking recitation #10 TCP New Reno Vs. Reno recitation #0 TCP New Reno Vs. Reno Spring Semester 200, Dept. of Computer Science, Technion 2 Introduction Packet Loss Management TCP Reno (RFC 258) can manage a loss of at most one packet from a single

More information

Kent State University

Kent State University CS 4/54201 Computer Communication Network Kent State University Dept. of Computer Science www.mcs.kent.edu/~javed/class-net06f/ 1 A Course on Networking and Computer Communication LECT-10, S-2 IP- Internet

More information

THE TRANSPORT LAYER UNIT IV

THE TRANSPORT LAYER UNIT IV THE TRANSPORT LAYER UNIT IV The Transport Layer: The Transport Service, Elements of Transport Protocols, Congestion Control,The internet transport protocols: UDP, TCP, Performance problems in computer

More information

Bandwidth Allocation & TCP

Bandwidth Allocation & TCP Bandwidth Allocation & TCP The Transport Layer Focus Application Presentation How do we share bandwidth? Session Topics Transport Network Congestion control & fairness Data Link TCP Additive Increase/Multiplicative

More information

Chapter 11 Data Link Control 11.1

Chapter 11 Data Link Control 11.1 Chapter 11 Data Link Control 11.1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11-1 FRAMING The data link layer needs to pack bits into frames, so that each

More information

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

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length) Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer 3.5 Connectionoriented transport: TCP segment

More information

Lecture 3: The Transport Layer: UDP and TCP

Lecture 3: The Transport Layer: UDP and TCP Lecture 3: The Transport Layer: UDP and TCP Prof. Shervin Shirmohammadi SITE, University of Ottawa Prof. Shervin Shirmohammadi CEG 4395 3-1 The Transport Layer Provides efficient and robust end-to-end

More information

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP CS 5520/ECE 5590NA: Network Architecture I Spring 2008 Lecture 13: UDP and TCP Most recent lectures discussed mechanisms to make better use of the IP address space, Internet control messages, and layering

More information

NWEN 243. Networked Applications. Layer 4 TCP and UDP

NWEN 243. Networked Applications. Layer 4 TCP and UDP NWEN 243 Networked Applications Layer 4 TCP and UDP 1 About the second lecturer Aaron Chen Office: AM405 Phone: 463 5114 Email: aaron.chen@ecs.vuw.ac.nz Transport layer and application layer protocols

More information

Internet and Intranet Protocols and Applications

Internet and Intranet Protocols and Applications Internet and Intranet Protocols and Applications Lecture 1b: The Transport Layer in the Internet January 17, 2006 Arthur Goldberg Computer Science Department New York University artg@cs.nyu.edu 01/17/06

More information

Transport Layer: Outline

Transport Layer: Outline Transport Layer: Outline Transport-layer services Multiplexing and demultiplexing Connectionless transport: UDP Principles of reliable data transfer Connection-oriented transport: TCP Segment structure

More information

CSE 461. TCP and network congestion

CSE 461. TCP and network congestion CSE 461 TCP and network congestion This Lecture Focus How should senders pace themselves to avoid stressing the network? Topics Application Presentation Session Transport Network congestion collapse Data

More information

Internet Protocols Fall Outline

Internet Protocols Fall Outline Internet Protocols Fall 2004 Lecture 12 TCP Andreas Terzis Outline TCP Connection Management Sliding Window ACK Strategy Nagle s algorithm Timeout estimation Flow Control CS 449/Fall 04 2 1 TCP Connection

More information

CSCD 330 Network Programming Winter 2015

CSCD 330 Network Programming Winter 2015 CSCD 330 Network Programming Winter 2015 Lecture 11a Transport Layer Reading: Chapter 3 Some Material in these slides from J.F Kurose and K.W. Ross All material copyright 1996-2007 1 Chapter 3 Sections

More information

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery 1 TCP Data Stream Consists of bytes Delivered using a virtual connection between sockets Each socket has the port number and IP address

More information

Data Link Control Protocols

Data Link Control Protocols Protocols : Introduction to Data Communications Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 23 May 2012 Y12S1L07, Steve/Courses/2012/s1/its323/lectures/datalink.tex,

More information

UNIT IV -- TRANSPORT LAYER

UNIT IV -- TRANSPORT LAYER UNIT IV -- TRANSPORT LAYER TABLE OF CONTENTS 4.1. Transport layer. 02 4.2. Reliable delivery service. 03 4.3. Congestion control. 05 4.4. Connection establishment.. 07 4.5. Flow control 09 4.6. Transmission

More information

Network Protocols. Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1

Network Protocols. Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1 Network Protocols Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1 IP review IP provides just enough connected ness Global addressing Hop by hop routing IP over

More information

TCP Congestion Control

TCP Congestion Control TCP Congestion Control Lecture material taken from Computer Networks A Systems Approach, Third Ed.,Peterson and Davie, Morgan Kaufmann, 2003. Computer Networks: TCP Congestion Control 1 TCP Congestion

More information

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data ELEX 4550 : Wide Area Networks 2015 Winter Session UDP and TCP is lecture describes the two most common transport-layer protocols used by IP networks: the User Datagram Protocol (UDP) and the Transmission

More information

CS419: Computer Networks. Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance

CS419: Computer Networks. Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance : Computer Networks Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance TCP performance We ve seen how TCP the protocol works But there are a lot of tricks required to make it work well Indeed,

More information

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

CS 421: Computer Networks SPRING MIDTERM I April 7, minutes CS 421: Computer Networks SPRING 24 MIDTERM I April 7, 24 12 minutes Name: Student No: 1) a) Consider a 1 Mbits/sec channel with a 1 msec one-way propagation delay. We want to transfer a file of size 8

More information

3.5.6 TCP Connection Management

3.5.6 TCP Connection Management 02-068 C03 pp4 6/14/02 2:14 PM Page 248 248 CHAPTER 3 Transport Layer of unacknowledged data less than the value of RcvWindow, host A is assured that it is not overflowing the receive buffer at host B.

More information

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa NET 331 Computer Networks Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa Reformatted slides from textbook Computer Networking a top-down appraoch, Fifth Edition

More information

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren Lecture 5: Flow Control CSE 123: Computer Networks Alex C. Snoeren Pipelined Transmission Sender Receiver Sender Receiver Ignored! Keep multiple packets in flight Allows sender to make efficient use of

More information

TCP/IP Performance ITL

TCP/IP Performance ITL TCP/IP Performance ITL Protocol Overview E-Mail HTTP (WWW) Remote Login File Transfer TCP UDP IP ICMP ARP RARP (Auxiliary Services) Ethernet, X.25, HDLC etc. ATM 4/30/2002 Hans Kruse & Shawn Ostermann,

More information

The Transport Layer: TCP & Reliable Data Transfer

The Transport Layer: TCP & Reliable Data Transfer The Transport Layer: TCP & Reliable Data Transfer Smith College, CSC 249 February 15, 2018 1 Chapter 3: Transport Layer q TCP Transport layer services: v Multiplexing/demultiplexing v Connection management

More information

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018 TCP Review Carey Williamson Department of Computer Science University of Calgary Winter 2018 Credit: Much of this content came courtesy of Erich Nahum (IBM Research) The TCP Protocol Connection-oriented,

More information

8. TCP Congestion Control

8. TCP Congestion Control 8. TCP Congestion Control 1 TCP Congestion Control Slow-start increase Multiplicative decrease Congestion avoidance Measurement of variation Exponential timer backoff 2002 Yanghee Choi 2 Congestion Control

More information

Lecture - 36 Effect on Higher Layer I

Lecture - 36 Effect on Higher Layer I Satellite Communication Systems Prof. Kalyan Kumar Bandyopadhyay Department of Electronics and Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture - 36 Effect on Higher

More information

ECE 435 Network Engineering Lecture 15

ECE 435 Network Engineering Lecture 15 ECE 435 Network Engineering Lecture 15 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 26 October 2016 Announcements HW#5 due HW#6 posted Broadcasts on the MBONE 1 The Transport

More information

CS 640 Introduction to Computer Networks Spring 2009

CS 640 Introduction to Computer Networks Spring 2009 CS 640 Introduction to Computer Networks Spring 2009 http://pages.cs.wisc.edu/~suman/courses/wiki/doku.php?id=640-spring2009 Programming Assignment 3: Transmission Control Protocol Assigned: March 26,

More information

Chapter 11 Data Link Control 11.1

Chapter 11 Data Link Control 11.1 Chapter 11 Data Link Control 11.1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11-1 1 FRAMING The data link layer needs to pack bits into frames,, so that

More information

Transport Layer Protocols TCP

Transport Layer Protocols TCP Transport Layer Protocols TCP Gail Hopkins Introduction Features of TCP Packet loss and retransmission Adaptive retransmission Flow control Three way handshake Congestion control 1 Common Networking Issues

More information

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

Preview Test: HW3. Test Information Description Due:Nov. 3 Preview Test: HW3 Test Information Description Due:Nov. 3 Instructions Multiple Attempts Not allowed. This test can only be taken once. Force Completion This test can be saved and resumed later. Question

More information

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018 CMSC 417 Computer Networks Prof. Ashok K Agrawala 2018 Ashok Agrawala Message, Segment, Packet, and Frame host host HTTP HTTP message HTTP TCP TCP segment TCP router router IP IP packet IP IP packet IP

More information

Intro to LAN/WAN. Transport Layer

Intro to LAN/WAN. Transport Layer Intro to LAN/WAN Transport Layer Transport Layer Topics Introduction (6.1) Elements of Transport Protocols (6.2) Internet Transport Protocols: TDP (6.5) Internet Transport Protocols: UDP (6.4) socket interface

More information

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture TCP and Congestion Control (Day 1) Yoshifumi Nishida nishida@csl.sony.co.jp Sony Computer Science Labs, Inc 1 Today's Lecture Part1: TCP concept Part2: TCP detailed mechanisms Part3: Tools for TCP 2 1

More information

COMMUNICATION IN DISTRIBUTED SYSTEMS

COMMUNICATION IN DISTRIBUTED SYSTEMS Distributed Systems Fö 3-1 Distributed Systems Fö 3-2 COMMUNICATION IN DISTRIBUTED SYSTEMS Communication Models and their Layered Implementation 1. Communication System: Layered Implementation 2. Network

More information

UNIT IV TRANSPORT LAYER

UNIT IV TRANSPORT LAYER UNIT IV TRANSPORT LAYER UDP - SIMPLE DEMULTIPLEXER (UDP) The simplest transport protocol is one that extends the host-to-host delivery service of the underlying network into a process-to-process communication

More information

MODELS OF DISTRIBUTED SYSTEMS

MODELS OF DISTRIBUTED SYSTEMS Distributed Systems Fö 2/3-1 Distributed Systems Fö 2/3-2 MODELS OF DISTRIBUTED SYSTEMS Basic Elements 1. Architectural Models 2. Interaction Models Resources in a distributed system are shared between

More information

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols ETSF05/ETSF10 Internet Protocols Transport Layer Protocols 2016 Jens Andersson Transport Layer Communication between applications Process-to-process delivery Client/server concept Local host Normally initialiser

More information

Transport Layer TCP / UDP

Transport Layer TCP / UDP Transport Layer TCP / UDP Chapter 6 section 6.5 is TCP 12 Mar 2012 Layers Application Transport Why do we need the Transport Layer? Network Host-to-Network/Physical/DataLink High Level Overview TCP (RFC

More information

Programming Assignment 3: Transmission Control Protocol

Programming Assignment 3: Transmission Control Protocol CS 640 Introduction to Computer Networks Spring 2005 http://www.cs.wisc.edu/ suman/courses/640/s05 Programming Assignment 3: Transmission Control Protocol Assigned: March 28,2005 Due: April 15, 2005, 11:59pm

More information