1 K. Salah Module 6.0: Transport Layer Protocols UDP & TCP Chapter 23 & 24.

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

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.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Networks I Transmission Control Protocol Instituto Tecnológico y de Estudios Superiores de Monterrey Campus Estado de México Prof. MSc. Ivan A. Escobar.
Transmission Control Protocol (TCP) Basics
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Transport Layer PART V.
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.
Lecture # 14 TCP/IP - UDP Computer Communication & Networks.
Chapter 7 – Transport Layer Protocols
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
UNIT 07 Process – to – Process Delivery: UDP,TCP and SCTP
Chapter 3: Transport Layer
TCP/IP Protocol Suite 1 Chapter 11 Upon completion you will be able to: User Datagram Protocol Be able to explain process-to-process communication Know.
Ch 23 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Ameera Almasoud.
Transport Layer TCP and UDP IS250 Spring 2010
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.
Chapter 11 User Datagram Protocol (UDP)
Hyung-Min Lee©Networking Lab., 2001 Chapter 11 User Datagram Protocol (UDP)
User Datagram Protocol, UDP 指導老師:梁德昭 老師 學生:吳雅真 學號: 日期:
ICE 302 T RANSPORT LAYER Md. Asif Hossain Term # 2 Lecture # 1 1 Thanks to A. B. Forouzan.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
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.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer3-1 Chapter 3 Transport Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added for.
Multimedie- och kommunikationssystem Föreläsning 11 Kapitel 12: Transportprotokoll. Flödesstyrning och trafikstocknings­hantering. Sliding window.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Transmission Control Protocol (TCP)
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Process-to-Process Delivery:
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
1 Kyung Hee University PART 5 Transport Layer. 2 Kyung Hee University Role of position of Transport Layer  Overseeing the delivery of data from a process,
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 14 User Datagram Protocol (UDP) Introduction  Responsibilities of Transport Layer to create a process-to-process communication l using.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
Process-to-Process Delivery:
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
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
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.
Subject Name: Computer Communication Networks Subject Code: 10EC71
Chapter 14 User Datagram Protocol (UDP)
Process-to-Process Delivery:
CPEG514 Advanced Computer Networkst
Chapter 5 Transport Layer Introduction
PART V Transport Layer.
PART 5 Transport Layer.
Chapter 5 Transport Layer Introduction
Process-to-Process Delivery: UDP, TCP
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer 9/22/2019.
Presentation transcript:

1 K. Salah Module 6.0: Transport Layer Protocols UDP & TCP Chapter 23 & 24

2 K. Salah

3 Port Numbers TCP connection: is identified by a pair of two endpoints {tcp,client IP address, 64,295}  {tcp,server IP address, 23} {tcp,client IP address, 64,295} is called a TCP socket.

4 K. Salah Web Ports Two clients, using the same destination port number (80) to communicate with the same Web server application. What kind of server is this?

5 K. Salah Multiplexing and Demultiplexing Multiplexing –At the sender site, there may be several processes that need to send packets. However, there is only one transport-layer protocol [UDP or TCP]. –Protocol accepts messages from different process, differentiated by their assigned port number. After adding the header, the transport layer passes the packet to network layer. Demultiplexing –At receiver site, the transport layer receives datagrams from network layer. –After error checking and dropping of the header, the transport layer delivers each message to the appropriate process based on the port number.

6 K. Salah Port Ranges Port numbers are divided into three ranges: –Well-known ports: 0 to –Registered ports: Ports ranging from 1024 to are not assigned or controlled by IANA. They can only be registered with IANA to prevent duplication. –Dynamic ports: Ports ranging from to are neither controlled nor registered. They can be used by any process. These are the ephemeral ports.

7 K. Salah Well-known ports used by UDP PortProtocolDescription 7EchoEchoes a received datagram back to the sender 9DiscardDiscards any datagram that is received 11UsersActive users 13DaytimeReturns the date and the time 17QuoteReturns a quote of the day 19ChargenReturns a string of characters 53NameserverDomain Name Service 67BootpsServer port to download bootstrap information 68BootpcClient port to download bootstrap information 69TFTPTrivial File Transfer Protocol 111RPCRemote Procedure Call 123NTPNetwork Time Protocol 161SNMPSimple Network Management Protocol 162SNMPSimple Network Management Protocol (trap)

8 K. Salah PortProtocolDescription 7 EchoEchoes a received datagram back to the sender 9DiscardDiscards any datagram that is received 11UsersActive users 13DaytimeReturns the date and the time 17QuoteReturns a quote of the day 19ChargenReturns a string of characters 20FTP, DataFile Transfer Protocol (data connection) 21FTP, ControlFile Transfer Protocol (control connection) 23TELNETTerminal Network 25SMTPSimple Mail Transfer Protocol 53DNSDomain Name Server 67BOOTPBootstrap Protocol 79Finger 80HTTPHypertext Transfer Protocol 111RPCRemote Procedure Call Well-known ports used by TCP

9 K. Salah Error control If data link layer is reliable and has flow and error control, do we need this at the transport layer ? –Reliability at the data link layer is between two nodes –We need reliability between two ends. –Because the network layer in the Internet is unreliable (best-effort delivery), we need to implement reliability at the transport layer. –To understand that error control at the data link layer does not guarantee error control at the transport layer.

10 K. Salah IP IP is unreliable IP is connectionless So is UDP? So why need UDP?

