In these past few blog posts, I’ve discussed TCP and everything it entails, but even though it is the most used protocol by applications, others transport data via UDP (User Datagram Protocol.) UDP is used for applications such as SNMP, DHCP, TFTP, and Syslog. Unlike TCP, UDP is connectionless meaning it doesn’t need to form a connection before sending data to a destination. It also provides no sequencing, retransmissions, or any type of acknowledgements. Although this sounds like a bad idea it really isn’t for certain applications that are real-time or time-sensitive. If you’re playing Call of Duty and start experiencing lag, would you want to rewind back before the lag, or just pick up when the lag ends. For me personally, I would just want to pick up when the lag ends instead of continual rewinding every time the game lags.
If a UDP segment is lost, it is lost for good because UDP itself does not perform any retransmissions. However applications that run on UDP such as TFTP can still perform reliability mechanisms at the application layer. TFTP is known for lock-step communication meaning that the sender sends a block of data and will not send another block of data until an ACK is received. If the sender doesn’t receive an ACK within a certain timer, it will retransmit the exact same packet. Although TFTP runs on UDP, this lock-step coordination is executed at the application layer. Time-sensitive applications can be VoIP, online gaming, live streaming, and much more.
UDP is a lightweight protocol that is used for applications that prioritize speed over reliability. It runs extremely lean with only 4 fields in the header including source port, destination port, length and checksum. For IPv4 it can even be optional making it even more lean reducing processing overhead.
Leave a Reply