UDP
The User Datagram Protocol sends single messages between ports with no handshake and no delivery guarantee. Fast and simple, and the transport behind DNS, DHCP, QUIC and most amplification attacks.
- OSI layer
- 4 Transport
- Carried in
- IPv4 / IPv6
- Identified by
- IP protocol 17
- Wireshark filter
udp- Encrypted
- no
Packet structure
Select a field to see what it does.
How it works
UDP adds only ports, a length and a checksum to IP. Each datagram stands alone: no connection, no ordering, no retransmission, no flow control. The application handles what it needs (DNS retries, QUIC builds a whole reliable transport on top).
Firewalls and NAT still track UDP “connections” as flows: a reply from the right address and port within a timeout (often 30–180 s) is let back in.
UDP scan responses:
| Port state | Response to a datagram |
|---|---|
| Open | Application reply, or nothing if the probe was not valid for it |
| Closed | ICMP port unreachable (type 3 code 3) |
| Filtered | Nothing, or ICMP administratively prohibited |
Because “open” often looks like “filtered”, UDP scans are slow and nmap reports open|filtered.
In Wireshark
| Filter | Shows |
|---|---|
udp.port == 53 | One service |
udp && !dns && !mdns && !ssdp | UDP minus common noise |
udp.length > 1200 | Large datagrams (possible fragmentation, amplification responses) |
icmp.type == 3 && icmp.code == 3 | Closed UDP ports answering |
udp.checksum.bad | Bad checksums (if validation is enabled) |
quic | QUIC / HTTP/3 on UDP 443 |
udp.stream eq 3 | One flow (Follow › UDP Stream) |
What normal looks like: DNS to your resolvers, NTP, DHCP, mDNS/SSDP/LLMNR on the LAN, QUIC to big web services. Unusual high-port UDP to the internet can be VPNs, games, VoIP or tunnels.
Security notes
- Reflection and amplification DDoS: the attacker spoofs the victim’s IP as source and sends small requests to open servers whose answers are much bigger. Classic amplifiers: DNS (ANY, DNSSEC), NTP
monlist, memcached (UDP 11211), SSDP, CLDAP, Chargen. Fix: BCP 38 source filtering, no open resolvers or reflectors. - Spoofing is easy: no handshake means the source address is never verified.
- Scanning: slow and noisy (ICMP replies), but finds forgotten services like SNMP, TFTP and IPMI.
- Tunnels and exfiltration: DNS tunnels, VPNs (WireGuard, OpenVPN UDP) and custom protocols over UDP.
- Floods: UDP floods to random ports make the target answer with ICMP and saturate links.
Versions and related
- TCP: the reliable, connection-oriented alternative.
- QUIC (RFC 9000): encrypted, multiplexed transport over UDP, basis of HTTP/3.
- DTLS: TLS for UDP (VPNs, WebRTC).
- Common UDP protocols here: DNS, DHCP, IPsec NAT-T.
References
- RFC 768: User Datagram Protocol
- RFC 8085: UDP usage guidelines
- RFC 9000: QUIC
- CISA: UDP-based amplification attacks