Stateless connection in UDP explained with examples

len Alfred Ajibola - 17th October, 2021 @ 06:55 PM

Topics in ICT

Functions of the network layer of the OSI model Network layer of the OSI model Transport layer of the OSI model and its characteristics Session layer of the OSI model: Functions of session layer What is presentation layer of the OSI model? Functions of presentation layer Application layer of the OSI model and its functions Three-way handshake in TCP Stateless connection in UDP explained with examples Transport Layer: Functions of layer 4 in networking Transport layer: Layer 4 of the OSI model

Academic Questions in ICT

Please check out our Questions and Answers here

What is the first step towards disabling automatic image download on WhatsApp?

  • A. Click on the three dots on the top right hand corner

  • B. Click on the WhatsApp logo

  • C. Click on the settings icon on the top right corner

  • D. Click on the settings icon located on the to top-center of the app

  • E. Click directly on the storage and data icon located on the top right corner

  • F. Click on the mobile data usage icon located on the top right corner

The followings are ways to conserve data on android phones except _____.

  • A. Turning on data saving mode

  • B. Activating background apps

  • C. Use of Wi-Fi to update apps

  • D. Disable automatic image download on WhatsApp

  • E. Watch low resolution videos on youtube

  • F. Utilizing a reputable data saving app on google playstore

Twitter was launched in _____.

  • A. 2003

  • B. 2004

  • C. 2005

  • D. 2006

  • E. 2007

  • F. 2008

User Datagram Protocol (UDP):

The User Datagram Protocol (UDP) is a lightweight layer 4 (or transport layer) protocol that sends data in the form of datagrams to other communicating hosts in a network that utilizes the Internet Protocol (IP). In short, UDP must run on top of IP in order to work. Therefore, a network utilizing UDP is sometimes regarded to as a UDP/IP network.

The transfer of datagrams via UDP is done in a connectionless or stateless manner; but that isn't necessary a bad thing. In fact, some type of data are best transferred in this manner. A typical example of such data is Voice over Internet Protocol (VoIP).


When data is transferred in a stateless manner, it only mean that both connecting devices did not partake in an initial three way handshake (or connection setup) before the communication began. In this regard, you can think of it as both computers connecting without exchanging some form of tracking information about each other. As a result, there is no sequence number, acknowledgement number and flow control associated with this connection; hence the name 'connectionless' or 'stateless'. For this reason, UDP is sometimes referred to an 'Unreliable' Data Protocol.

Please read an introduction to the transport layer here.


A stateless protocol is also referred to as a connectionless protocol; and that's exactly how UDP functions.

In a stateless connection, there is no guarantee of datagram delivery to communicating devices. Also the datagrams can arrive out of other or may even be duplicated when sent. In an IPv4 network, it is important to state that UDP may perform checksum on datagrams in an attempt to ascertain their integrity. However, a checksum is always performed when IPv6 is utilized at the network layer.

A stateless communication ensures that one of the communicating device send data or datagrams to the other computers without any prior notice to the latter. If something happens to the sent data along its path, (probably traffic was heavy along its route) and it was unable to reach a destination computer, then such data will be lost (not delivered to the destination computer or device); and there won't be any form of notification from the receiving device, hence the retransmission of the lost data is impossible.

The image below shows a connection and connectionless (or stateful and stateless) communication between two devices:

stateful and stateless data transfer by transport layer - Lenacad

Please read on the functions of the transport layer here.


Voice communication is a function of the connectionless User Datagram Protocol (UDP). In fact, this is the reason why we sometimes hear distorted sounds in voice communications. This is so because some specific voice data could not reach its destination device; and there isn't retransmission of the lost data. For this reason, voice conversations happen in real-time and that's good enough.


Apart from VoIP, applications that utilizes UDP at its transport layer includes:

  • Instant messaging apps like facebook messenger, whatsapp, telegram, michat and wechat

  • Video calls

  • Online multiplayer games

  • Robotic telepresence

  • Live streaming media

  • Teleconferencing


