SonicWall uses UDP packet for PMTU discovery using random source and destination port numbers.
The packets contain IP Header of 20 bytes + UDP header of 8 bytes + UDP payload
The UDP payload is (MTU set on the WAN interface (IP 20 + UDP 8 bytes) ). For example, if MTU set on the WAN interface is 1500: the UDP payload would be 1472
Each packet has a TTL starting with 1 and incremented by 1 on each hop.
This will force each device on the path to send back an ICMP TTL expired packet thus allowing the SonicWall to determine the IP address of each device on the path.
If a device on the path has a smaller MTU, the device drops the packet and sends an ICMP Fragmentation Needed Type 3 Code 4 packet back to the SonicWall with its MTU size.
The SonicWall resends the packet with the payload adjusted to match the MTU size sent by the device. For example, if the device sends an MTU size of 1404 to the SonicWall, the SonicWall resends the packet with the UDP payload reduced to 1376 bytes.
If another device along with path drops the packet and sends a ICMP Fragmentation Needed packet with a even lower MTU, the SonicWall reduced the UDP payload further. For example, the second device to drop the packet sends an MTU of 1376, the SonicWall reduces the UDP payload further to 1348 bytes.
If no further ICMP Fragmentation Needed packets are received, the tool will display Discovered Path MTU is 1376.
If none of the devices along the path drop the packet, the destination device will send back an ICMP Destination unreachable (Port unreachable) packet to the SonicWall.
If none of the devices along the path drop the packet, the SonicWall will then determine that the MTU is whatever set on the WAN interface.