Transport Layer TCP and UDP IS250 Spring 2010

Slides:



Advertisements
Similar presentations
TCP/IP Christopher Zacky. lolwut Decimal Numbers.
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Transportation Layer (2). TCP full duplex data: – bi-directional data flow in same connection – MSS: maximum segment size connection-oriented: – handshaking.
Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
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)
Intermediate TCP/IP TCP Operation.
Transportation Layer. Very similar to the data link layer. – two hosts connected by a link or two hosts connected by a network differences: – When two.
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
Introduction1-1 message segment datagram frame source application transport network link physical HtHt HnHn HlHl M HtHt HnHn M HtHt M M destination application.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
TCP & UDP - Protocol Details Yen-Cheng Chen
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7: Objectives Part 1
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.
EEC-484/584 Computer Networks Lecture 15 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.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
Networking and Internetworking: Standards and Protocols i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg.
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.
Gursharan Singh Tatla Transport Layer 16-May
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 12 Transmission Control Protocol (TCP) Basics.
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.
1 Transport Layer Computer Networks. 2 Where are we?
1 7-Oct-15 OSI transport layer CCNA Exploration Semester 1 Chapter 4.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State 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.
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
TCP: A Closer Look Transmission Control Protocol.
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.
© Introduction to Internetworking – Alex Kooijman 04/04/2000 Introduction to internetworking Part Two.
More on TCP Acknowledgements Sequence Number Field Initial Sequence Number Acknowledgement Number Field.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
81 Sidevõrgud IRT 0020 loeng okt Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst.
Transport Protocols.
1 Version 3.1 Module 10 Intermediate TCP/IP (Layer 4)
CIS679: TCP and Multimedia r Review of last lecture r TCP and Multimedia.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
1 14-Jun-16 S Ward Abingdon and Witney College CCNA Exploration Semester 1 OSI transport layer CCNA Exploration Semester 1 Chapter 4.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Introduction To TCP/IP Networking Mr. Zeeshan Ali, Asst. Professor
Chapter 9: Transport Layer
Introduction to TCP/IP networking
Instructor Materials Chapter 9: Transport Layer
Introduction to Networks
5. End-to-end protocols (part 1)
Transport Layer.
Process-to-Process Delivery
© 2003, Cisco Systems, Inc. All rights reserved.
PART 5 Transport Layer Computer Networks.
TCP Transport layer Er. Vikram Dhiman LPU.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Process-to-Process Delivery:
CPEG514 Advanced Computer Networkst
Transportation Layer.
Lecture 21 and 22 5/29/2019.
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

Transport Layer TCP and UDP IS250 Spring 2010

John Chuang2 Network Layers  Application (layer 7): specific to application need  Transport (layer 4): end-to-end delivery, congestion and flow control  Network (layer 3): addressing, routing  Data Link (layer 2): framing, error detection  Physical (layer 1): bits (0/1), voltages, frequencies, wires, pins, … IP TCP, UDP HTTP, FTP, NNTP, SMTP, telnet,... coax, twisted pair, fiber, wireless,... Ethernet FDDI, SONET Wi-Fi

John Chuang3 TCP/IP Model Appl Trans port Net work Link Net work Link Net work Link Appl Trans port Net work Link Host AHost BRouter 1Router 2 end-to-end point-to-point end-to-end

John Chuang4 Transport Layer  Functions 1.Addressing (ports) 2.Data integrity (error detection) 3.Reliable data transport 4.Flow control 5.Congestion control  Protocols -Transmission Control Protocol (TCP) -Reliable data transport (1, 2, 3, 4, and 5) -User Datagram Protocol (UDP) -Unreliable data transport (1 and 2 only)

John Chuang5 TCP Segment Format Bit 0Bit 31 Data (variable length) DataHeader Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if any)PAD Reserved (6) TCP Checksum (16)Urgent Pointer (16)  Like the IPv4 header, TCP header is also 20 bytes long without options

John Chuang6 UDP Datagram Format Data UDP Header Source Port Number (16)Destination Port Number (16) UDP Checksum (16)Message Length (16)  UDP is considered light-weight : -low overhead; no connection setup -used for real-time applications (don’t need retransmission)

John Chuang7 TCP Maximum Segment Size  Note that TCP segment header does not include segment size field  Instead, Sequence Number field is used to identify location of segment in the TCP byte stream (more on SEQ later)  Sender constructs segments so that they do not need to be fragmented at the network layer MSS = MTU - IP header length - TCP header length Maximum Segment Size Maximum Transmission Unit 20 bytes without Options

John Chuang8 Transport Layer Functions 1.Addressing (ports) 2.Data integrity (error detection) 3.Reliable data transport 4.Flow control 5.Congestion control

John Chuang9 L4 Addressing  TCP/UDP ports identify processes on a host Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if any)PAD Bit 0Bit 31 Reserved (6) TCP Checksum (16)Urgent Pointer (16) TCP Header UDP Header Source Port Number (16)Destination Port Number (16) UDP Checksum (16)Message Length (16)

