.\"
.\" FIXME: Document IP_MINTTL, added in Linux 2.6.34
.\"
-.TH IP 7 2010-10-24 "Linux" "Linux Programmer's Manual"
+.TH IP 7 2011-09-22 "Linux" "Linux Programmer's Manual"
.SH NAME
ip \- Linux IPv4 protocol implementation
.SH SYNOPSIS
.\" Precisely: 2.1.124
Set or receive the Path MTU Discovery setting for a socket.
When enabled, Linux will perform Path MTU Discovery
-as defined in RFC\ 1191
-on this socket.
-The don't-fragment flag is set on all outgoing datagrams.
-The system-wide default is controlled by the
-.I /proc/sys/net/ipv4/ip_no_pmtu_disc
-file for
+as defined in RFC\ 1191 on
.B SOCK_STREAM
-sockets, and disabled on all others.
+sockets.
For
.RB non- SOCK_STREAM
-sockets, it is the user's responsibility to packetize the data
-in MTU sized chunks and to do the retransmits if necessary.
-The kernel will reject packets that are bigger than the known
-path MTU if this flag is set (with
-.B EMSGSIZE
-).
+sockets,
+.B IP_PMTUDISC_DO
+forces the don't-fragment flag to be set on all outgoing packets.
+It is the user's responsibility to packetize the data
+in MTU-sized chunks and to do the retransmits if necessary.
+The kernel will reject (with
+.BR EMSGSIZE )
+datagrams that are bigger than the known path MTU.
+.B IP_PMTUDISC_WANT
+will fragment a datagram if needed according to the path MTU,
+or will set the don't-fragment flag otherwise.
+
+The system-wide default can be toggled between
+.B IP_PMTUDISC_WANT
+and
+.B IP_PMTUDISC_DONT
+by writing (respectively, zero and nonzero values) to the
+.I /proc/sys/net/ipv4/ip_no_pmtu_disc
+file.
+
.TS
tab(:);
c l
l l.
-Path MTU discovery flags:Meaning
+Path MTU discovery value:Meaning
IP_PMTUDISC_WANT:Use per-route settings.
IP_PMTUDISC_DONT:Never do Path MTU Discovery.
IP_PMTUDISC_DO:Always do Path MTU Discovery.
.BR connect (2),
the currently known path MTU can be retrieved conveniently using the
.B IP_MTU
-socket option (e.g., after a
+socket option (e.g., after an
.B EMSGSIZE
error occurred).
-It may change over time.
+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