UDP Max Datagram Size

  • Under "System Tunables" there is a setting for the maximum outgoing UDP datagram size.  TCP has both send and receive settings, but UDP only has send.

    net.inet.udp.maxdgram->Maximum outgoing UDP datagram size->default (57344)

    I have a VOIP server behind PFSense that will send UDP based notify packets out to remote phones.  At times, these packets are large because of the amount of information the server is trying to tell the phone.  I've seen 35000 byte UDP packets sent from the server that have been broken up into 24 fragments @ 1480 byte payloads.  The far end doesn't always receive the all of the fragments, because I have packet reassembly timeout messages in some of the far end firewalls (non PFS) and the phones are not showing all the info they should.  I am still trying to verify what exactly the far end does see and what is making it there before making any other assumptions.

    Still, I am trying to figure out what will happen when a huge UDP datagram is forwarded through the PFSense.

    Is there a limit to the receive datagram size of UDP? 
    Is there a limit to the maximum amount of fragments for a single packet PFSense will accept?
    If the maximum size of a UDP datagram is 65535, why is the PFS default 57344?
    Does PF scrubbing have any impact on UDP packets through the PFS?

  • 32,000 byte UDP packet?! Sounds like some really crappy software. A single dropped fragment requires the entire message to be resent. Even worse is that UDP has no rate limit, so the fragments are created at line rate on the sending machine, further increasing the chance of a drop. If you only have a 16KB buffer and the link isn't line rate on the egress side, you'll probably have a pathological case of always having dropped packets and they never get through.

  • Well it's true the software was more designed to be used in a LAN environment, but it also is supposed to support remote phones with features, which ends up creating these huge packets.

    But my application aside, I am still curious what happens when a big packet hits the PFSense.