John Chuang10 Ports  Multiple processes can run on a single host -all processes share a single IP address -each process talks/listens via a different port ; port ; port ; port ; port ftp client http client ftp server http server Note: IP cannot distinguish ftp packets from http packets (they have the same source and destination IP addresses)

John Chuang11 Ports  The port numbers are divided into three ranges: -Well known ports (0-1023) -Registered ports ( ) -Dynamic and/or private ports (49152 – 65535)  Some “well known ports” -ftp (21); ssh (22); telnet (23); smtp (25); finger (79); http (80) -Assigned by Internet Assigned Numbers Authority (

John Chuang12 Transport Layer Functions 1.Addressing (ports) 2.Data integrity (error detection) 3.Reliable data transport 4.Flow control 5.Congestion control

John Chuang13 Data Integrity  TCP/UDP checksums cover entire segment/datagram Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if any)PAD Bit 0Bit 31 Reserved (6) TCP Checksum (16)Urgent Pointer (16) TCP Header UDP Header Source Port Number (16)Destination Port Number (16) UDP Checksum (16)Message Length (16)

John Chuang14 Transport Layer Functions 1.Addressing (ports) 2.Data integrity (error detection) 3.Reliable data transport 4.Flow control 5.Congestion control

John Chuang15 Reliable Data Transport  Connection (or Session) Management -Agreement on start and end of connection/session  Error Control -Data delivered without deletions, insertions, duplications, reordering

John Chuang16 Connection Management  TCP establishes a session with ordered and bi-directional reliable delivery of bytes -Establishment: -Informs receiving port of connection -Initializes packet sequence number (to a random number) -Sets congestion and flow control state -Teardown: -By either peer -Frees state and resources

John Chuang17 A TCP Session Process AProcess B SYN 3-Way handshake to establish TCP session time SYN + ACK Conversation ACK Teardown Data + ACK FIN FIN + ACK ACK Data + ACK Data Can be merged into one

John Chuang18 TCP Header Flags  Flags: URG, ACK, PSH, RST, SYN, FIN Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if any)PAD Bit 0Bit 31 Reserved (6) TCP Checksum (16)Urgent Pointer (16)

John Chuang19 Error Control  Original data stream: “I am here”  Can data be deleted? “I here”  Can data be reordered? “here I am”  Can data be duplicated? “I am am here”  Can non-data be inserted? “I am not here”

John Chuang20 Reliable Delivery  Positive Acknowledgment with retransmission  Sequence and acknowledgement numbers Options (if any) Padding Data TCP Header Source Port Number (16)Destination Port Number (16) Sequence Number (32) Acknowledgement Number (32) Hdr Len (4) Flags (6)Window Size (16)Reserved (6) TCP Checksum (16)Urgent Pointer (16)

John Chuang21 Reliable Delivery  Each packet has a sequence number (SEQ) -SEQ represents byte offset with respect to initial SEQ -Duplicate packets can be detected and discarded -Out of order packets can be re-ordered  Each packet carries acknowledgment of received packet -ACK = sequence number of next byte expected by the receiver  Lost packet can be detected by missing ACK  Lost packet can be retransmitted after a timeout period

John Chuang22 A TCP Session Process AProcess B SYN (Seq=x) 3-Way handshake to establish TCP session time SYN (Seq=y; Ack=x+1) Conversation Data (Seq=x+1; Ack=y+1) Teardown Data (Seq=y+1; Ack=x+2) FIN (Seq=x+3; Ack=y+3) FIN (Seq=y+3; Ack=x+4) ACK (Ack=y+4) Data (Seq=y+2; Ack=x+3) Data (Seq=x+2; Ack=y+2) Notes: Processes pick random initial values for x and y SEQ incremented by one for illustrative purposes only (in practice, SEQ incremented by MSS)

John Chuang23 ACK and Packet Retransmission Process AProcess B time Data (Seq=x+1) Data (Seq=y+1; Ack=x+2) ACK (Ack=x+3) Data (Seq=x+2; Ack=y+2) Timeout Data (Seq=x+2; Ack=y+2) IP loses packet TCP resends packet

John Chuang24 ACK and Packet Retransmission Process AProcess B time Data (Seq=x+1) Data (Ack=x+2) ACK (Ack=x+3) Data (Seq=x+2) Timeout Data (Seq=x+2) IP loses ACK TCP resends packet TCP resends ACK; drops duplicate Data (Ack=x+3)

John Chuang25 Adaptive Retransmission (Timeout)  Round trip time (RTT): elapsed time between sending of a TCP segment and the receipt of the corresponding ACK EstRTT = (  *EstRTT) + ((1-  )*SampleRTT) Timeout =  * EstRTT  In the original spec, suggested values for  and  are 0.9 and 2. In Jacobson/Karels algorithm, timeout is set adaptively to avoid spurious retransmissions