TechKnowSurge
CompTIA A+ Core 1 2.1 Cisco CCNA 1.5 CompTIA Network+ 1.4 Cisco CCST Networking 1.5
VideoNetworkFree

UDP

UDP is a connectionless transport protocol that prioritizes speed over reliability, making it well-suited for real-time applications like VoIP, video conferencing, and media streaming. Unlike TCP, UDP does not establish connections, sequence data, or retransmit lost packets.

Complete this video to capture a CTF flag worth 1 point.

About this video

UDP, or User Datagram Protocol, is a transport layer protocol built around the principle of speed. Where TCP prioritizes reliability through connection establishment, sequencing, and retransmission, UDP takes a connectionless approach — data is sent continuously without first negotiating a session, and lost packets are not recovered. This makes UDP significantly lighter in terms of overhead, a trade-off that is acceptable or even preferable in scenarios where timeliness matters more than completeness. Real-time applications like Voice over IP and video conferencing are the most common use cases for UDP. These applications require small, continuous data segments to be delivered as quickly as possible. Buffering data into larger chunks before transmission would introduce delays and produce garbled audio or video artifacts on the receiving end. When network conditions degrade and packets are dropped, the result is the pixelation or choppy audio that users experience during poor connections — a direct consequence of UDP's lack of retransmission. Other protocols built on UDP include SNMP, TFTP, and Network Time Protocol, each leveraging its low-latency characteristics for their specific functions. The UDP header is notably compact compared to its TCP counterpart. It consists of just four fields spanning 32 bits: source port, destination port, length, and checksum. The checksum provides basic integrity verification, confirming that data has not been altered in transit, but the protocol includes no sequencing information and no acknowledgment mechanism. When reliability is needed alongside UDP's speed advantages, that responsibility falls to upper-layer protocols rather than UDP itself.

What you'll learn

What's covered

UDP Protocol

Aligned to

CompTIA A+ Core 1
2.1 Compare and contrast Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) ports, protocols, and their purposes.
Cisco CCNA
1.5 Compare TCP to UDP
CompTIA Network+
1.4 Explain common networking ports, protocols, services, and traffic types.
Cisco CCST Networking
1.5 Describe common network applications and protocols

Key terms

User Datagram Protocol
UDP
A connectionless transport protocol that sends data without establishing a connection or guaranteeing delivery.
Transmission Control Protocol
TCP
A connection-oriented transport protocol that ensures reliable, ordered, and error-checked delivery of data.
Transport Layer
Layer 4 of the OSI model, responsible for end-to-end communication, flow control, and error recovery.
Port
A logical endpoint for communication in a network, identified by a number that specifies a particular service or application.
Simple Network Management Protocol
SNMP
A protocol used to monitor and manage network devices such as routers, switches, and servers.
Latency
The time delay between sending a request and receiving a response over a network.
Trivial File Transfer Protocol
TFTP
A simplified file transfer protocol that uses UDP and provides no authentication, directory browsing, or error recovery, making it fast and lightweight. TFTP is commonly used to transfer configuration files, IOS images, and boot files to and from network devices in controlled environments.
Voice over IP
VoIP
Technology that digitizes analog voice signals and transmits them as IP packets over a network, enabling telephone calls over data networks instead of traditional circuit-switched telephone infrastructure. VoIP requires careful QoS configuration to minimize latency, jitter, and packet loss that degrade call quality.
Network Time Protocol
NTP
A protocol that synchronizes the clocks of networked devices to a common reference time source using a hierarchy of time servers called strata, operating over UDP port 123. Accurate time synchronization is critical for security logging, authentication tickets, and correlating events across devices.

Transcript

Let's talk about UDP. UDP communication looks quite a bit different than TCP, and UDP, as we saw before, has some certain advantages to it. So let's talk about those advantages, and let's talk about a couple of things around UDP.

What we'll be talking about is first of all the differences between TCP and UDP, some of the weaknesses and the strengths with UDP, some protocols that are associated with UDP, and then we'll wrap this up with taking a look at the UDP header. This will be a pretty quick one that we'll go through, because UDP is actually pretty simplistic. It's not as exciting and doesn't have as many components that TCP has, but it is associated with a lot of cool protocols. So that in itself is kind of cool about UDP, but it doesn't have as much interesting components that are happening within UDP.

TCP versus UDP

We saw where TCP was associated with reliability, versus UDP is all about speed and getting that data over there in a timely manner. For that reason, we have a smaller header within this. We do not resend data. We do not sequence data. So if there is going to be any kind of sequencing, it's got to be an upper layer protocol. Otherwise, it just doesn't matter what order that data comes in. And it's connectionless — with TCP, we talked about how it established a connection, so these connections were established before communication happens.

Some examples of what protocols use UDP are things like voice over IP and video conferencing, which both use the advantages of UDP to get data to its destination in a timely manner.

Streaming, and what UDP gives up

One of the things about UDP that's its strength is to send or stream that data across. Here our example is we've got these little tiny segments that we're sending over. Before, if you remember, my segments or packets were represented by bigger labels here, but these are going to be really small as it gets sent over, and it's going to be just a continuous stream. Usually it'll be a continuous stream — if you're talking about voice over IP, then it will just continually send the things out.

Now, if that device were to hold on to that data till it became a bigger chunk and then send it over in these bigger chunks, then the person on the other side of the line would get these huge chunks, and the voice either would be kind of garbled or it would be delayed. There could be significant delays between the two sides of the conversation. So it wouldn't be ideal. That's why voice over IP and video conferencing will use these UDP segments, so that it can stream that audio or stream that video across to the other side.

Because of this, it doesn't keep track of things like dropped packets. Usually it doesn't really matter with UDP packets whether it gets to the other side or not, and so if a packet gets dropped, it doesn't do any kind of retransmission. The other thing is there's no sequencing involved in this, so when it gets to the other side, it's just going to play back the data in the sequence it was given.

And so if there are some bad delays or something, that's when you're talking on the phone — if it's voice over IP, and you get some garbled sounds to it, or you see some artifacts that are happening. If you're watching a TV or you're streaming some video or YouTube and you've got a really bad connection, then you'll start seeing some artifacts and some blocks that come up. That's because it's not getting enough data, not enough data is streaming across there.

There are times when you still want some reliability, or you still want some packets or some frames to be resent, some segments to be resent. In those scenarios where you want some sort of reliability but you want to use UDP, then possibly you use some sort of upper layer protocol to help mitigate that issue. But for the most part UDP is not responsible for any of that. It doesn't establish a connection, it doesn't have sequencing, and it doesn't have any kind of mechanism to resend lost data.

Protocols that use UDP

There are some examples that use this. Some protocols that use this would be simple network management protocol, TFTP or trivial file transfer protocol, voice over IP, or something like the network time protocol. These are some protocols that all utilize UDP for their protocols.

The UDP header

As I mentioned, UDP headers are pretty basic. There's not a whole lot to it. Remember, each one of these is a bit, and eight of those is a byte. So we've got 32 bits across here, and we see that we still need a source and a destination port, and those operate just the same as they would with a TCP header. We have the length of the data that's involved in here, or the total length of this segment, so that's important information. And then we have the checksum, so that way we can make sure when it gets to the other side that it is truly accurate information and nothing has been altered along the way.

So that was quick and dirty. We ran through it. That's TCP and UDP. We talked about some of the strengths and weaknesses that UDP has, we talked about some of the protocols that are associated with it, and then we took a look at the UDP header.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →