Introduction of Transport Protocols

Slides:



Advertisements
Similar presentations
TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from Computer Networks A Systems Approach, Fourth Ed.,Peterson and Davie,
Advertisements

Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Transmission Control Protocol (TCP)
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
Transport Layer 3-1 Transport services and protocols  provide logical communication between app processes running on different hosts  transport protocols.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
ACN: TCP Sliding Windows1 TCP Sliding Windows, with Flow Control, and Congestion Control Based on Peterson and Davie Textbook.
Advanced Computer Networks : TCP Sliding Windows1 TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from “Computer Networks.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Networking. Protocol Stack Generally speaking, sending an message is equivalent to copying a file from sender to receiver.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
1 Transport Layer Computer Networks. 2 Where are we?
Principles of Reliable Data Transfer. Reliable Delivery Making sure that the packets sent by the sender are correctly and reliably received by the receiver.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Networked & Distributed Systems TCP/IP Transport Layer Protocols UDP and TCP University of Glamorgan.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Computer Networking Lecture 16 – Transport Protocols Dejian Ye, Liu Xin.
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
Transport Layer 3-1 Internet Transport Layer Lecture 8 Dr. Najla Al-Nabhan.
Prof. Younghee Lee 1 1 Computer Networks u Lecture 5: Transport services and protocols Prof. Younghee Lee * Some part of this teaching materials are prepared.
Transport Protocols.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer: Sliding Window Reliability
1 Direct Link Networks: Reliable Transmission Sections 2.5.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
Computer Networking Lecture 16 – Reliable Transport.
Ch 3. Transport Layer Myungchul Kim
Reliable Transmission
Chapter 3 outline 3.1 Transport-layer services
Introduction to Networks
5. End-to-end protocols (part 1)
Transmission Control Protocol (TCP)
Transport Layer.
Process-to-Process Delivery, TCP and UDP protocols
PART 5 Transport Layer Computer Networks.
Magda El Zarki Professor, ICS UC, Irvine
ECE 4450:427/527 - Computer Networks Spring 2017
TCP and Congestion Control (1)
Transport Layer Unit 5.
Transport Layer Our goals:
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Process-to-Process Delivery:
Transport Layer Our goals:
TCP Sliding Windows, Flow Control, and Congestion Control
Advanced Computer Networks
Lecture 16 – Transport Protocols
Advanced Computer Networks
Chapter 5 Transport Layer Introduction
Getting Connected (Chapter 2 Part 3)
The Transport Layer Reliability
Transport Protocols: TCP Segments, Flow control and Connection Setup
Chapter 5 Transport Layer Introduction
Transport Layer Outline Intro to transport UDP
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
TCP Sliding Windows, Flow Control, and Congestion Control
Computer Networks Protocols
Error detection: Outline
Transport Layer 9/22/2019.
TCP Sliding Windows, Flow Control, and Congestion Control
Presentation transcript:

Introduction of Transport Protocols 15-441 Computer Networking Introduction of Transport Protocols

Transport Protocols Network provides best-effort delivery Transport at end-systems implement many functions 7 7 6 6 5 5 Transport Transport IP IP IP Datalink 2 2 Datalink Physical 1 1 Physical router

Minimum Transport Protocol Function Multiplexing/de-multiplexing for multiple applications How does the protocol stack know what application should receive a packet? Why not using process ID?

Multiplexing using Ports Transport layer uses the port in the transport header to identify the application socket. (Destination IP, destination port) identifies the destination Port numbers 0-1023 are well-known port numbers In UDP packets delivered at a socket can come from multiple sources (connectionless). Why do we need a source port number? Needed to return a packet! Flip source and destination (IP, port) pairs

User Datagram Protocol (UDP) Source Port Dest. Port Length D. Checksum Still connectionless datagram Multiplexing/demultiplexing port numbers = connection/application endpoint End-to-end reliability through optional end-to-end checksum. protects against data corruption errors between source and destination (links, switches/routers, bus) does not protect against packet loss, duplication or reordering checksum is very simple so it can be implemented efficiently in software

Using UDP Examples: Use the port addressing provided by UDP remote procedure calls multimedia distributed computing communication libraries Use the port addressing provided by UDP implement their own reliability, flow control, ordering, congestion control

More Transport Protocol Functions Multiplexing/de-multiplexing for multiple applications Error control Hide unreliability of the network layer from applications Many types of errors: corruption, loss, duplication, reordering. End-to-end flow control Avoid flooding the receiver Congestion control Avoid flooding the network Connection management Logical end-to-end connection Connection state to optimize performance

Problems to Be Solved by Error Control At Transport Layer Best effort network layer Packets can get corrupted Packets can get lost Packets can get re-ordered

Mechanisms used For Error Control Packets can get corrupted CRC or Checksum to detect, retransmission to recover Error correction code to recover Packets can get lost Sequence number to detect Acknowledgement + Timeout to detect, retransmission to recover Packets can get re-ordered Sequence number to detect, receiver buffer to re-order

Sliding Window Protocol: Sender Each packet has a sequence number Assume infinite sequence numbers for simplicity Sender maintains a window of sequence numbers SWS (sender window size) – maximum number of packets that can be sent without receiving an ACK LAR (last ACK received) LFS (last frame sent) Acknowledged packets Packets not acknowledged yet LAR LFS seq. numbers

Example Assume SWS = 3 Sender Receiver 1 frame 1 frame 2 frame 3 ACK 1 4 5 1 2 3 1 2 3 4 1 frame 4 Note: usually ACK contains the sequence number of the first packet in sequence expected by receiver