Application layer protocols that are transmitted via UDP, alongside their port numbers include:

  • Trivial File Transfer Protocol (TFTP): Port 59

  • Dynamic Host Configuration Protocol (DHCP): Port 67

  • Network Time Protocol (NTP): Port 123

  • Domain Name Service (DNS): Port 53

  • Routing Information Protocol (RIP): Port 520

  • Simple Network Management Protocol (SNMP): Port 161

  • Network File System (NFS): Port 111

  • Bootstrap Protocol (BOOTP): Port 68

  • Quote of the day protocol: Port 17


From our explanations so far, we can safely say that the stateless connection in UDP is achieved via port numbering and an optional checksum computation. Port numbering functions to distinguish communicating users request while a checksum might be calculated to confirm datagram integrity.


UDP Header

Below is a diagram showing UDP's header.

UDP header - Lenacad

The User Datagram Protocol header has a data field of eight bytes (or 64 bits) in total. In other words, four fields are present in the header, with each taking 2 bytes (16 bits) respectively. The fields include:

  1. Source port number: It's a 2 byte field containing the source port of the sending device.

  2. Destination port number: A 2 byte field containing the destination port to which datagrams are to be sent.

  3. Length: The length of UDP datagram specifies the number of bytes present in the UDP header and the UDP payload (that is, the data it contains). It is a 2 byte field.

  4. Checksum: It computes error checks on datagrams in order to maintain data integrity. It is required in IPv6 but optional in IPv4.

Kindly share this article via the links below:


Alfred Ajibola is a Medical Biochemist, a passionate Academician with over 7 years of experience, a Versatile Writer, a Web Developer, a Cisco Certified Network Associate and a Cisco CyberOps Associate.

Amazing facts in ICT

YouTube is a video-sharing platform which commenced operations on February 14, 2005 (Valentine's day). Three former PayPal employees -> Chad Hurley, Steve Chen and Jawed Karim created the YouTube service (as a dating app) until Google bought it in November 2006 for US$1.65 billion

Smoking near a Mac device - Len Academy

Smoking near an Apple (Mac) computer voids the warranty.

When you add /4 to the end of Facebook's URL, it will take you to Mark Zuckerberg.

You can try it on you own; or better still, try the link below:

Apple iPad retina - Len Academy

Apple iPad retina display is actually manufactured by Samsung


Computer hardware is the collection of physical parts of a computer system.

Physical parts of a computer are those parts that you can see and touch. It may also be referred to as the 'equipment of the computer'.

When the computer case is opened (with a screwdriver), one would see the different hardware components inside of it. It's important to state that some other hardware components are present outside the computer case; and these are termed peripherals.

Below are hardware components seen inside the computer case:

  • Motherboard

  • Central Processing Unit (CPU)

  • Graphics Processing Unit (GPU)

  • Power supply Unit (PSU)

  • Northbridge

  • Southbridge

  • Peripheral Component Interconnect (PCI) slots

  • Network Interface Card (NIC)

  • Random Access Memory (RAM)

  • Ventilation fans

  • Heat sink

  • Hard Disc Drive (external present)
  • Solid State Drive (SSD)

  • CMOS battery

  • Optical Disc Drives (external present)

  • USB port, PS2 port, Ethernet port and other ports

  • Expansion Ports / Slots

Please read more on computer hardware here

Hardware components seen outside the computer case are called peripherals. The peripherals are grouped into the following:

  1. Input devices: They provide information to the computer.

  2. Output devices: Brings out information from the computer.

  3. Storage devices: They store information or data.

Below are examples of some peripherals:

  • Keyboard (input)

  • Monitor (output)

  • Mouse (input)

  • Webcam (input)

  • Touch Pad (input)

  • Universal Serial Bus (USB) flash drive or memory card (storage)

  • Hard disc drive (storage)

  • Stylus (input)

  • Joystick(input)

  • Printer (output)

  • Speaker (output)

  • Headphones (output)