 on TCP timers. Learning outcome at the end of the session students will be able to describe the concept of TCP timers. Content about TCP timers, cons algorithm, exponential backup algorithm, types of timers. In the previous video we have already discussed about TCP timers and first TCP timer that is retransmission timer. In this video we will discuss about the part of retransmission timers that are two algorithms we have used in TCP retransmission timers that is the exponential backup algorithm and cons algorithm and after that we will discuss about the next three timers that is persistent timers, keep alive timers and time and wait timers. Cons algorithm, what is the use of cons algorithm in TCP? TCP does not consider the RTT that is a retransmission round trip time for a retransmitted segment in its calculation of a new RTO. So, then that time we have to go to the algorithm that is cons algorithm. In this algorithm suppose that the segment is not acknowledged during the retransmission timeout period and is therefore, we have to go to the retransmission phase. If the user have not reached any acknowledgement then we have to go to the retransmission. And then when the sending TCP and the sending TCP receives an acknowledgement for this segment it does not know if the acknowledgement is for the original segment or for the retransmission one. If the user have forwarded two or more than two segments at a time then the if the user is sending the acknowledgement whether that acknowledgement for the first segment or it is second segment the user may get confused. So, in that time we have to go to the cons algorithm to find out the solution for that. That is above the value of the new RTT is based on the departure of the segment. Then we have to find out or we have to fix the departure time of the segment ok. In this one if the original segment was lost and the acknowledgement is for the retransmitted one the value of the current RTT must be calculated from the time the segment was retransmitted. So, to find the solution for this one to this ambiguity was solved by cons. Cons is one of the scientist or this algorithm we have to use to find out the solution for this one. That is original segment was lost and the acknowledgement is for the retransmitted one or the value of current RTT must be calculated from the time the segment was retransmitted ok. Then whenever the user is retransmitting one segment again and again it means we have to calculate the value of that retransmitted segment ok. Do not consider the round trip time of a retransmitted segment in the calculation of RTTS that is smooth round trip time ok. This one we would not consider ok while calculating the RTTS we would not consider for this one ok. Then do not update the value of RTTS until you send a segment and receive an acknowledgement without the need for the retransmission ok. In this one we do not update the value of RTTS that is the smooth retransmission timeout or round trip time until you send a segment and receive an acknowledgement without the need for the retransmission ok. Then exponential backup algorithm in this one what is the value of RT that is retransmission timeout if the retransmission occurs ok. Most TCP implementation uses an exponential backup algorithm to find out that that is the value of RTO is doubled for each retransmission. So, if the segment is retransmitted once the value is twice or 2 times RTO ok 2 into RTO. If the user have transmitted double triple time it means into 2 we have to calculate here. If it transmitted twice the value is 4 times the RTO and so on. Then they based on to find out that one we have to use the exponential backup algorithm ok. How we have to use this exponential backup algorithm and cons algorithm with the help of this simple example discuss about that ok. In the cons algorithm I said first before transmitting any data the user how to fix the timer here the user can start the timer. They have forward this request that the data can kind of sequence number acknowledgement number data and all those things this one they have forwarded ok this one is lost ok. Then once again the user how to retransmit then once again they have to send a fix the timer ok that is time out. Then after fixing this one we have to consider this one only we would not consider the RTT that is round trip time ok. Once again he can send the segment to the user then based on this one we have to calculate the delay time RTOs in this one ok. And then in the exponential backup algorithm we have to use whenever you are using it to it means it will be doubled it means here is also they have start the timer they have send the request and then they can get the acknowledgement this is about the cons algorithm concept and this is the exponential backup algorithm by using those two algorithms here it can clear about how we have to send the data and issue the data ok. This is the example of cons algorithm exponential backup algorithm ok. Now persistent timer to deal with the 0 window size advertisement TCP needs another timer ok. If the receiver TCP announce a window size of 0 the sending TCP stops transmitting segments until receiving TCP sends an acknowledgement ok. This acknowledgement segment can be lost then the receiver TCP thinks that it has done its job and waits for the sending TCP to send more segments in this one there is no transmission timer for the segment containing only an acknowledgement and both TCP might continue to wait for each other forever as like deadlock ok. In this one the persistent timer we have to if the user have to deal with the non-zero window then we have to go to the persistent timer ok. To correct this deadlock TCP uses persistent timer for each connection ok when we have to use the persistent concept it means to correct this deadlock situation then we have to go to the persistent timer ok. When the sending TCP receives an acknowledgement with the window size of 0 it starts persistent timer ok. When the persistent timer goes off then the sending TCP sends a spatial segment a spatial segment called probe ok. In this one the value of the persistent timer is set to the value of the retransmission time. If the response is not issued from the receiver then another probe segment is sent and the value of the persistent timer is double and rationed. This one is a persistent timer we have to ok. Next it can contains one question think and write it can contains one question that is the least some applications of constant exponential back of algorithm. Now pass the video and answer the above question. Now answer for the above question is cons algorithm it can especially we have to use this algorithm in a TCP timers to find out the round trip time that is here the problem of getting accurate estimate of the round trip time the message when using the retransmission or transmission control protocol ok. Then using prior round trip time estimate a TCP computes a time out time retransmits a segment and next exponential back of algorithm it is used to space out repeated retransmission of the same block of a data. Then based previously we have discussed one example based on that only it is clear that is it is used to space out repeated retransmissions of the same block of data ok often to avoid network congestion in this one ok. Now next timer is keep alive ok. In this keep alive if the user is transmitting one data or segment then the connection should be live until to finish the whole communication in this one ok. It is used to it is used in some implementation to prevent a long ideal connection between two PCs or TCP's ok. If the two users are sending the data and receiving the data it means the connection should be remains open to finish till end of the communication to or to send the all the data from both the sides ok. Suppose that client opens a TCP connection to serve a transfer some data and become silent perhaps the client has crash. This case the connection remains open forever to finish reconnection and then we have to resend the data ok. Then how we have to each time the server hears from the client it resets this timer that time out is usually towards ok. This one we have to the server does not hear from the client after towards it sends a probe segment to the server ok. It assumes that the client is down and terminate the connection. It means here these are the whole scenarios it means just if the two users client and server they are sending the data and receiving the data it means the connection should be remains alive or ideal until to finish whole communication ok. Next timer is time and wait timer. In the time and wait timer we have already discussed about this one in the previous slide or now we can go to the this one timer is used during the connection termination. Whenever the user is sending the data in that time they can start the timer then if the user if any one user do not want to send the data and receive the data it means in that time they can go to the time and wait concept or time and wait it means they have to wait until to finish all the data transfer then after that they can go to the termination phase. It means termination phase it means they can remove the disconnect the connection. The timer starts after sending the last ACK for second FIN and closing the connection ok. It means whenever the user can start timer when they will it means after sending the last acknowledgement from the connection termination phase of the receiver side. The receiver can if the receiver do not want to communicate or they do not want to send the data to the receiver side means in that time they can go to the command that is FIN. FIN command is used to terminate the connection in the receiver side ok. If the client have get the FIN command from the server then automatically the communication will be disconnected. After TCP is closed it is possible for datagrams that are still making their way through the network to attempt to access the closed port. These are the reference I have used to prepare the above PPT. Thank you.