ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 7.1: End-to-end Protocols Dr. Nghi.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 5 End-to-End Protocols Copyright © 2010, Elsevier Inc. All rights.
CCNA – Network Fundamentals
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
Transmission Control Protocol (TCP)
Computer Networks Chapter 5: End-to-End Protocols
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 Chapter 5 End-to-End Protocols Outline 5.1 UDP 5.2 TCP 5.3 Remote Procedure Call.
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 5 End-to-End Protocols Copyright © 2010, Elsevier Inc. All rights.
8. Transport Protocol and UDP 8.1 Transport protocol : End-to-end protocol –IP: Host to host packet delivery –Transport: Process to process communication.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Chapter 7 – Transport Layer Protocols
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Introduction to Transport Layer. Transport Layer: Motivation A B R1 R2 r Recall that NL is responsible for forwarding a packet from one HOST to another.
Transport Layer3-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Lecture 8 Chapter 3 Transport Layer
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Transport Layer TCP and UDP IS250 Spring 2010
Spring 2002CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
1 Chapter 1 OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 12 Omar Meqdadi Department of Computer Science and Software Engineering University.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Part.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Transport Layer1 Ram Dantu (compiled from various text books)
1 Transport Layer Lecture 7 Imran Ahmed University of Management & Technology.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
Lecture91 Administrative Things r Return homework # 1 r Review some problems in homework # 1 r Questions about grading? Yona r WebCT for CSE245 is working!
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Transport Protocols.
Ilam University Dr. Mozafar Bag-Mohammadi 1 Transport Layer.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 End-to-End Protocols UDP TCP –Connection Establishment/Termination –Sliding Window Revisited –Flow Control –Congestion Control –Adaptive Timeout.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Introduction 1-1 source application transport network link physical HtHt HnHn M segment HtHt datagram destination application transport network link physical.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
CSEN 404 Transport Layer I Amr El Mougy Lamia Al Badrawy.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Advanced Computer Networks
Chapter 5 Transport Layer Introduction
Introduction to Networks
5. End-to-end protocols (part 1)
Introduction to Networks
ECE 4450:427/527 - Computer Networks Spring 2017
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Process-to-Process Delivery:
Advanced Computer Networks
Ilam University Dr. Mozafar Bag-Mohammadi
Chapter 5 Transport Layer Introduction
The University of Adelaide, School of Computer Science
Chapter 5 Transport Layer Introduction
Introduction to Computer Networks
Introduction to Computer Networks
Introduction to Computer Networks
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 7.1: End-to-end Protocols Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 1

Discussions Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 2 Up to now, we have learned various technologies to Connect together a collection of computers/nodes The collection ranges from simple Ethernet and wireless networks to much larger scale one, e.g., global scale Host-to-host packet delivery: logical communication between hosts Now, we turn the above host-to-host packet delivery into a process-to-process communication channel Logical communication between application processes running on different hosts – Transport-layer protocols Because it supports communication between application program running in the end nodes, it is also called end-to- end protocols

Transport Layer vs. Network Layer Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 3 Network layer: logical communication between hosts Transport layer: logical communication between processes – relies on, enhances, network layer services Household analogy: 12 kids sending letters to 12 kids processes = kids app messages = letters in envelopes hosts = houses transport protocol = Ann and Bill who demux to in- house siblings network-layer protocol = postal service

Transport Layer Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 4 Ann and Bill do work within respective homes - Protocols live in the end system: move messages from application processes to the network edge Assume Ann and Bill are on vacation, younger Susan and Tom substitute for them: Pick up/deliver mail less frequent, or even lose letters Susan and Tom do not provide the same service!!! From network point of view: multiple transport protocols, each offering a different service to applications.

Transport Layer Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 5 Common properties that a transport protocol can be expected to provide – Guarantees message delivery – Delivers messages in the same order they were sent – Delivers at most one copy of each message – Supports arbitrarily large messages – Supports synchronization between the sender and the receiver – Allows the receiver to apply flow control to the sender – Supports multiple application processes on each host

