UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2018-09-07 08:09 AM

lamxuyen
Member
Registered: 2018-09-07
Posts: 1

How to aviud UDP fragmentation?

Hello!

I'm implementing some kind of discovery protocol in my program. It will be very simple, I only want to send peer's name and TCP port number over local multicast address using UDP. Now my question: is there any well-know minimum packet size, that will not be fragmented? I don't care about reliability, because I'm going to retransmit messages in some period of time. I only what to be sure that packet will be received all at once or not.

Offline

#2 2018-09-08 02:12 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,236

Re: How to aviud UDP fragmentation?

I think for IPv4 it's 512 bytes and for IPv6 it's 1280 bytes.

Edit: If using ethernet, the MTU is around 1500 bytes, say 1480 in case of VLAN tagging or other stuff going on.

Offline

Board footer

Powered by FluxBB