Sliding Window Protocol: Receiver Receiver maintains a window of sequence numbers RWS (receiver window size) – maximum number of out-of-sequence packets that can received LFR (last frame received) – last frame received in sequence LAF (last acceptable frame) LAF – LFR <= RWS

Sliding Window Protocol: Receiver Let seqNum be the sequence number of arriving packet If (seqNum <= LFR) or (seqNum >= LAF) Discard packet Else Accept packet ACK largest sequence number seqNumToAck, such that all packets with sequence numbers <= seqNumToAck were received Packets in sequence Packets out-of-sequence LFR LAF seq. numbers

Sender/Receiver State Max ACK received Next seqnum Next expected Max acceptable … … … … Sender window Receiver window Sent & Acked Sent Not Acked Received & Acked Acceptable Packet OK to Send Not Usable Not Usable

Lecture 16: Transport Protocols Sequence Numbers How large do sequence numbers need to be? Must be able to detect wrap-around Depends on sender/receiver window size E.g. Max seq = 7, send win=recv win=7 If pkts 0..6 are sent succesfully and all acks lost Receiver expects 7,0..5, sender retransmits old 0..6!!! Max sequence must be  send window + recv window Xxx picture 10-24-2006 Lecture 16: Transport Protocols

Cumulative ACK + Go-Back-N Retransmission On reception of new ACK (i.e. ACK for something that was not acked earlier) Increase sequence of max ACK received Send next packet On reception of new in-order data packet (next expected) Hand packet to application Send cumulative ACK – acknowledges reception of all packets up to sequence number Increase sequence of max acceptable packet 10-24-2006 Lecture 16: Transport Protocols

Lecture 16: Transport Protocols Loss Recovery On reception of out-of-order packet Send nothing (wait for source to timeout) Cumulative ACK (helps source identify loss) Timeout (Go-Back-N recovery) Set timer upon transmission of packet Retransmit all unacknowledged packets Performance during loss recovery No longer have an entire window in transit Can have much more clever loss recovery 10-24-2006 Lecture 16: Transport Protocols

Lecture 16: Transport Protocols Go-Back-N in Action 10-24-2006 Lecture 16: Transport Protocols

Selective Ack + Selective Repeat Receiver individually acknowledges all correctly received pkts Buffers packets, as needed, for eventual in-order delivery to upper layer Sender only resends packets for which ACK not received Sender timer for each unACKed packet Sender window N consecutive seq #’s Again limits seq #s of sent, unACKed packets 10-24-2006 Lecture 16: Transport Protocols

Selective Repeat: Sender, Receiver Windows 10-24-2006 Lecture 16: Transport Protocols

Summary of ARQ Protocols Mechanisms: Sequence number Timeout Acknowledgement Sender window: fill the pipe Receiver window: handle out-of-order delivery 10-24-2006 Lecture 16: Transport Protocols

Many Nuances What type of acknowledgements? Selective acknowledgement Cumulative acknowledgement Negative acknowledgement How big should be the timeout value, SWS, RWS, sequence number field? Reliability mechanism used to implement other functions: flow control, congestion control Function overloading introduces ambiguity and complexity

Transmission Control Protocol (TCP) The most utilized transport protocol Provides a bidirectional reliable byte stream service Made specific design decisions that have tradeoffs Ports for multiplexing and-demultiplexing Error control Each byte (not a packet) has a sequence number 32 bits sequence number space Cumulative ack + Go-Back-N Flow control Receiver gives send a window size to limit range of bytes that sender can send 16 bits window size Congestion control (next lecture) What is the key difference between this and flow control? Why is it more difficult to implement congestion control than flow control? Connection management (next lecture)

Sequence Number Space Each byte in byte stream is numbered. 32 bit value Wraps around Initial values selected at start up time TCP breaks up the byte stream in packets (“segments”) Packet size is limited to the Maximum Segment Size Each segment has a sequence number. Indicates where it fits in the byte stream 13450 14950 16050 17550 segment 8 segment 9 segment 10

Bidirectional Communication Send bytes 1000:2000 Ack bytes 1000:2000 Send bytes 40000:42000 Ack bytes 40000:42000 Each Side of Connection can Send and Receive What this Means Maintain different sequence numbers for each direction Single segment can contain new data for one direction, plus acknowledgement for other But some contain only data & others only acknowledgement

Window Flow Control: Send Side Packet Sent Packet Received Source Port Dest. Port Source Port Dest. Port Sequence Number Sequence Number Acknowledgment Acknowledgment HL/Flags Window HL/Flags Window D. Checksum Urgent Pointer D. Checksum Urgent Pointer Options.. Options.. App write acknowledged sent to be sent outside window

TCP Flow Control Sliding window protocol For window size n, can send up to n bytes without receiving an acknowledgement When the data are acknowledged then the window slides forward Each packet advertises a window size Indicates number of bytes the sender is prepared to receive Original TCP always sent entire window Congestion control now limits this

Window Flow Control: Send Side Sent but not acked Not yet sent Sent and acked Must retain for possible retransmission Next to be sent

Window Flow Control: Receive Side Receive buffer Acked but not delivered to user Not yet acked window

Maximum Window Size Mechanism for receiver to exert flow control Prevent sender from overwhelming receiver’s buffering & processing capacity Max. transmission rate = window size / round trip time Mechanism to Guarantee Receive Buffer Does Not Overflow Receive buffer Acked but not delivered to user Not yet acked window