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 15-1.
Figure 15-1 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.
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.
UDP Best Effort Delivery (15.1.4)
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.
UDP (User Datagram Protocol) 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 15-2 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 15-2 Example of DNS Resolution
Video – TCP and UDP Operation (15.1.1)
Refer to the online course to view this video.
Check Your Understanding – TCP and UDP (15.1.2)
Refer to the online course to complete this activity.