CSE 461: Transport Layer Connections. Naming Processes/Services  Process here is an abstract term for your Web browser (HTTP), servers (SMTP),

Slides:



Advertisements
Similar presentations
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
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.
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
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.
TCP & UDP - Protocol Details Yen-Cheng Chen
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.
8. Transport Protocol and UDP 8.1 Transport protocol : End-to-end protocol –IP: Host to host packet delivery –Transport: Process to process communication.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
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.
EECC694 - Shaaban #1 lec #12 Spring Internet Transport Protocols Transmission Control Protocol (TCP):Transmission Control Protocol (TCP):
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:
TCP© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks.
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
CSE 561 – Internetworking David Wetherall Spring 2000.
Spring 2003CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
1 Ch. 7 : Internet Transport Protocols. Transport Layer Our goals: r understand principles behind transport layer services: m Multiplexing / demultiplexing.
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.
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:
1 Transport Layer Computer Networks. 2 Where are we?
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
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.
1 7-Oct-15 OSI transport layer CCNA Exploration Semester 1 Chapter 4.
Transport Layer: TCP and UDP
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
1 Internet Engineering University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Transport Layer Overview (§ )
TCP/IP Transport and Application (Topic 6)
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
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.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Chapter 2 Applications and Layered Architectures Sockets.
Interfaces and Services Each layer provides a service to the layer above it. A service is a set of primitive operations. Under UNIX, primitives are implemented.
Networking Basics CCNA 1 Chapter 11.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
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.
Ilam University Dr. Mozafar Bag-Mohammadi 1 Transport Layer.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
1 Network Communications A Brief Introduction. 2 Network Communications.
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
5. End-to-end protocols (part 1)
TCP.
TCP - Part I Karim El Defrawy
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
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

CSE 461: Transport Layer Connections

Naming Processes/Services  Process here is an abstract term for your Web browser (HTTP), servers (SMTP), hostname translation (DNS), RealAudio player (RTSP), etc.  How do we identify for remote communication?  Process id or memory address are OS-specific and transient  So TCP and UDP use Ports  16-bit integers representing mailboxes that processes “rent” typically from OS  Identify endpoint uniquely as (IP address, protocol, port) OS converts into process-specific channel, like “socket”

Processes as Endpoints

Picking Port Numbers  We still have the problem of allocating port numbers  What port should a Web server use on host X?  To what port should you send to contact that Web server?  Servers typically bind to “well-known” port numbers  e.g., HTTP 80, SMTP 25, DNS 53, … look in /etc/services  Ports below 1024 reserved for “well-known” services  Clients use OS-assigned temporary (ephemeral) ports  Above 1024, recycled by OS when client finished

User Datagram Protocol (UDP)  Provides message delivery between processes  Source port filled in by OS as message is sent  Destination port identifies UDP delivery queue at endpoint

Application process Application process Application process Packets arrive Ports Message Queues DeMux on Port # UDP Delivery Kernel boundary

UDP Checksum  UDP includes optional protection against errors  Checksum intended as an end-to-end check on delivery  So it covers data, UDP header

Transmission Control Protocol (TCP)  Reliable bi-directional bytestream between processes  Message boundaries are not preserved  Connections  Conversation between endpoints with beginning and end  Flow control  Prevents sender from over-running receiver buffers  Congestion control  Prevents sender from over-running network buffers

TCP Header Format  Ports plus IP addresses identify a connection

TCP Header Format  Sequence, Ack numbers used for the sliding window

TCP Header Format  Flags may be URG, ACK, PUSH, RST, SYN, FIN

TCP Header Format  Advertised window is used for flow control

TCP Connection Establishment  Both connecting and closing are (slightly) more complicated than you might expect  That they can work is reasonably straightforward  Harder is what to do when things go wrong  TCP SYN+ACK attack  Close looks a bit complicated because both sides have to close to be done  Conceptually, there are two one-way connections  Don’t want to hang around forever if other end crashes

Three-Way Handshake  Opens both directions for transfer Active opener (client) Passive listener (server) SYN, SequenceNum = x SYN + ACK, SequenceNum = y, ACK, Acknowledgment = y + 1 Acknowledgment = x + 1 +data

Some Comments  We could abbreviate this setup, but it was chosen to be robust, especially against delayed duplicates  Three-way handshake from Tomlinson 1975  Choice of changing initial sequence numbers (ISNs) minimizes the chance of hosts that crash getting confused by a previous incarnation of a connection  But with random ISN it actually proves that two hosts can communicate  Weak form of authentication

CLOSED LISTEN SYN_RCVDSYN_SENT ESTABLISHED CLOSE_WAIT LAST_ACKCLOSING TIME_WAIT FIN_WAIT_2 FIN_WAIT_1 Passive openClose 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 Close/FIN Close CLOSED Active open /SYN TCP State Transitions

Again, with States Active participant (client) Passive participant (server) SYN, SequenceNum = x SYN + ACK, SequenceNum = y, ACK, Acknowledgment = y + 1 Acknowledgment = x + 1 +data LISTEN SYN_RCVD SYN_SENT ESTABLISHED

Connection Teardown  Orderly release by sender and receiver when done  Delivers all pending data and “hangs up”  Cleans up state in sender and receiver  TCP provides a “symmetric” close  both sides shutdown independently

TCP Connection Teardown Web serverWeb browser FIN ACK FIN FIN_WAIT_1 CLOSE_WAIT LAST_ACK FIN_WAIT_2 TIME_WAIT CLOSED …

The TIME_WAIT State  We wait 2MSL (two times the maximum segment lifetime of 60 seconds) before completing the close  Why?  ACK might have been lost and so FIN will be resent  Could interfere with a subsequent connection

Berkeley Sockets interface  Networking protocols implemented in OS  OS must expose a programming API to applications  most OSs use the “socket” interface  originally provided by BSD 4.1c in ~1982.  Principle abstraction is a “socket”  a point at which an application attaches to the network  defines operations for creating connections, attaching to network, sending and receiving data, closing connections

TCP (connection-oriented) Server Socket() Bind() Client Socket() Listen() Accept() Recv() Send() Connect() Send() Recv() Block until connect Process request Connection Establishmt. Data (request) Data (reply)

UDP (connectionless) Server Socket() Bind() Client Socket() Recvfrom() Sendto() Bind() Sendto() Recvfrom() Block until Data from client Process request Data (request) Data (reply)

Key Concepts  We use ports to name processes in TCP/UDP  “Well-known” ports are used for popular services  Connection setup and teardown complicated by the effects of the network on messages  TCP uses a three-way handshake to set up a connection  TCP uses a symmetric disconnect