Sheesh, since it's "not hard" it would be nice if you'd do it.
[I can probably dig around to find the data, but I assumed someone there would have it at their finger tips and save me a lot of guessing and many minutes digging.]
Since that isn't happening, [thanks for nothing MikroTik] here is what I have found after a lot of digging, and it doesn't agree with the numbers from Mikrotik.
According to Cisco's docs, depending on the type of encryption, a different number of bytes will be added to the packet.
Here's what they list:
esp-aes-(256 or 192 or 128) esp-sha-hmac or md5: 73
esp-aes (256 or 192 or 128): 61
esp-3des, esp-des: 45
esp-(des or 3des) esp-sha-hmac or md5: 57
esp-null esp-sha-hmac or md5: 45
ah-sha-hmac or md5: 44
So, figure you start with 1500 bytes maximum packet size.
1500
Subtract 20 bytes for the IP Header
Then the packet will get wrapped by IPSec
Subtract the varying number of bytes above. In my case, with AES-256+SHA1 that would be 73 bytes. [It's the same size and combination of AES25 or AES or AES128 and, SHA1 or MD5]
So, provided my calculations are right, that leaves a internal packet size of 1407 bytes.
Let me show that again:
1500
-20 (header)
-73 (IPSec header+padding, AES256|AES192|AES128 + SHA1|MD5)
1407 Total remaining
[My test show 1410 byte pings pass without fragmentation.]
If you're using 3DES + SHA1|MD5 it would be
1500
-20 (header)
-57 (IPSec header+padding, 3DES + SHA1|MD5)
1423 Total remaining
[If you're using a GRE tunnel, take out 31 more bytes - that's "non tunnel mode" in RoS, I think.]
However this size didn't help me, so I'd guess there's something missing here.
I set my MSS to 1400 and it would still fail even when 1410 bytes should not get fragmented.
Setting it to 1350 resolved the problem.
I simply didn't have time to test another half a dozen MSS sizes until I got just the "right" one. While I'd love to know the exact size, and 1350 is slightly less efficient than 1400, I will live with it this way.
I'd guess there's some calculation here that's in error, though I don't know what.
I'm glad to have anyone correct these, but from my searching this is the best data I was able to obtain.
It should be obvious, but for those for whom it's not...The above only applies to IPv4, not IPv6.
Keywords:
IPSec MTU MSS fragmentation packet size MRU AES256 AES-256 SHA1 MD5 IPSec Tunnel