DistributedNetworks DistributedNetworks


Network Daemons  «Prev  Next»
Lesson 3 TCP and UDP
Objective Define the two transport-layer protocols provided in TCP/IP that allow client/server transactions.

TCP and UDP

Under TCP/IP [1], client/server transactions come in two different kinds.

The first kind of transaction

The first kind is a simple request-reply form. For example, machine A may query the time on machine B, and machine B replies with its idea of the current time. If, for some reason, machine B fails to respond, or its response is lost, machine A may simply repeat its request after a suitable timeout.

The second kind of transaction

The second kind of client/server transaction requires an ongoing reliable data transfer. For example, a telnet connection requires a reliable stream of data to pass back and forth between the client and the server. An FTP [2] transaction, used to transfer bulk data files between machines, could not succeed without some way to ensure that the file sent in pieces from machine B to machine A can be reassembled completely at machine A.

Networking your computers dramatically enhances their ability to communicate and most computers (desktops, laptops, servers) are used for communication rather than computation. Many mainframes and supercomputers are busy crunching the numbers for business and science, but the number of these systems in use pales in comparison to the millions of systems busy moving mail to a remote associate or retrieving information from a remote repository.
When you think of the hundreds of millions of desktop systems that are used primarily for preparing documents to communicate ideas from one person to another, it is easy to see why most computers can be viewed as communications devices. The positive impact of computer communications increases with the number and type of computers that participate in the network. One of the great benefits of TCP/IP is that it provides interoperable communications between all types of hardware and all kinds of operating systems. The name "TCP/IP" refers to an entire suite of data communications protocols.
The suite gets its name from two of the protocols that belong to it:
  1. the Transmission Control Protocol (TCP) and
  2. the Internet Protocol (IP).
TCP/IP is the traditional name for this protocol suite and it is the name used in this course. The TCP/IP protocol suite is also called the Internet Protocol Suite (IPS) and both names are acceptable.

Two transport-layer protocols

TCP/IP provides two transport-layer protocols to allow for the two different types of client/server transactions. The simple reply-request transactions (such as those required for a DNS[3] server) use the User Datagram Protocol (UDP)[4], which provides no guarantee of reliability but which is simple and efficient. Those transactions requiring ongoing reliable data transfer use the (TCP) Transmission Control Protocol, which guarantees that a stream of data sent from one end of a connection to the other can be completely reconstructed in proper order. A Web server, for example, would require this level of reliability.

[1]TCP/IP: TCP/IP is the network protocol suite used by the Internet and most local area networks.
[2]File Transfer Protocol (FTP): Protocol used to transfer data over a network.
[3]DNS: Domain Name Service: resolves domain names to IP addresses
[4]UDP: User Datagram Protocol: A connectionless datagram service in the Transport layer used by applications that typically transmit small quantities of data.