TCP & UDP - Protocol Details Yen-Cheng Chen

Slides:



Advertisements
Similar presentations
TCP/IP Christopher Zacky. lolwut Decimal Numbers.
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)
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 point-to-point:
1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A note on the use.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Configuring a Router with RIP Basic Configuration and Show Commands.
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.
Networks I Transmission Control Protocol Instituto Tecnológico y de Estudios Superiores de Monterrey Campus Estado de México Prof. MSc. Ivan A. Escobar.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
8. Transport Protocol and UDP 8.1 Transport protocol : End-to-end protocol –IP: Host to host packet delivery –Transport: Process to process communication.
Instructor: Sam Nanavaty TCP/IP protocol. Instructor: Sam Nanavaty Version – Allows for the evolution of the protocol IHL (Internet header length) – Length.
10. UDP/TCP WWW page: Text book: Mastering Networks (Chapter 10) Network IP protocol is routes the data.
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.
6-May-154/598N: Computer Networks End-to-End Protocols Underlying best-effort network –drop messages –re-orders messages –delivers duplicate copies of.
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
1 Transport Control Protocol. 2 Header Identifies the port number of a source application program. Used by the receiver to reply. (16-bit). Identifies.
CSCI-1680 Transport Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
1 The TCP Protocol Connection-oriented, point-to-point protocol: –Connection establishment and teardown phases –‘Phone-like’ circuit abstraction (application-layer.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
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 Problems with network layer services
CSE 461: Transport Layer Connections. Naming Processes/Services  Process here is an abstract term for your Web browser (HTTP), servers (SMTP),
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
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.
1 ELEN 602 Lecture 15 More on IP TCP. 2 byte stream Send buffer segments Receive buffer byte stream Application ACKs Transmitter Receiver TCP Streams.
Transport Layer TCP and UDP IS250 Spring 2010
Gursharan Singh Tatla Transport Layer 16-May
CSCI-1680 Transport Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transmission Control Protocol
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
1 15. Transport Protocols. Prof. Sang-Jo Yoo 2 Contents  Transport protocol  Transport Service  Protocol for reliable network service  Protocol for.
Slide #1 CIT 380: Securing Computer Systems TCP/IP.
UDP and TCP Basics Rocky K. C. Chang 18 October 2010.
7: TCP Last Modified: 4/26/2017 1:52:15 PM 3: Transport Layer.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
CIS679: TCP and Multimedia r Review of last lecture r TCP and Multimedia.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Advanced Computer Networks
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
5. End-to-end protocols (part 1)
TCP.
Process-to-Process Delivery
TCP.
© 2003, Cisco Systems, Inc. All rights reserved.
TCP.
TCP - Part I Karim El Defrawy
CSCI-1680 Transport Layer I
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
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
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer 9/22/2019.
Presentation transcript:

TCP & UDP - Protocol Details Yen-Cheng Chen

Port Number Divided into three ranges: Well Known Ports: 0 ~ 1023 Registered Ports: 1024 ~ Dynamic and/or Private Ports: ~

Source PortDestination Port LengthChecksum Data 16 bits UDP Header RFC 768

Checksum pseudo header UDP headerdata Checksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the UDP header, and the data.

Source Address Destination Address bits Protocol (17) UDP Length Pseudo Header

Protocol Number

How to Ensure the Delivery of UDP Messages Time Out Retry

TCP Segment (TCP PDU) Source port (16 bits) Destination port (16 bits) Sequence number (32 bits) Acknowledgment number (32 bits) Data Offset (4 bits) Reserved (6 bits) Flags (6 bits) : URG, ACK, PSH, RST, SYN, FIN Window (16 bits) Checksum (16 bits) Urgent Pointer (16 bits) Options (variable) RFC 793

TCP Header

Sequence / Acknowledgment Number Sequence Number: 32 bits The sequence number of the first data octet in this segment (except when SYN is present). If SYN is present the sequence number is the initial sequence number (ISN) and the first data octet is ISN+1. Acknowledgment Number: 32 bits If the ACK control bit is set this field contains the value of the next sequence number the sender of the segment is expecting to receive. Once a connection is established this is always sent.

(Seq:X, Ack:Y, Data: a bytes) (Seq:Y, Ack:X+a) (Seq:X+a, Ack:Y, Data: b bytes) (Seq:Y, Ack:X+a+b) Sender Receiver Unidirectional Transmission

(Seq:20000, Ack:100, Data: 1000 bytes) (Seq:100, Ack:21000) (Seq:21000, Ack:100, Data: 750 bytes) (Seq:100, Ack:21750) Sender Receiver Example - Unidirectional

(Seq:X, Ack:Y, Data: a bytes) (Seq:Y, Ack:X+a, Data: m bytes) (Seq:X+a, Ack:Y+m, Data: b bytes) (Seq:Y+m, Ack:X+a+b, Data: n bytes) Sender Receiver Bi-directional Transmission (Seq:X+a+b, Ack:Y+m+n, Data: c bytes)

(Seq:25000, Ack:1000, Data:800 bytes) (Seq:1000, Ack:25800, Data:500 bytes) (Seq:25800, Ack:1500, Data: 1000 bytes) (Seq:1500, Ack:26800, Data: 700 bytes) Sender Receiver (Seq:26800, Ack:2200, Data: 600 bytes) Example – Bi-directional

Window (AdvertisedWindow) Window: 16 bits The number of data octets beginning with the one indicated in the acknowledgment field which the sender of this segment is willing to accept. AdvertisedWindow The sender is limited to having no more than a value of AdvertisedWindow bytes of unacknowledged data in any given time. Sliding Window

Flow/Congestion Control Slow Start Fast Retransmit – Duplicate ACK Fast Recovery Implementation Tahoe, Reno, Vegas

SourceDestination … Slow Start

Fast Retransmit Packet 1 Packet 2 Packet 3 Packet 4 Packet 5 Packet 6 Retransmit packet 3 ACK 1 ACK 2 ACK 6 ACK 2 SenderReceiver

Data Offset (Header Length) Data Offset: 4 bits 32 bit The number of 32 bit words in the TCP Header. This indicates where the data begins. The TCP header (even one including options) is an integral number of 32 bits long.

Flags Control Bits: 6 bits (from left to right): URG: Urgent Pointer field significant ACK: Acknowledgment field significant PSH: Push Function RST: Reset the connection SYN: Synchronize sequence numbers FIN: No more data from sender

Urgent Pointer Urgent Pointer: 16 bits This field communicates the current value of the urgent pointer as a positive offset from the sequence number in this segment. The urgent pointer points to the sequence number of the octet following the urgent data. This field is only be interpreted in segments with the URG control bit set.

Options / Paddings Options Maximum Segment Size Padding to ensure that the TCP header ends and data begins on a 32 bit boundary.

Connection Progresses 11 States: LISTEN, SYN-SENT, SYN-RECEIVED, ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK, TIME-WAIT, and CLOSED.

CLOSED LISTEN SYN_RCVDSYN_SENT ESTABLISHED CLOSE_WAIT LAST_ACKCLOSING TIME_WAIT FIN_WAIT_2 FIN_WAIT_1 Passive open Close Send/SYN SYN/SYN + ACK SYN + ACK/ACK SYN/SYN + ACK ACK Close/FIN FIN/ACKClose/FIN FIN/ACK ACK + FIN/ACK Timeout after two segment lifetimes FIN/ACK ACK ACK ACK Close/FIN Close CLOSED Active open /SYN

TCP Connection States (1) LISTEN - waiting for a connection request SYN-SENT - waiting for a matching connection request after having sent a connection request. SYN-RECEIVED - waiting for a confirming connection request acknowledgment after having both received and sent a connection request. ESTABLISHED - an open connection, data received can be delivered to the user. The normal state for the data transfer phase of the connection.

TCP Connection States (2) FIN-WAIT-1 - waiting for a connection termination request from the remote TCP, or an acknowledgment of the connection termination request previously sent. FIN-WAIT-2 - waiting for a connection termination request from the remote TCP. CLOSE-WAIT - waiting for a connection termination request from the local user. CLOSING - represents waiting for a connection termination request acknowledgment from the remote TCP.

TCP Connection States (3) LAST-ACK - waiting for an acknowledgment of the connection termination request previously sent to the remote TCP (which includes an acknowledgment of its connection termination request). TIME-WAIT - waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request. CLOSED - no connection state at all.

Basic 3-Way Handshake for Connection Synchronization (Seq:X, Syn.) (Seq:Y, Ack:X+1, Ack.,Syn.) (Seq:X+1, Ack:Y+1, Ack.) Sender Receiver Data Transmission

Example - Connection Synchronization

Closing a Connection (Seq:X, Ack:Y. Ack.,Fin.) (Seq:Y, Ack:X+1, Ack..) Requester Responder (Seq:Y, Ack:X+1, Ack.,Fin.) (Seq:X+1, Ack:Y+1. Ack.)

Example – Closing a Connection MSL: Maximum Segment Lifetime

TCP Pseudo Header