From owner-freebsd-questions@FreeBSD.ORG Tue Feb 9 21:28:26 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49270106566C for ; Tue, 9 Feb 2010 21:28:26 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id 311838FC08 for ; Tue, 9 Feb 2010 21:28:25 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KXL00JKQFNC7N30@asmtp030.mac.com> for freebsd-questions@freebsd.org; Tue, 09 Feb 2010 13:28:25 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-1002090213 From: Chuck Swiger In-reply-to: <560f92641002091259q4f4c0e3aq4c4b4696895c1f73@mail.gmail.com> Date: Tue, 09 Feb 2010 13:28:24 -0800 Message-id: <9AB1C572-BD43-450B-89DD-9674194CFF8F@mac.com> References: <560f92641002091241h65d4fb70sa7daafca885a2b1d@mail.gmail.com> <021E6C4C-4EDD-4683-B2F0-0F2FCAE18FFF@mac.com> <560f92641002091259q4f4c0e3aq4c4b4696895c1f73@mail.gmail.com> To: Nerius Landys X-Mailer: Apple Mail (2.1077) Cc: FreeBSD Mailing List Subject: Re: Max UDP packet size + Java: weirdness X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 21:28:26 -0000 On Feb 9, 2010, at 12:59 PM, Nerius Landys wrote: >> % sysctl net.inet.udp.maxdgram >> net.inet.udp.maxdgram: 9216 >> >> However, increasing it will guarantee that you will exceed even normal jumbo frame size and thus depend upon IP fragmentation / reassembly for the traffic. I don't consider that to be a good idea, but it might be OK for local traffic.... > > Wow thanks. So it normally fits in 1 IP packet? Normal use of UDP is for un-sequenced data which can fit entirely within a single packet, where some drops, out-of-order delivery, etc don't matter. (Classic example is realtime streaming, where stream-based guarantees that TCP makes is exactly what you don't want...) > (What about the MTU being like 1500 or something?) In that case, the most data per UDP packet you can send would be 1472 bytes. > What's wrong with fragmentation? Any links to explain this? If you're lucky, then it's simply much slower than using PMTU datasize. Anything in the path which does NAT, VPN tunnelling, IPsec, or the like is probably going to have to reassemble all of the fragmented packets, adjust IPs/etc for NAT or break them up again for the new MTU for the case of tunnels, refragment the packets, redo checksums, etc. Google is your friend; the first few links like: http://en.wikipedia.org/wiki/IP_fragmentation http://www.nil.si/ipcorner/IP_Fragmentation If you're not lucky, an intermediate router or firewall will simply drop the traffic entirely; maybe you will see an ICMP message, or maybe not, but it will be up to the app to deal with retransmitting the data using smaller sizes. Regards, -- -Chuck