For IPv6, only the endpoint nodes can fragment a packet. Path
MTU discovery determines the largest packet that can be sent to a
destination without requiring fragmentation by an intermediate node
(because that is not supported). In some cases, an application might want to avoid path MTU discovery. All nodes in an IPv6
network are required to support a minimum MTU of 1280 bytes. When
an application enables this option, path MTU discovery is bypassed.
If a direct route to the destination is not available, the minimum
MTU size (1280 bytes) is used to send packets that otherwise might
require fragmentation. If a direct route is available, the link's
MTU size is used, because path MTU discovery is not needed when there
are no intermediate nodes in the path. For unicast
destinations, this option is disabled by default, which avoids sending
packets with the minimum MTU size. Instead, path MTU discovery information
is used.
For multicast destinations, this option is
enabled by default, which prevents path MTU discovery information
from being used. If a direct route is not available, packets are sent
with the minimum MTU size. If a direct route is available, packets
are sent by using the MTU of the link because no intermediate nodes
are in the path.
This option can be enabled or disabled for
the following cases:
- A socket with a setsockopt()
- A single send operation with ancillary data on the sendmsg()
A value of -1 passed on the set socket option causes the default
values for unicast and multicast destinations to be used.
A
value of 0 disables this option for both unicast and multicast destinations.
Path MTU discovery information is used to send packets greater than
the minimum MTU size.
A value of 1 enables this option for unicast
and multicast destinations. All packets are sent without using path
MTU discovery information, using the minimum MTU size, unless a direct
route is available to the destination.
A getsockopt() with this
option returns the value set by a setsockopt(). If a setsockopt()
has not been done, the default value of -1 (disabled for unicast,
enabled for multicast) is returned.