Process-to-Process Delivery: Chapter 23 Process-to-Process Delivery: UDP and TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
23-1 PROCESS-TO-PROCESS DELIVERY The transport layer is responsible for process-to-process delivery—the delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship, as we will see later.
The transport layer is responsible for process-to-process delivery. Note The transport layer is responsible for process-to-process delivery.
Figure 23.1 Types of data deliveries
Figure 23.2 Port numbers
Figure 23.3 IP addresses versus port numbers
Figure 23.8 Position of UDP, TCP, and SCTP in TCP/IP suite
23-2 USER DATAGRAM PROTOCOL (UDP) The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. It does not add anything to the services of IP except to provide process-to-process communication instead of host-to-host communication.
UDP - User Datagram Protocol Transport-layer Protocol Used mainly for one way, short communications datagrams don’t contain information about other packets Each packet independent of each other
UDP - continued Lack of error control Checksum is only check, packet is dropped if incorrect Relies on ICMP for error control Good alternative for short messages without large communications overhead used by TCP
Table 23.1 Well-known ports used with UDP
23-3 TCP TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms at the transport level.
TCP - Transmission Control Protocol Used where reliable communications is required Provisions for error control, streaming data, and two way communications Connections are managed both ways using flags in the TCP packet header
Three way handshake TCP SYN(synchronize) - sent at the beginning of a connection from source host. Contains initialization information. ACK(acknowledgement) - sent when packet has been received by the destination host SYN - then sent by destination host ACK - sent by source host
TCP error control Implemented through the ACK flag Each packet numbered and a timer is started on transmission Packet is retransmitted if ACK not received before timeout
Table 23.2 Well-known ports used by TCP
Figure 23.13 Stream delivery
Figure 23.14 Sending and receiving buffers
At the sending site, the buffer has three types of chambers At the sending site, the buffer has three types of chambers. The white section contains empty chambers that can be filled by the sending process (producer). The gray area holds bytes that have been sent but not yet acknowledged. TCP keeps these bytes in the buffer until it receives an acknowledgment. The colored area contains bytes to be sent by the sending TCP.
Figure 23.15 TCP segments
The numbering starts with a randomly generated number. Note The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number.