Hour 6 The Transport Layer 1. What You'll Learn in This Hour Connections oriented and connectionless protocols Ports and sockets TCP UDP 2.

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

CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
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
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.
Instructor: Sam Nanavaty TCP/IP protocol. Instructor: Sam Nanavaty Version – Allows for the evolution of the protocol IHL (Internet header length) – Length.
Transmission Control Protocol (TCP) Basics
10. UDP/TCP WWW page: Text book: Mastering Networks (Chapter 10) Network IP protocol is routes the data.
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.
Lecture # 14 TCP/IP - UDP Computer Communication & Networks.
Chapter 7: Objectives Part 1
Chapter 7 – Transport Layer Protocols
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
UNIT 07 Process – to – Process Delivery: UDP,TCP and SCTP
UDP - User Datagram Protocol UDP – User Datagram Protocol Author : Nir Shafrir Reference The TCP/IP Guide - ( Version Version.
Kazi Spring 2008 CSCI 6901 CSCI-690 Computer Networks Khurram Kazi.
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Process-to-Process Delivery:
Gursharan Singh Tatla Transport Layer 16-May
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?
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.
University of the Western Cape Chapter 12: The Transport Layer.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
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.
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2.8. Data Communication The data that flows on a connection may be thought of as a stream of octets. The sending user indicates in each SEND call whether.
Networking Basics CCNA 1 Chapter 11.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Cisco I Introduction to Networks Semester 1 Chapter 7 JEOPADY.
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
Process-to-Process Delivery:
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
Chapter 11 User Datagram Protocol
Chapter 9: Transport Layer
5. End-to-end protocols (part 1)
Transport Layer.
Process-to-Process Delivery, TCP and UDP protocols
Process-to-Process Delivery
PART 5 Transport Layer Computer Networks.
TCP Transport layer Er. Vikram Dhiman LPU.
Process-to-Process Delivery:
PART V Transport Layer.
PART 5 Transport Layer.
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

Hour 6 The Transport Layer 1

What You'll Learn in This Hour Connections oriented and connectionless protocols Ports and sockets TCP UDP 2

At the completion of this hour, you will be able to Describe the basic duties of the Transport layer Explain the difference between a connection-oriented protocol and a connectionless protocol Explain how Transport layer protocols provide an interface to network applications through ports and sockets Describe the differences between TCP and UDP Identify the fields that make up the TCP header Describe how TCP opens and closes a connection Describe how TCP sequences and acknowledges data transmissions Identify the four fields that comprise the UDP header 3

the Transport layer protocols to provide the following: –Interface for network applications –A mechanism for multiplexing/demultiplexing –Error checking, flow control, and verification –Transport Control Protocol (TCP) –User Datagram Protocol (UDP) 4

Transport Layer Concepts Connection-oriented and connectionless protocols Ports and sockets Multiplexing 5

Connection-Oriented and Connectionless Protocols Connection-Oriented Connectionless-Oriented 6

Ports and Sockets A port is a predefined internal address that serves as a pathway from the application to the Transport layer or from the Transport layer to the application. A socket is an address formed by concatenating the IP address and the port number. For instance, the socket number refers to port 21 on the computer with the IP address

Port 8

Socket Socket Socket

Well-Known Port A well-known port is a port number that is assigned to a specific application by ICANN See more details in “ Sams Teach Yourself TCP/IP in 24 Hours, Third Edition ” Or you can see in oits/Ports/default.htm oits/Ports/default.htm 10

Multiplexing/Demultiplexing The socket addressing system enables TCP and UDP to perform another important Transport layer task: multiplexing and demultiplexing 11

Multiplexing/Demultiplexing Multiplexing/demultiplexing enables the lower levels of the TCP/IP stack to process data without regard to which application initiated that data. All associations with the originating application are settled at the Transport layer, and data passes to and from the Internet layer in a single, application- independent pipeline. The key to multiplexing and demultiplexing is the socket address. Because the socket address combines the IP number with the port number, it provides a unique identifier for a specific application on a specific machine. 12

Multiplexing/Demultiplexing 13

Multiplexing/Demultiplexing See the Telnet server depicted in previous page All client machines use the well-known port address TCP 23 to contact the Telnet server, but the destination socket for each of the connecting PCs is unique. Likewise, all network applications running on the Telnet server use the server's IP address, but only the Telnet service uses the socket address, consisting of the server's IP address plus TCP port

TCP: The Connection-Oriented Transport Protocol Stream-oriented processing — TCP processes data in a stream. In other words, TCP can accept data a byte at a time rather than as a preformatted block. TCP formats the data into variable-length segments, which it will pass to the Internet layer. Resequencing — If data arrives at the destination out of order, the TCP module is capable of resequencing the data to restore the original order. Flow control — TCP's flow control feature ensures that the data transmission won't outrun or overrun the destination machine's capability to receive the data. This is especially critical in a diverse environment in which there may be considerable variation of processor speeds and buffer sizes. Precedence and security — The Department of Defense specifications for TCP call for optional security and priority levels that can be set for TCP connections. Many TCP implementations, however, do not provide these security and priority features. Graceful close — TCP is as careful about closing a connection as it is about opening a connection. The graceful close feature ensures that all segments have been sent and received before a connection is closed. 15

16

TCP Header Format 192 bits 24 Bytes 17

TCP Header Source Port (16-bit) — The port number assigned to the application on the source machine. Destination Port (16-bit) — The port number assigned to the application on the destination machine. Sequence Number (32-bit) — The sequence number of the first byte in this particular segment, unless the SYN flag is set to 1. If the SYN flag is set to 1, the Sequence Number field provides the initial sequence number (ISN), which is used to synchronize sequence numbers. If the SYN flag is set to 1, the sequence number of the first octet is one greater than the number that appears in this field (in other words, ISN+1). Acknowledgment Number (32-bit) — The acknowledgment number acknowledges a received segment. The value is the next sequence number the receiving computer is expecting to receive, in other words, the sequence number of the last byte received +1. Data offset (4 bits) — A field that tells the receiving TCP software how long the header is and, therefore, where the data begins. The data offset is expressed as an integer number of 32-bit words. 18

TCP Header Reserved (6 bits) — Reserved for future use. The Reserved field provides room to accommodate future developments of TCP and must be all zeros Control flags (1 bit each) — The control flags communicate special information about the segment. –URG — A value of 1 announces that the segment is urgent and the Urgent Pointer field is significant. –ACK — A value of 1 announces that the Acknowledgment Number field is significant. –PSH — A value of 1 tells the TCP software to push all the data sent so far through the pipeline to the receiving application. –RST — A value of 1 resets the connection. –SYN — A value of 1 announces that sequence numbers will be synchronized, marking the beginning of a connection. See the discussion of the three-way handshake, later in this hour. –FIN — A value of 1 signifies that the sending computer has no more data to transmit. This flag is used to close a connection. 19

TCP Header Window (16-bit) — A parameter used for flow control. The window defines the range of sequence numbers beyond the last acknowledged sequence number that the sending machine is free to transmit without further acknowledgment. Checksum (16-bit) — A field used to check the integrity of the segment. A receiving computer performs a checksum calculation based on the segment and compares the value to the value stored in this field. TCP and UDP include a pseudo-header with IP addressing information in the checksum calculation. See the discussion of the UDP pseudo-header later in this hour. Urgent Pointer (16-bit) — An offset pointer pointing to the sequence number that marks the beginning of any urgent information. Options — Specifies one of a small set of optional settings. Padding — Extra zero bits (as needed) to ensure that the data begins on a 32-bit boundary. Data — The data being transmitted with the segment. 20

TCP Connection Passive open — A given application process notifies TCP that it is prepared to receive incoming connections through a TCP port. Thus, the pathway from TCP to the application is opened in anticipation of an incoming connection request. Active open — An application requests that TCP initiate a connection with another computer that is in the passive open state. (Actually, TCP can also initiate a connection to a computer that is in the active open state, in case both computers are attempting to open a connection at once.) 21

Establishing a Connection This synchronization of sequence numbers is called a three-way handshake. The three-way handshake always occurs at the beginning of a TCP connection. The three steps of a three-way handshake are as follows: 22

Establishing a Connection 23

24

TCP Retransmission 25

TCP Flow Control The Window field in the TCP header provides a flow control mechanism for the connection. The purpose of the Window field is to ensure that the sending computer doesn't send too much data too quickly, which could lead to a situation in which data is lost because the receiving computer can't process incoming segments as quickly as the sending computer can transmit them. The flow control method used by TCP is called the sliding window method. The receiving computer uses the Window field (also known as the buffer size field) to define a window of sequence numbers beyond the last acknowledged sequence number that the sending computer is authorized to transmit. The sending computer cannot transmit beyond that window until it receives the next acknowledgment. 26

Sliding Window Stop and Wait Sliding Window 27

Closing a Connection When it is time to close the connection, the computer initiating the close, Computer A, places a segment in the queue with the FIN flag set to one. The application then enters what is called the fin-wait state. In the fin-wait state, Computer A's TCP software continues to receive segments and processes the segments already in the queue, but no additional data is accepted from the application. When Computer B receives the FIN segment, it returns an acknowledgment to the FIN, sends any remaining segments, and notifies the local application that a FIN was received. Computer B sends a FIN segment to Computer A, which Computer A acknowledges, and the connection is closed 28

Closing a Connection 29

Closing a Connection (Continue) 30

UDP: The Connectionless Transport Protocol UDP is much simpler than TCP, and it doesn't perform any of the functions listed in the preceding section.. First, although UDP is sometimes described as having no error-checking capabilities, in fact, it is capable of performing rudimentary error checking. Second, UDP does not offer the resequencing of data provided by TCP. 31

UDP Header 32

UDP Header Source Port — This field occupies the first 16 bits of the UDP header. This field typically holds the UDP port number of the application sending this datagram. Destination Port — This 16-bit field holds the port address to which the UDP software on the receiving machine will deliver this datagram. Length — This 16-bit field identifies the length in octets of the UDP datagram. The length includes the UDP header as well as the UDP data payload. Checksum — This 16-bit field is used to determine whether the datagram was corrupted during transmission. The checksums generated at the source and verified at the destination allow the client application to determine if the datagram has been corrupted. 33