IPv6 Path MTU Discovery
Packets sent through an IP network are sometimes too large to traverse a given link because of the maximum transmission unit (MTU) of that link. In such cases, IPv4 packets are fragmented by the forwarding router unless the “Do Not Fragment” bit is set. On the contrary, IPv6 packets are not fragmented except by the source node. Instead, the packet is discarded by the forwarding router, which sends an Internet Control Message Protocol, version 6 (ICMPv6), Type 2 (Packet Too Big) message to the source node, which contains the MTU size of the link that caused the packet drop.
IPv6 Path MTU (PMTU) Discovery allows the source node to adjust its MTU for a destination by examining the MTU sizes reported in the ICMPv6 Type 2 error messages. This way, packet transmissions occur using the highest MTU size without causing packet drops at intermediate routers.
A timer controls the lifespan of the PMTU for a given destination. This way, if the path to a destination switches to another path that has a better Path MTU, due to changes in the network, the source node can eventually improve its MTU for that destination to the newer value. The duration of the timer can be set using the following attributes depending upon the source node type:
- Routers: IP > IPv6 Parameters > Path MTU Expiry Timer
- Hosts: IP > IP Host Parameters > Path MTU Expiry Timer
The default value of the timer is 600 seconds. After this timer expires, or if the egress interface changes on the source node, the process of PMTU discovery starts again.
TCP and HAIPE protocols also keep track of the IPv6 path MTU and use it instead of link MTU for IPv6 transmissions. These protocols are informed of all changes in IPv6 path MTU sizes.
To see an example of the use of this feature, see the “path_mtu_discovery” scenario in the IPv6 example project.