MTU "caching"

Hi all,
I’m experimenting how various MTU sizes are managed by my network provider (MPLS).
I picked-up a generic routerboard device, connected to one of my branch offices and tried to ping a remote destination using 1501 bytes with DF bit set.
As supposed, local provider’s router rejects such packets.

The “strange” issue is that ONLY the first icmp is sent to the router and then refused.
Subsequents ICMPs don’t even leave the MK device: it’s MK itself to reply that “fragmentation is needed but DF set”

If I change routerboard’s IP address (it’s dynamic, so I just do a release/renew) , then again first ping is sent to router, while others never leave out the router.
It seems to me that mikrotik (or just the PING utility) has some “MTU cache” table checked even before sending out packets. Such cache gets cleared when IP stack is reloaded.
The question is: does it make sense? Is there a way to “see” such table and to force discard? Is it hard-coded into OS or it’s just a matter of PING util?

Is any one out there who knows how this works?
TIA

Routerboard has a linux kernel version 3 underlying it.

I don’t really remember if linux was having the same behaviour now than then (a few things around route caching have changed), but the current behaviour is:

    • linux does path MTU discovery as needed (on receipt of ICMP fragmentation needed messages typically).
  • typically TCP packets are sent with DF bit set, so they trigger “fragmentation needed” messages early
  • for UDP it depends on how the socket was created
  • the results are cached during ~10 minutes. Can be seen in $ ip route get $ADDRESS, if the output ends with something like “cache expires 589sec mtu 1404”

Routerboard does not offer much information about route cache (see /ip route cache print or /ip route check $ADDRESS) so I don’t think it can be easily found out, but I’m not really expert here.

That is correct, this information is stored in the route cache.
Current Linux kernel does not have that anymore, so this behavior is going to change when/if RouterOS v7 is released.

Thanks both for your answer, they confirm what I experienced.
This evening will try @home with my linux machines.

P.S.
pe1chl is it your site pe1chl.nl.eu.org

Yes this is one of my systems with a small number of files on it.

OK, we share the same hobby
73