Internet Transport Protocols Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 6 Simple Demultiplexer (UDP – User Datagram Protocol) – Allow multiple application processes on each host to share the network Reliable, in-order delivery (TCP – Transmission Control Protocol) – Connection set-up – Discarding of corrupted packets – Retransmission of lost packets – Flow control – Congestion control Remote Procedure Call (RPC): Request/reply service Real-time Transport Protocol (RTP): real-time applications

UDP Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 7 Simplest possible protocol: Simple Demultiplexer (UDP) – Allow multiple application processes on each host to share the network – Aside it, no other functionality The only interesting issue: the form of the address used to identify the target process

Addressing Processes: Ports Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 8 Application processes communicate by exchanging messages across the network Web: a client browser process exchanges messages with a web server process. We need something to identify receiving and sending processes: Port numbers A web-server is identified by port 80 A mail server is identified by port 25 Port number is needed, since a host might run many network applications

Port Discovery Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 9 Use well-publicized ports for different services – DNS uses port 53 – uses port 25 – HTTP uses port 80 Alternatively, use one port as a “port-mapper” service – Call 411 to learn the port of any other process – Allows for dynamic allocation of ports to different services – Allows for the assignment of ports to newly created services

UDP Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 10 Processes are identified based on ports 16 bits for each field yields 64K different identifiers combination allows de-multiplexing at receiving host

Multiplexing and Demultiplexing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 11 Host may be running multiple processes at the same time These processes Generate multiple messages for the same host Generate multiple messages for multiple hosts Transport layer multiplexing Multiplex messages from multiple processes Break down messages to segments and pass to network layer Transport layer de-multiplexing Reassemble messages at the receiving host and pass to the communication processes

TCP Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 12 Connection oriented – Explicit set-up and tear-down of TCP session Stream-of-bytes service – Sends and receives a stream of bytes, not messages – Full-duplex Reliable, in-order delivery – Checksums to detect corrupted data – Acknowledgments & retransmissions for reliable delivery – Sequence numbers to detect losses and data reordering Demultiplexing mechanism Flow control – Prevents overflow of the receiver’s buffer: Allow receiver to limit how much data sender can transmit at a given time – End to end issue Congestion control – Prevent too much data from being injected into the network

TCP Duplicate Lower Layer Services? Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 13 How is TCP different? – Runs over a route rather than a single physical link  Needs to establish a connection and negotiate parameters (sliding window size) – Adapts to heterogeneous conditions RTT varies with connected hosts, time of the day etc, unpredictable Flow control on computers with different resources – Reorders and retransmits packets end-to-end Even if packets are in order on one physical link this does not guarantee end-to-end ordering – Provides congestion control No immediate feedback from the link, no knowledge of conditions along the way Congestion control based on feedback

TCP Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 14 Connection oriented – Explicit set-up and tear-down of TCP session Stream-of-bytes service – Sends and receives a stream of bytes, not messages – Full duplex Reliable, in-order delivery – Checksums/CRC to detect corrupted data – Acknowledgments & retransmissions for reliable delivery – Sequence numbers to detect losses and data reordering Demultiplexing mechanism Flow control – Prevents overflow of the receiver’s buffer: Allow receiver to limit how much data sender can transmit at a given time – End to end issue Congestion control – Prevent too much data from being injected into the network

TCP Segment Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 15 TCP is a byte-oriented protocol, which means that the sender writes bytes into a TCP connection and the receiver reads bytes out of the TCP connection. Although “byte stream” describes the service TCP offers to application processes, TCP does not, itself, transmit individual bytes over the Internet.

TCP Segment Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 16 Source: TCP buffers enough bytes from sending process to fill a reasonably sized packet and then sends this packet to destination: segment. Destination: TCP empties the contents of the packet into a receive buffer, and the receiving process reads from this buffer at its leisure.

