From the ip manual page (man 7 ip
), we read that the MTU may change over time.
When PMTU discovery is enabled, the kernel automatically keeps track of the path MTU per destination host. When it is connected to a specific peer with connect(2), the currently known path MTU can be retrieved conveniently using the IP_MTU socket option (e.g., after an EMSGSIZE error occurred). The path MTU may change over time. For connectionless sockets with many destinations, the new MTU for a given destination can also be accessed using the error queue (see IP_RECVERR). A new error will be queued for every incoming MTU update.
I'm thinking this is a rare event and can happen on devices I have no control over.
My environment is a local network of a few computers connected via a switch. I would imagine that the MTU is never going to change "by itself" in such an environment. Is that a correct assumption?