1

When I study the TCP protocol life cycle,

There are 3 stages:

  • Establish Connection
  • Data Transmission
  • Connection Removal

TCP have 6 Flag types: SYN, ACK, PSH, FIN, RST, URG.

TCP has 4 Timer:

  • Retransmission Timer
  • Persistent Timer
  • Keepalive Timer
  • Time_Wait Timer

  1. Conventional TCP life cycle there are only SYN, ACK, FIN 3 flags take participation, right?

  2. In the 6 flogs, which of them use a timer, and what timer? I know SYN, FIN will use, ACK don't. how about PSH, RST, URG?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Dec 16 '20 at 23:11
0

I do not think it is possible to associate timers with flags. Timers are associated with sending/receiving segments actions, not flags, used in them.

Here is a summary. A more complete summary of timers is available here.

Retransmission Timer

re-transmission timer is associated with a segment in the peer's sender buffer (each segment has its own timer). Once the segment is sent, the timer is started. If the timer expires before ACK is received, segment is retransmitted. No special flags are used.

Persistent Timer

persistent timer is used for so called "zero-window probes". If the receiver has full receive buffer, it sends back a packet with its window set to zero. This means that the sender cannot send any future packets.

In this case, sender will periodically send empty segments to the receiver (actually the packet has one byte in it, but it is expected to be ignored). The goal is that the receiver sends back its window and the sender learns whether the window is still zero. Note, that usually sender will learn of the window size from ACKs for other packets. This is necessary, since ACKs can be lost.

Zero window probes do not use special flags. More on zero windows can be found here

Keepalive Timer

is used to send keep-alives on connections from which no data was received in a while. more on keep-alives can be found here.

Time_Wait Timer

This timer is started when the peer send an ACK for the second FIN during connection termination. The peer is supposed to preserve data for the connection for the value of this timer (~2mins), in case ACK is lost and should be retransmitted.

When this timer expires, the connection state can be deleted. No packets are sent.

0

PSH, RST, URG don't use timers - that wouldn't make sense.

See this Q&A for what PSH and URG do. RST kills the connection without FINalizing it.

1
  • Which timer will them use?
    – aircraft
    Mar 26 '20 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.