Chapter 5 Transport Layer: UDP, TCP Professor Rick Han University of Colorado at Boulder

Slides:



Advertisements
Similar presentations
Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
Advertisements

TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
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)
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.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
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.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
TELE202 Lecture 14 TCP/UDP (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (1) »Source: chapter 17 ¥This Lecture »TCP/UDP (2) »Source: chapter.
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 3: Transport Layer
Chapter 4 IP Multicast Professor Rick Han University of Colorado at Boulder
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Gursharan Singh Tatla Transport Layer 16-May
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 Transport Layer Computer Networks. 2 Where are we?
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_a Transport Protocols - UDP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
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.
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.
Transport Layer and UDP Tahir Azim Ref:
University of the Western Cape Chapter 12: The Transport Layer.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
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.
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.
Networking Basics CCNA 1 Chapter 11.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Introduction to TCP/IP networking. TCP/IP protocol family IP : Internet Protocol UDP : User Datagram Protocol TCP : Transmission Control Protocol.
Transport Protocols.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Introduction to TCP/IP networking
5. End-to-end protocols (part 1)
Process-to-Process Delivery, TCP and UDP protocols
PART 5 Transport Layer Computer Networks.
Introduction of Transport Protocols
Process-to-Process Delivery:
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Introduction to Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

Chapter 5 Transport Layer: UDP, TCP Professor Rick Han University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Announcements Netstat portion of Homework #3 on Web, due March 12 (two weeks) Programming Assignment #2 due Friday March 22 by midnight Midterm March 14 Only through Network Layer, Chapter 4 OH changed today – 4:45-5:45 due to BACTAC talk Next, transport layer

Prof. Rick Han, University of Colorado at Boulder Recap of Previous Lecture IP Multicast 1->N Link-State Multicast: MOSPF Piggyback off of Dijkstra’s shortest path tree Distance-Vector Multicast: DVMRP Reverse-path flooding to all nodes Reverse-path pruning Protocol Independent Multicast: PIM For sparse wide-area trees Unicast to Rendezvous Point, RP then multicasts Tree built by explicit joins Internet Group Management Protocol (IGMP) How leaf nodes join a multicast group

Prof. Rick Han, University of Colorado at Boulder The Layered Network Stack Physical Layer Application Layer Transport Layer (TCP/UDP) Network Layer (IP) Data Link Layer Internet Stack Physical Layer Session Layer Transport Layer Network Layer Data Link Layer OSI Stack Presentation Layer Application Layer

Prof. Rick Han, University of Colorado at Boulder UDP: Unreliable Transport Protocols IP Provides Best-Effort unreliable datagram delivery User Datagram Protocol (UDP) provides best- effort unreliable datagram delivery Packets may be lost Due to congestion In routers At receiver and/or sender Due to fading Packets may be reordered Packets may be duplicated

Prof. Rick Han, University of Colorado at Boulder UDP (2) UDP “Features” Transport protocol above IP simply passes IP through to the upper (application) layers UDP “Features”: Gives app’s the option to send packets unreliably Useful for multicast app’s Low delay transmission for interactive text/audio/video Minimal connection setup time Minimal connection state: “connectionless” No congestion control – blast away Build own application-level protocol on top of UDP

Prof. Rick Han, University of Colorado at Boulder UDP (3) UDP Header: Only 8 bytes! (vs. IP 20 bytes header) Source port for UDP sending process Dest port for UDP receiving process Length in bytes of UDP header + payload Checksum over UDP header + payload Source Port #Dest. Port # UDP lengthChecksum 1632 UDP payload data UDP payload IP hdr UDP hdr

Prof. Rick Han, University of Colorado at Boulder UDP (4) UDP Checksum calculation UDP creates a “pseudo-header” containing IP header info Doublechecks that the packet has the correct IP address and UDP port # Source Port #Dest. Port # UDP lengthChecksum 1632 UDP payload data 0 ProtocolUDP length 32-bit IP destination address 32-bit IP source address Discarded if checksum fails Pseudo-Header UDP Header

Prof. Rick Han, University of Colorado at Boulder UDP Multiplexing/Demultiplexing IP Host 1 IP Host 2 Eth. MAC Phys. Eth MAC Phys. IP layer inspects Protocol field = UDP Sends to buffer of waiting UDP process with matching port # UDP Port 5100 UDP Port 5200 UDP Port 6001 UDP Port 433

Prof. Rick Han, University of Colorado at Boulder TCP: Transmission Control Protocol – Reliable Delivery TCP provides: Reliable delivery of packets, AND Stream or in-order delivery Also, full-duplex service Why TCP, when we can build reliable protocols on top of UDP? Many applications require reliable in-order delivery of packets Web pages, , file transfer, … Why should each application reinvent the wheel? Can concentrate expert knowledge into building one reliable protocol provided to every application

Prof. Rick Han, University of Colorado at Boulder TCP (2) TCP is a true transport protocol, above IP TCP “Features”: Flow control Congestion control Connection setup Connection state machine Reliability, at the cost of some delay Achieves reliability by: Retransmission of a segment after a timeout or duplicate ACK Sliding window with sequence #’s TCP payload IP hdr TCP hdr

Prof. Rick Han, University of Colorado at Boulder TCP (3) TCP Header: 20 bytes Source port for TCP sending process Dest port for TCP receiving process 32-bit Sequence # (host is sender) 32-bit ACK # (host is receiver ACK’ing data sent by other endpoint) Source Port #Dest. Port # 32-bit Sequence # 32-bit Acknowledgement # Checksum Window Size Urgent Pointer Flags 1632

Prof. Rick Han, University of Colorado at Boulder TCP (3) TCP Header: Flags: SYN: synchronize sequence #’s to initiate connection FIN: sender is finished sending data RST: reset the connection, More… Source Port #Dest. Port # 32-bit Sequence # 32-bit Acknowledgement # Checksum Window Size Urgent Pointer Flags 1632

Prof. Rick Han, University of Colorado at Boulder TCP (4) TCP Header: Flow control window size: Receiver advertises how many bytes it is willing to accept into its buffer Checksum: computed over TCP header + payload Similar to UDP, prepends an IP Pseudo-Header Urgent Pointer points to where there is emergency data in payload Source Port #Dest. Port # 32-bit Sequence # 32-bit Acknowledgement # Checksum Window Size Urgent Pointer Flags 1632

Prof. Rick Han, University of Colorado at Boulder TCP (5) TCP Header: Variable-sized (not just 20 bytes), can have Options after the Urgent Pointer field Signalled in Flags field Most common option: Maximum Segment Size (MSS) exchanged during setup Source Port #Dest. Port # 32-bit Sequence # 32-bit Acknowledgement # Checksum Window Size Urgent Pointer Flags 1632

Prof. Rick Han, University of Colorado at Boulder High-Level TCP Characteristics Protocol implemented entirely at the ends –Fate sharing Protocol has evolved over time and will continue to do so –Nearly impossible to change the header –Uses options to add information to the header –Change processing at endpoints –Backward compatibility is what makes it TCP

Prof. Rick Han, University of Colorado at Boulder Connection Setup A and B must agree on initial sequence number selection Use 3-way handshake AB SYN + Seq A SYN+ACK-A + Seq B ACK-B

Prof. Rick Han, University of Colorado at Boulder Connection Setup (2) Why a three-way handshake? –Three-way handshake is necessary and sufficient for unambiguous setup/teardown even under conditions of Loss Duplication Delay

Prof. Rick Han, University of Colorado at Boulder Two-Way Handshake Handshake pictures courtesy of UMass Amherst

Prof. Rick Han, University of Colorado at Boulder Two-Way Handshake: Old Accepts

Prof. Rick Han, University of Colorado at Boulder Two-Way Handshake: Duplicate Requests

Prof. Rick Han, University of Colorado at Boulder Two-Way Handshake: Failure

Prof. Rick Han, University of Colorado at Boulder Two-Way Handshake W/ Timers

Prof. Rick Han, University of Colorado at Boulder 3-way Handshake: Unique ID’s Both sender and receiver choose unique ID’s to label their (x,y) connection x chosen by Sender, y by receiver Prevents Failure scenario in two-way handshakes w/o timers Client: (active) Server (passive)