NEPacketTunnelProvider virtual interface MTU

Hi everyone,

We are working on creating a virtual network interface using NEPacketTunnelProvider, with an MTU of 1500 bytes.

I would like to understand what will happen if we attempt to write packets of approximately 65,000 bytes to this interface. Specifically, will the packets be fragmented based on protocol and flags, will they be dropped, or is there another unexpected behaviour we should anticipate?

Thanks

Answered by DTS Engineer in 820081022

I would expect this to behave like any other network interface:

  • If the sender has opted out of fragmentation (IP_DONTFRAG), the system will drop the packet.

  • If not, it’ll fragment it.

Best practice is for the sender to avoid IP-level fragmentation, which typically means that it’ll limit its sends based on the path MTU.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Missed mentioning this is for iOS.

I would expect this to behave like any other network interface:

  • If the sender has opted out of fragmentation (IP_DONTFRAG), the system will drop the packet.

  • If not, it’ll fragment it.

Best practice is for the sender to avoid IP-level fragmentation, which typically means that it’ll limit its sends based on the path MTU.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

NEPacketTunnelProvider virtual interface MTU
 
 
Q