TCP Segment Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 17 IP packet – No bigger than Maximum Transmission Unit (MTU) – E.g., up to 1500 bytes on an Ethernet TCP packet – IP packet with a TCP header and data inside – TCP header is typically 20 bytes long TCP segment – No more than Maximum Segment Size (MSS) bytes – E.g., up to 1460 consecutive bytes IP Hdr IP Data TCP HdrTCP Data (segment)

TCP Header Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 18 TCP Header Format

TCP Header Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 19 The SrcPort and DstPort fields identify the source and destination ports, respectively. The Acknowledgment, SequenceNum, and AdvertisedWindow fields are all involved in TCP’s sliding window algorithm. Because TCP is a byte-oriented protocol, each byte of data has a sequence number; the SequenceNum field contains the sequence number for the first byte of data carried in that segment. The Acknowledgment and AdvertisedWindow fields carry information about the flow of data going in the other direction. HdrLen: Length of header in 32-bit words, e.g., 5

TCP Header Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 20 The 6-bit Flags field is used to relay control information between TCP peers. The possible flags include SYN, FIN, RESET, PUSH, URG, and ACK. The SYN and FIN flags are used when establishing and terminating a TCP connection, respectively. The ACK flag is set any time the Acknowledgment field is valid, implying that the receiver should pay attention to it.

TCP Header Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 21 The URG flag signifies that this segment contains urgent data. When this flag is set, the UrgPtr field indicates where the nonurgent data contained in this segment begins. The urgent data is contained at the front of the segment body, up to and including a value of UrgPtr bytes into the segment. The PUSH flag signifies that the sender invoked the push operation, which indicates to the receiving side of TCP that it should notify the receiving process of this fact.

TCP Header Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 22 The RESET flag signifies that the receiver has become confused, it received a segment it did not expect to receive— and so wants to abort the connection. Finally, the Checksum field is used in exactly the same way as for UDP—it is computed over the TCP header, the TCP data, and the pseudoheader, which is made up of the source address, destination address, and length fields from the IP header.

Sliding Window Revisited Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 23 TCP’s variant of the sliding window algorithm, which serves several purposes: – (1) it guarantees the reliable delivery of data, – (2) it ensures that data is delivered in order, and – (3) it enforces flow control between the sender and the receiver.

Sliding Window Revisited Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 24 Relationship between TCP send buffer (a) and receive buffer (b). Sending Side – LastByteAcked ≤ LastByteSent – LastByteSent ≤ LastByteWritten Receiving Side – LastByteRead < NextByteExpected – NextByteExpected ≤ LastByteRcvd + 1

TCP: Flow Control Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 25 What is Overflow? Receiver: Set a side a receive buffer for the connection TCP connection receives bytes, places in the buffer Application process will read data from buffer, but not necessarily at the instant data arrives It might be busy with some other task and might not even attempt to read data Therefore, the sender can very easily overflow the receive buffer by sending to much data. Flow-control service is needed.

Flow Control - Receiver Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 26 Receiver advertises window no larger than its buffer size – LastByteRcvd – LastByteRead  MaxRcvBuffer AdvertisedWindow = MaxRcvBuffer – ((NextByteExpected – 1) – LastByteRead)? or AdvertisedWindow = MaxRcvBuffer – ((LastByteRcvd) – LastByteRead)? Example: LastByteRcvd = 5, LastByteRead = 1, NextByteExpected = 6, MaxRcvBuffer = 10 – 5 – 1  10 – AdvertisedWindow = 10 - ((6 – 1) – 1) = 10 – 4 = 6 – Too busy: go to 0

Flow Control - Sender Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 27 Sender adheres to the AdvertisedWindow by – LastByteSent – LastByteAcked  AdvertisedWindow – EffectiveWindow = AdvertisedWindow – (LastByteSent – LastByteAcked) – Example: sent 7, ACK 5, EffectiveWindow = 6 – (7 - 5) = 4

Flow Control Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 28 What if AdvertisedWindow is 0, i.e., when the receive buffer is full? A well-recognized protocol design rule to make the receive side as simple as possible: Smart Sender/Dumb Receiver

Connection Establishment/Termination in TCP (extra slide) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527Computer Networks 29 Timeline for three-way handshake algorithm