Programming Methods: How to choose a packet size for UDP datagrams?

Disclaimer: This is not a how-to question. I would like to know more, as a reference, what are the actual actual practices that are actually used.

We know that UDP does not have PMTU discovery, such as TCP. Therefore, I see several approaches to avoid IP fragmentation using UDP:

  • Sending packets with 512 bytes (UDP approach)
  • reimplementation of some PMTU (using ICMP Fragmentation Required message).
  • Based on the local MTU (but how reliable is it, since UDP is not a connected protocol, how can it know which interface its packets will go through?)
  • others ...?

So I would like to have a “background” idea about which approaches are used by current UDP programs / protocols, especially with respect to conventional streaming / VoIP applications?

Thanks in advance,

Jocelyn

+3
source share
1 answer

A limit of up to 576 bytes is very common. Most Internet protocols, such as DNS, do this. Most real-time streaming protocols also use smaller packets, as it has the added benefit of providing lower serialization delay and less impact if one packet is lost.

, , PMTU (, DHCP ).

, 1500 , , . SNMP, , - .

DF , , .

+3

Source: https://habr.com/ru/post/1778312/


All Articles