Advanced Computer Networks

Slides:



Advertisements
Similar presentations
Courtesy: Nick McKeown, Stanford Umar Kalim, NIIT Robin Kravets, UIUC 1 Transmission Control Protocol (TCP), Tahir Azim.
Advertisements

TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Slide Set 13: TCP. In this set.... TCP Connection Termination TCP State Transition Diagram Flow Control How does TCP control its sliding window ?
CS 6401 Transport Control Protocol Outline TCP objectives revisited TCP basics New algorithms for RTO calculation.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
1 Chapter 5 End-to-End Protocols Outline 5.1 UDP 5.2 TCP 5.3 Remote Procedure Call.
TCP & UDP - Protocol Details Yen-Cheng Chen
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
8. Transport Protocol and UDP 8.1 Transport protocol : End-to-end protocol –IP: Host to host packet delivery –Transport: Process to process communication.
Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
6-May-154/598N: Computer Networks End-to-End Protocols Underlying best-effort network –drop messages –re-orders messages –delivers duplicate copies of.
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 14 – February 23, 2010.
TCP 4/15/2017.
 TCP connection set up  TCP connection tear-down  Sliding window revisited  Triggering transmission.
Fundamentals of Computer Networks ECE 478/578 Lecture #21: TCP Window Mechanism Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
TCP© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
CSE 461: Transport Layer Connections. Naming Processes/Services  Process here is an abstract term for your Web browser (HTTP), servers (SMTP),
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
Spring 2003CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
1 ELEN 602 Lecture 15 More on IP TCP. 2 byte stream Send buffer segments Receive buffer byte stream Application ACKs Transmitter Receiver TCP Streams.
Spring 2002CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
1 Internet Engineering University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Flow Control 0.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
UDP and TCP Basics Rocky K. C. Chang 18 October 2010.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Ilam University Dr. Mozafar Bag-Mohammadi 1 Transport Layer.
1 End-to-End Protocols UDP TCP –Connection Establishment/Termination –Sliding Window Revisited –Flow Control –Congestion Control –Adaptive Timeout.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Transport Control Protocol
5. End-to-end protocols (part 1)
TCP.
Chapter 5 TCP Sliding Window
ECE 4450:427/527 - Computer Networks Spring 2017
TCP - Part I Karim El Defrawy
Internet routing Problem: Route from any node to any other node
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
The University of Adelaide, School of Computer Science
TCP Overview Connection-oriented Byte-stream Full duplex
Transport Control Protocol
CSS432 End-to-End Protocols Textbook Ch5.1 – 5.2
TCP Sliding Windows, Flow Control, and Congestion Control
Reliable Byte-Stream (TCP)
Ilam University Dr. Mozafar Bag-Mohammadi
Transmission Control Protocol (TCP) Part II Neil Tang 11/21/2008
State Transition Diagram
Advanced Computer Networks
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
The University of Adelaide, School of Computer Science
Transport Protocols: TCP Segments, Flow control and Connection Setup
Chapter 5 TCP Control Flow
Introduction to Computer Networks
Introduction to Computer Networks
Chapter 5 TCP Sliding Window
Introduction to Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer 9/22/2019.
Presentation transcript:

Advanced Computer Networks CS716 Advanced Computer Networks By Dr. Amir Qayyum 1

Lecture No. 31

TCP Segment Header 16-bit advertised window 16-bit checksum Space remaining in receive window 16-bit checksum Uses IP checksum algorithm Computed on header, data, and pseudo-header 16-bit urgent data pointer If URG = 1 Index of last byte of urgent data in segment

TCP Segment Format Each connection identified with 4-tuple: (SrcPort,SrcIPAddr,DsrPort,DstIPAddr) Sliding window + flow control ACK, SequenceNum, AdvertisedWindow Flags SYN, FIN, RESET, PUSH, URG, ACK Data (SequenceNum) Sender Receiver Acknowledgment + AdvertisedWindow

TCP Options – Existing & Proposed Negotiate maximum segment size (MSS) Each host suggests a value Minimum of two values is chosen Prevents IP fragmentation over first/last hops

TCP Options – Existing & Proposed Packet timestamp Allows RTT calculation for retransmitted packets Extends sequence number space for identification of stray packets (packets arriving very late) Negotiate advertised window granularity Allows larger windows Good for routes with large bandwidth-delay products

TCP State Description CLOSED Disconnected LISTEN Waiting for incoming connection SYN_RCVD Connection request received SYN_SENT Connection request sent ESTABLISHED Ready for data transport CLOSE_WAIT Connection closed by peer LAST_ACK Closed by peer, closed locally, await ACK FIN_WAIT_1 Connection closed locally FIN_WAIT_2 Closed locally and ACK’d CLOSING Closed by both sides “simultaneously” TIME_WAIT Wait for network to discard related packets

State Transition Diagram CLOSED Active open /SYN Passive open Close Close LISTEN SYN/SYN + ACK Send/ SYN SYN/SYN + ACK SYN_RCVD SYN_SENT ACK SYN + ACK/ACK Close /FIN ESTABLISHED Close /FIN FIN/ACK FIN_WAIT_1 CLOSE_WAIT FIN/ACK ACK Close /FIN ACK + FIN/ACK FIN_WAIT_2 CLOSING LAST_ACK ACK ACK Timeout after two segment lifetimes FIN/ACK TIME_WAIT CLOSED

Think-Pair-Share Describe the path taken Consider the TIME_WAIT state By a server under normal conditions, and By a client under normal conditions, Assuming that the client closes the connection first Consider the TIME_WAIT state What purpose does this state serve ? Prove that at least one side of a connection enters this state before returning to CLOSED Explain how both sides might enter this state

Sliding Window Implementation Sequence numbers are indices into byte stream ACK sequence number is actually next byte expected (as opposed to last byte received) Receiver buffers contain Data ready for delivery to application until requested Out-of-order data out to maximum buffer capacity Sender buffers contain Unacknowledged data Unsent data out to maximum buffer capacity

Sliding Window Sender side application Green: sent and acknowledged Red: sent (or can be sent) but not acknowledged Blue: available but not within send window TCP LastByteAcked LastByteSent LastByteWritten Window time max buffer size

Sliding Window Receiver side application Green: received and ready to be delivered Red: received and buffered Blue: received and discarded TCP NextByteRead NextByteExpected LastByteReceived Advertised window time max buffer size

Sliding Window Math Sending side Receiving side Sending application LastByteWritten TCP LastByteSent LastByteAcked Receiving application LastByteRead LastByteRcvd NextByteExpected Sending side LastByteAcked < = LastByteSent LastByteSent < = LastByteWritten buffer bytes between LastByteAcked and LastByteWritten Receiving side LastByteRead < NextByteExpected NextByteExpected < = LastByteRcvd +1 buffer bytes between NextByteRead and LastByteRcvd

Flow vs Congestion Control Flow control prevents buffer overflow at receiver (only source and destination are relevant) Congestion control addresses bandwidth interactions between distinct packet flows TCP provides both Flow control based on advertised window Congestion control will be discussed later …

TCP Flow Control Issues Problem: slow receiver application Advertised window goes to 0 Sender cannot send more data Non-data packets used to update window Receiver may not spontaneously generate, or update may be lost Solution: smart sender/dumb receiver Sender periodically sends a 1-byte segment, ignoring advertised window of 0 Eventually, window opens Sender learns of opening from next ACK of 1-byte segment