Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Read offline with no ads or diagram watermarks!
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Lower-Layer (Interface, Internet and Transport) Protocols (OSI Layers 2, 3 and 4)
      9  TCP/IP Transport Layer Protocols
           9  Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)

Previous Topic/Section
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)
Previous Page
Pages in Current Topic/Section
12
3
Next Page
TCP/IP Transport Layer Protocol (TCP and UDP) Addressing: Ports and Sockets
Next Topic/Section

TCP and UDP Overview and Role In TCP/IP
(Page 3 of 3)

Applications of TCP and UDP

Having two transport layer protocols with such complementary strengths and weaknesses provides considerable flexibility to the creators of networking software:

  • TCP Applications: Most “typical” applications need the reliability and other services provided by TCP, and don't care about loss of a small amount of performance to overhead. For example, most applications that transfer files or important data between machines use TCP, because loss of any portion of the file renders the entire thing useless. Examples include such well-known applications as the Hypertext Transfer Protocol (HTTP) used by the World Wide Web (WWW), the File Transfer Protocol (FTP) and the Simple Mail Transfer Protocol (SMTP). I describe TCP applications in more detail in the TCP section.

  • UDP Applications: I'm sure you're thinking: “what sort of application doesn't care if its data gets there, and why would I want to use it?” You might be surprised: UDP is used by lots of TCP/IP protocols. UDP is a good match for applications in two circumstances. The first is when the application doesn't really care if some of the data gets lost; streaming video or multimedia is a good example, since one lost byte of data won't even be noticed. The other is when the application itself chooses to provide some other mechanism to make up for the lack of functionality in UDP. Applications that send very small amounts of data, for example, often use UDP under the assumption that if a request is sent and a reply is not received, the client will just send a new request later on. This provides enough reliability without the overhead of a TCP connection. I discuss some common UDP applications in the UDP section.

Key Concept: Most classical applications, especially ones that send files or messages, require that data be delivered reliably, and therefore use TCP for transport. Applications using UDP are usually those where loss of a small amount of data is not a concern, or that use their own application-specific procedures for dealing with potential delivery problems that TCP handles more generally.


In the next few sections we'll first examine the common transport layer addressing scheme used by TCP and UDP, and then look at each of the two protocols in detail. Following these sections is a summary comparison to help you see at a glance where the differences lie between TCP and UDP. Incidentally, if you want a good “real-world” illustration of why having both UDP and TCP is valuable, consider message transport under the Domain Name System (DNS), which actually uses UDP for certain types of communication and TCP for others.

Before leaving the subject of comparing UDP and TCP, I want to explicitly point out that even though TCP is often described as being slower than UDP, this is a relative measurement. TCP is a very well-written protocol that is capable of highly efficient data transfers. It is only slow compared to UDP because of the overhead of establishing and managing connections. The difference can be significant, but is not enormous, so keep that in mind.

 


Previous Topic/Section
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)
Previous Page
Pages in Current Topic/Section
12
3
Next Page
TCP/IP Transport Layer Protocol (TCP and UDP) Addressing: Ports and Sockets
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.