11 K. Salah UDP UDP is a connectionless, unreliable transport protocol. It does not add anything to the services of IP except for providing process-to-process communication instead of host-to-host communication. It performs very limited error checking. –UDP is a very small protocol with a minimum of overhead. –If a process wants to send a small message and does not care much about reliability, it can use UDP –Sending a small message using UDP takes much less interaction between the sender and receiver than using TCP. –UDP is a convenient protocol for multimedia and multicasting applications. –UDP is a connectionless, unreliable protocol that has no flow and error control. It uses port numbers to multiplex data from the application layer.

12 K. Salah User datagram format UDP packets, called user datagrams, have a fixed-size header of 8 bytes. –Source port number: Port number used by process running source host; 16 bits [0 to 65535] –Destination port number: Port number used by process running destination host; 16 bits –Length: 16-bit field; Total length of user datagram header plus data. –Checksum:  Used to detect errors over the entire user datagram (header plus data)  is 1’s complement of the 1’s complement sum of all the 16-bit words in the packet ( headers + data).  Its optional to do checksum. If not done, put the entries as all 0s.

13 K. Salah –A process that requires simple request-response communication with little concern for flow and error control. –It is not usually used for a process that needs to send bulk data, such as FTP –A process with internal flow and error control mechanisms. For Trivial File Transport Protocol (TFTP) includes flow and error control. It can easily use UDP. –A suitable transport protocol for multicasting. Multicasting capabilities are embedded in the UDP software but not in TCP software –UDP is used for some route updating protocols such as Routing Information Protocol (RIP) –UDP is used in conjunction with the Real-Time Transport Protocol (RTP) to provide a transport-layer mechanism for real-time data. Applications

14 K. Salah Transmission Control Protocol (TCP) Reliable protocol Stream connection-oriented and reliable transport protocol. Adds connection-oriented and reliability features to the services of IP Stream Delivery Service –TCP, unlike UDP, is a stream-oriented protocol –UDP adds its own header to chunk of data, which is now called a user datagram, and delivers it to IP for transmission. The process may deliver several chunks of data to the UDP, but UDP treats each chunk independently without seeing any connection between them. –TCP allows the sending process to deliver data as a stream of bytes and receiving process to obtain data as a stream of bytes. TCP creates an environment in which the two processes seem to be connected by an imaginary “tube” that carries their data across the Internet.

15 K. Salah TCP Segment Hello dear friend. I am sending a letter … Hello dear friend. I am sending a letter Hello dear friend. I am sending a letter … Buffer Segment 1 Segment 2

16 K. Salah TCP Segments Segments are not necessarily the same size. There are two buffers, the sending buffer and the receiving buffer, for each direction. TCP is full-duplex

17 K. Salah Numbering Bytes Byte number: –When TCP receives bytes of data from the process and stores them in the sending buffer; it numbers them. –Numbering does not necessarily start from 0; it starts with a randomly generated number between 0 to 2 32 – 1. –If random number happens to be 1057 and total data to be sent are 6000 bytes, the bytes are numbered from 1057 to Sequence number –TCP assigns a sequence number to each segment that is being sent –Sequence number of each segment is the number of the first byte carried in that segment. Acknowledgement number –Sequence number in each direction shows the number of first byte carried by the segment. –Each party also uses an acknowledgement number to confirm the bytes it has received. However, the acknowledgement number defines the number of the next byte that the party expects to receive. –Acknowledgement number is cumulative, which means that the receiver takes the number of the last byte it has received, safe and sound, adds 1 to it, and announces this sum as the acknowledgement number.

18 K. Salah Example Imagine a TCP connection is transferring a file of 6000 bytes. The first byte is numbered What are the sequence numbers for each segment if data are sent in five segments with the first four segments carrying 1000 bytes and the last segment carrying 2000 bytes? Solution The following shows the sequence number for each segment: Segment 1 ==> sequence number: 10,010 (range: 10,010 to 11,009) Segment 2 ==> sequence number: 11,010 (range: 11,010 to 12,009) Segment 3 ==> sequence number: 12,010 (range: 12,010 to 13,009) Segment 4 ==> sequence number: 13,010 (range: 13,010 to 14,009) Segment 5 ==> sequence number: 14,010 (range: 14,010 to 16,009)

19 K. Salah TCP Header

20 K. Salah Header Fields Sequence number, Acknowledgement number, and Window size are used for implementing sliding window flow and error control. Checksum is 1’s complement of the 1’s complement sum of all the 16-bit words in the TCP packet (TCP pseudoheader + TCP header + data segment). TCP psuedoheader is locally computed at source and destination. At destination, it is computed by IP layer. HLEN or Offset is the size of TCP header measured in 32-bit multiples. Urgent pointer specifies a position within the data stream (sequence number + 1). Example is hitting ESC key to abort a hung-up telnet session. Options and Padding. This is only 32-bit field. A common option is the MSS (Maximum Segment Size) that restricts the size of TCP segment and is negotiated at the start of TCP connection. Usually MSS = (MTU – fixed TCP&IP headers) to avoid further fragmentation. Padding is filling with zeros to allow 32-bit boundary.

21 K. Salah TCP Pseudoheader To double check that TCP segment got received by correct destination. Data may get delivered to wrong IP address. Violation of layering boundaries. Used also for UDP

22 K. Salah Control Field URG data contained is urgent is should be processed by receiver ASAP. Used to send out of band signals to receiver by jumping the sender and receiver queues. ACK indicates the Acknowledgment number is valid. PSH sends whatever accumulated data to server applications ASAP. Situations include: one query, end of message, in interactive processes when hitting, in FTP when sending last segment of a file. RST tells the receiver to release connection and its resources. This happens under abnormal conditions, e.g., the sender is having errors/timeouts/disconnect communicating with receiver. SYN indicates opening a connection. FIN indicates closing a connection