title: UDP IP Fragmentation and MTU
body: <p>I'm trying to understand some behavior I'm seeing in the context of sending UDP packets.</p>
  
  <p>I have two little Java programs: one that transmits UDP packets, and the other that receives them. I'm running them locally on my network between two computers that are connected via a single switch.</p>
  
  <p>The MTU setting (reported by /sbin/ifconfig) is 1500 on both network adapters.</p>
  
  <ul>
  <li>If I send packets with a size &lt; 1500, I receive them. Expected.</li>
  <li>If I send packets with 1500 &lt; size &lt; 24258 I receive them. Expected. I have confirmed via wireshark that the IP layer is fragmenting them.</li>
  <li>If I send packets with size > 24258, they are lost. <strong>Not Expected.</strong> When I run wireshark on the receiving side, I don't see any of these packets.</li>
  </ul>
  
  <p>I was able to see similar behavior with ping -s. </p>
  
  <p><code>ping -s 24258 hostA</code> works but</p>
  
  <p><code>ping -s 24259 hostA</code> fails.</p>
  
  <p>Does anyone understand what may be happening, or have ideas of what I should be looking for?</p>
  
  <p>Both computers are running CentOS 5 64-bit. I'm using a 1.6 JDK, but I don't really think it's a programming problem, it's a networking or maybe OS problem.</p>