1 / 60

Data and Computer Communications

Data and Computer Communications. Chapter 22 – Transport Protocols. Ninth Edition by William Stallings. Transport Protocols.

perdy
Download Presentation

Data and Computer Communications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data and Computer Communications Chapter 22 – Transport Protocols Ninth Edition by William Stallings Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education - Prentice Hall, 2011

  2. Transport Protocols The foregoing observations should make us reconsider the widely held view that birds live only in the present. In fact, birds are aware of more than immediately present stimuli; they remember the past and anticipate the future. —The Minds of Birds, Alexander Skutch

  3. Transport Protocol • sits above a network or internetwork layer and just below application and other upper-layer protocols • provides services to transport service (TS) users • FTP, SMTP, TELNET • end-to-end transport of data that shields the TS user from the details of the underlying communications systems

  4. Connection-Oriented Transport Mechanisms • two basic types of transport service:

  5. Reliable Sequencing Network Service Issues:

  6. Addressing • Transport protocol must be able to derive the following information from the TS user address: • User identification • Transport entity identification • Host address • Network number

  7. Multiplexing multiple users employ the same transport protocol and are distinguished by port numbers (or service access points)

  8. Flow Control • Complex at the transport layer: • considerable delay in the communication of flow control information • amount of the transmission delay may be highly variable, making it difficult to effectively use a timeout mechanism for retransmission of lost data • Reasons for control: • user of the receiving transport entity cannot keep up with the flow • receiving transport entity itself cannot keep up with the flow of segments

  9. Alternatives to Flow Control Requirements

  10. Credit Allocation Mechanism

  11. Sending and Receiving Flow Control Perspectives

  12. Connection Establishment and Termination • serves three main purposes: • allow each end to assure that the other exists • allows exchange or negotiation of optional parameters • triggers allocation of transport entity resources • is by mutual agreement

  13. Simple Connection State Diagram

  14. Connection Establishment Scenarios

  15. Unreliable Network Service • segments are occasionally lost and may arrive out of sequence due to variable transit delays

  16. Issues to Address

  17. Ordered Delivery • with an unreliable network service it is possible that segments may arrive out of order • solution to this problem is to number segments sequentially • TCP uses scheme where each data octet is implicitly numbered

  18. Retransmission Strategy Cont. events necessitating retransmission: sending transport does not know transmission was unsuccessful receiver acknowledges successful receipt by returning a segment containing an acknowledgment number

  19. Retransmission Strategy • no acknowledgment will be issued if a segment does not arrive successfully • resulting in a retransmit • a “timer” needs to be associated with each segment as it is sent • if timer expires before acknowledgment is received, sender must retransmit

  20. Transport Protocol Timers

  21. Duplicate Detection • receiver must be able to recognize duplicates • segment sequence numbers help • complications arise if : • a duplicate is received prior to the close of the connection • sender must not get confused if it receives multiple acknowledgments to the same segment • sequence number space must be long enough • a duplicate is received after the close of the connection

  22. Incorrect Duplicate Detection

  23. Flow Control • future acknowledgments will resynchronize the protocol if an ACK/CREDIT segment is lost • if no new acknowledgments are forthcoming, the sender times out and retransmits a data segment which triggers a new acknowledgment • still possible for deadlock to occur • Receiver B sends (AN = i, W = 0), temporarily closing the window. Subsequently, B sends (AN = i, W = j), but this segment is lost. Sender is awaiting the opportunity to send data and receiver thinks that it has granted that opportunity. SOLUTION : a persist timer (on the receiver side) forcing a duplicate to be sent.

  24. Connection Establishment • must take into account the unreliability of a network service • calls for the exchange of SYNs (two way handshake) • could result in: • duplicate SYNs • duplicate data segments

  25. Two-Way Handshake Problem with Obsolete Data Segments

  26. Obsolete SYN Segments

  27. TCP Entity State Diagram

  28. Examples of Three-Way Handshake

  29. (Connection Termination) • two-way handshake was found to be inadequate for an unreliable network service • out of order segments could cause the FIN segment to arrive before the last data segment • to avoid this problem the next sequence number after the last octet of data can be assigned to FIN • each side must explicitly acknowledge the FIN of the other using an ACK with the sequence number of the FIN to be acknowledged

  30. Failure Recovery Cont… • When the system that the transport entity is running on fails and subsequently restarts, the state information of all active connections is lost • affected connections become half open because the side that did not fail does not realize the problem • still active side of a half-open connection can close the connection using a keepalive timer

  31. Failure Recovery • in the event that a transport entity fails and quickly restarts, half-open connections can be terminated more quickly by the the use of the RST segment • failed side returns an RST i to every segment i that it receives • RST i must be checked for validity on the other side • if valid an abnormal termination occurs • there is still the chance that some user data will be lost or duplicated

  32. TCP Services RFC 793 defined in terms of primitives and parameters

  33. TCP Service Request Primitives Passive ->accept() Active -> connect()

  34. TCP Service Response Primitives

  35. TCP Service Parameters

  36. TCP Header Format CWR: congestion window reduced. ECE: ECN-Echo; the CWR and ECE bits, defined in RFC 3168, are used for the explicit congestion notification function URG: urgent pointer field significant. ACK: acknowledgment field significant. PSH: push function. RST: reset the connection. SYN: synchronize the sequence numbers. FIN: no more data from sender.

  37. Reminder: “Procotol” field in IP Header The protocolfield in the IP header identifies the nature of the next header (in the data portion of the IP packet) Ref:http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml

  38. TCP Mechanisms can be grouped into:

  39. (TCP Implementation Policy Options) implementation opportunities:

  40. Send Policy • in the absence of both pushed data and a closed transmission window, a sending TCP entity is free to transmit data at its own convenience • Note: there is no API function to force a PUSH • TCP may construct a segment for each batch of data provided or it may wait until a certain amount of data accumulates before constructing and sending a segment • infrequent and large transmissions have low overhead in terms of segment generation and processing • if transmissions are frequent and small, the system is providing quick response

  41. Deliver Policy In the absence of a PUSH, a receiving TCP entity is free to deliver data to the user at its own convenience May deliver as each in-order segment is received, or may buffer data before delivery If deliveries are infrequent an large, the user is not receiving data as promptly as may be desirable If deliveries are frequent and small, there may be unnecessary processing, as well as operating system interrupts

  42. (Accept Policy) if segments arrive out of order the receiving TCP entity has two options:

  43. (Retransmit Policy) Retransmission strategies:

  44. (Acknowledge Policy) Timing of acknowledgment:

  45. TCP Congestion Control credit-based flow control of TCP was designed to avoid buffer overflow at the destination as congestion occurs, transit time increases as congestion becomes severe, network or internet nodes drop packets TCP flow control can be used to recognize the onset of congestion and react by reducing the flow of data

  46. Implementation of TCP Congestion Control Measures Others: http://en.wikipedia.org/wiki/TCP_congestion-avoidance_algorithm

  47. Retransmission Timer Management RTO = retransmission time out Virtually all TCP implementations set the timer to a value greater than the estimated round-trip time (RTT) Methods:

  48. Average round trip time (ARTT) Rewriting using the expression of ARTT(K) leads In the previousequation, all terms have equalweight. If wewish to give more weight to recent round trip times,thenwecanwrite (replacing ARTT by SRTT to distinguishbetween the two) Exponential average Expandingthis relation leads Examplewithα=0.8

  49. Use of Exponential Averaging( “a” is, in fact, α )

  50. Determining the Retransmission Time Out (RTO) 1- Add a constant to SRTT 2- Multiply SRTT by a constant 3- Combine MIN and MAX operators (and lower and upper bounds) and SRTT (multiplied by a constant) 4- Jacobson’s algorithm 5- Karn’s algorithm

More Related