ECE 4450:427/527 - Computer Networks Spring 2017

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.
© 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.
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.
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.
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.
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.
Network LayerII-1 RSC Part III: Transport Layer 1. Basic Concepts Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
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.
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.
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 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.
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.
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 3 Transport Layer
Chapter 5 Transport Layer Introduction
Introduction to Networks
Chapter 3 outline 3.1 Transport-layer services
5. End-to-end protocols (part 1)
06- Transport Layer Transport Layer.
CS 1652 Jack Lange University of Pittsburgh
Introduction to Networks
Transport Layer Our goals:
September 19th, 2013 CS1652 Jack Lange University of Pittsburgh
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Process-to-Process Delivery:
Advanced Computer Networks
CPEG514 Advanced Computer Networkst
Ilam University Dr. Mozafar Bag-Mohammadi
Chapter 5 Transport Layer Introduction
PART 5 Transport Layer.
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
Lecture 21 and 22 5/29/2019.
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Transport Layer Our goals:
Presentation transcript:

ECE 4450:427/527 - Computer Networks Spring 2017 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/527

Discussions 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Transport Layer vs. Network Layer 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 Network layer: logical communication between hosts Transport layer: logical communication between processes relies on, enhances, network layer services Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Transport Layer 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. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Transport Layer 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Internet Transport Protocols 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

UDP 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Addressing Processes: Ports 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Port Discovery Use well-publicized ports for different services DNS uses port 53 Email 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

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

Multiplexing and Demultiplexing 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

UDP Multiplexing/De-Multiplexing Client IP:B P2 client IP: A P1 P3 server IP: C SP: 6428 DP: 9157 SP: 9157 DP: 6428 DP: 5775 SP: 5775 SP provides “return address” Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Multiplexing/De-Multiplexing client IP: A P4 P5 P6 P2 P1 P3 SP: 5775 DP: 80 S-IP: B D-IP:C SP: 9157 SP: 9157 DP: 80 DP: 80 Client IP:B server IP: C S-IP: A S-IP: B D-IP:C D-IP:C 2 clients using the same destination port number (80) to communicate with the same Web server applications. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP : Threaded Web Server 2 clients using the same destination port number (80) to communicate with the same Web server applications. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Duplicate Lower Layer Services? 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Segment 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. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Segment 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. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Segment IP packet No bigger than Maximum Transmission Unit (MTU) IP Data TCP Data (segment) TCP Hdr IP Hdr 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Header TCP Header Format Dr. Nghi Tran (ECE-University of Akron)

TCP Header 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Header 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. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Header 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. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

TCP Header 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. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Sliding Window Revisited 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. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

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

TCP: Flow Control 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. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Flow Control - Receiver 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

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

Flow Control 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

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