TCP and UDP (11.2)–Cisco Transport Layer Servicest

The transport layer includes two protocols: TCP and UDP. TCP is used to deliver messages reliably, whereas UDP is only concerned with getting the messages to the destination as quickly as possible.

Protocol Operations (11.2.1)

A web server and a web client use specific protocols and standards in the process of exchanging information to ensure that the messages are received and understood. The various protocols necessary to deliver a web page function at the four different levels of the TCP/IP model are as follows:

  • Application Layer Protocol—Hypertext Transfer Protocol (HTTP) governs the way that a web server and a web client interact. HTTP defines the format of the requests and responses exchanged between the client and server. HTTP relies on other protocols to govern how the messages are transported between client and server.
  • Transport Layer Protocol—Transmission Control Protocol (TCP) ensures that IP packets are sent reliably and any missing packets are resent. TCP provides proper ordering of packets received out of order.
  • Internetwork Layer Protocol—The most common internetwork protocol is Internet Protocol (IP). IP is responsible for taking the formatted segments from TCP, assigning the logical addressing, and encapsulating them into packets for routing to the destination host.
  • Network Access Layer—The specific protocol at the network access layer, such as Ethernet, depends on the type of media and transmission methods used in the physical network.

Video—TCP and UDP Operation (11.2.2)

Refer to the online course to view this video.

TCP and UDP (11.2.3)

Each service available over the network has its own application protocols that are implemented in the server and client software. In addition to the application protocols, all of the common Internet services use Internet Protocol (IP) to address and route messages between source and destination hosts, as shown in Figure 11-3.

   

Figure 11-3 Common Protocols Used Between Web Servers and Web Clients

IP is concerned only with the structure, addressing, and routing of packets. IP does not specify how the delivery or transportation of the packets takes place. The application decides which transport protocol to use. Transport protocols specify how to manage the transfer of messages between hosts. The two most common transport protocols are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). The IP protocol uses these transport protocols to enable hosts to communicate and transfer data.

TCP Reliability (11.2.4)

With all of the millions and millions of web pages being transmitted at any time over the Internet, how can a server be certain that the page it sent is received by the client that requested it? One of the mechanisms that helps ensure reliable delivery is the Transmission Control Protocol (TCP).

When an application requires acknowledgment that a message is delivered, it uses TCP. TCP breaks up a message into small pieces known as segments. The segments are numbered in sequence and passed to the IP process for assembly into packets. TCP keeps track of the number of segments that have been sent to a specific host from a specific application. If the sender does not receive an acknowledgment within a certain period of time, it assumes that the segments were lost and retransmits them. Only the portion of the message that is lost is resent, not the entire message.

On the receiving host, TCP is responsible for reassembling the message segments and passing them to the application. FTP and HTTP are examples of applications that use TCP to ensure delivery of data.

Go to the online course to view an animation of TCP segments transmitted from sender to receiver.

UDP Best Effort Delivery (11.2.5)

In some cases, the TCP acknowledgment protocol is not required and actually slows down information transfer. In those cases, UDP may be a more appropriate transport protocol.

User Datagram Protocol (UDP) is a “best effort” delivery system that does not require acknowledgment of receipt. UDP is preferable with applications such as streaming audio and voice over IP (VoIP). Acknowledgments would slow down delivery, and retransmissions are undesirable.

An example of an application that uses UDP is Internet radio. If some of the message is lost during its journey over the network, it is not retransmitted. If a few packets are missed, the listener might hear a slight break in the sound. If TCP were used and the lost packets were resent, the transmission would pause to receive them, and the disruption would be more noticeable.

To illustrate how UDP is used, consider how a host resolves domain names to IP addresses using DNS. DNS does not require the services of TCP because most DNS queries are resolved in one packet. DNS will use UDP to resolve a name. The example in Figure 11-4 illustrates this. Notice how the client does not know the IP address of www.cisco.com. It therefore sends a DNS request to the DNS server using UDP. The server responds with the IP address of cisco.com in one packet.

   

Figure 11-4 DNS Resolution

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top