views:

294

answers:

3

I have proprietary application sending out multicast packet to the network. It is running on the linux with NIC MTU 1500.

And then I write a simple java program to using MulticastSocket class to receive message. I found it is DatagramPacket size is ~7900. The receiver program is running on the linux with NIC MTU 1500.

I rewrite the program in C and using recvfrom() call, but the result is the same.

I don't understand why? is it packet size limited by NIC MTU? or can it be override by the program?

+1  A: 

I would guess that you are testing on the machine where the proprietary service is running. In that case, the linux box will let them communicate over the local loopback device, which has a MTU of 64k.

soulmerge
The receiver is running on another linux server, not the same server with the sender program
Eric Yung
Forgot to add to the answer: The process would need to call setuid or setgid to be able to change the MTU, but it is possible.
soulmerge
A: 

is it possible the kernel fragment the packet and assemble int the receiving side?

http://stackoverflow.com/questions/900697/how-to-find-the-largest-udp-packet-i-can-send-without-fragmenting/900702

However, is it anyway to know the packet is fragmented?

Eric Yung
please don't post additional information as an answer. you can modify your original question.
JimB
thanks JimB, I will do that next time.
Eric Yung
+2  A: 

Fragmentation and reassembly happen at the IP layer, which is beneath the UDP protocol, so it's essentially hidden from view. You can test for fragmentation by setting the 'do not fragment' flag on varying packet sizes.

JimB