TCP (Tansmission Control Protocol) and UDP (Use Datagram Protocol) are a lot like siblings in a family; you can see the resemblance and can tell they are related, but there are striking differences that set them apart. For example, both use port numbers for accessing applications/services and both operate at Layer 4, but the similarities end there.
Ever met a control freak? If so, then you have a pretty good idea of how TCP operates, in that it exerts significant control over how traffic is sent and received. To begin with, TCP won’t send any data without sending up a virtual end-to-end connection between hosts, and it does so with a three-step process to establish that connection, as follows:
1. TCP SYN (synchronization)
2. SYN ACK (SYN acknowledgement)
3. ACK (acknowledgement).
After the connection establishment phase, a TCP connected hosts are free to send data, but does so in a very paranoid and calculated manner. First, sequence numbers are assigned to the data, in order to reassemble everything in correct order. Once the data is numbered and sent, the receiving station sends an acknowledgement, and if that acknowledgement is not received, the data is assumed lost and retransmitted. Since that process can slow data transfer rates, TCP supports a concept called windowing, in which several segments of data can be sent before acknowledgements are required. Sounds great, right? Lots of mechanisms for connection-oriented, reliable delivery (which are terms often used to describe TCP). The problem is, however, that if all of that extensive control is applied to every single piece of data, then everything is likely to take a lot longer to process.
If you are anything like me, you probably don’t follow a 57-point checklist before getting in the car and driving off when you go to work in the morning. Welcome to the world of UDP, which contains no acknowledgements, no sequencing, no virtual connections, and incredibly low protocol overhead. UDP is faster than TCP and well-suited to latency-senstitive traffic such as voice (although VoIP requires use of the Real-Time Transport Protocol in order to function). The terms used for UDP and connectionless and unreliable, due to how it transmits traffic, and it is used often for network transmission. When you look at both formats side by side (see above), it’s clear how vastly different UDP is from TCP. The lack of reliability of UDP may seem somewhat random, but when you consider the fact that many applications handle retransmission and data delivery, then the thought of having other protocols do that may seem unnecessary.
Next time, we will dive into the world of IP routing…
- Joe








