3 .\" Documentation for pathmtu
5 .\" (c) 2008 Straylight/Edgeware.
8 .\"----- Licensing notice ---------------------------------------------------
10 .\" This file is part of Trivial IP Encryption (TrIPE).
12 .\" TrIPE is free software: you can redistribute it and/or modify it under
13 .\" the terms of the GNU General Public License as published by the Free
14 .\" Software Foundation; either version 3 of the License, or (at your
15 .\" option) any later version.
17 .\" TrIPE is distributed in the hope that it will be useful, but WITHOUT
18 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 .\" You should have received a copy of the GNU General Public License
23 .\" along with TrIPE. If not, see <https://www.gnu.org/licenses/>.
25 .\"--------------------------------------------------------------------------
26 .so ../common/defs.man \" @@@PRE@@@
28 .\"--------------------------------------------------------------------------
29 .TH pathmtu 1 "29 December 2008" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
31 .\"--------------------------------------------------------------------------
34 pathmtu \- discover path MTU to a given host
36 .\"--------------------------------------------------------------------------
58 .\"--------------------------------------------------------------------------
63 program discovers the size of the largest IP packet which can be sent to
66 (specified as a dotted-quad IP address or host name) without being
67 fragmented. This is useful information, particularly when setting up
68 VPN tunnel interfaces.
70 The program works by sending UDP packets and finding out whether they
71 get fragmented. The packets are sent to a specified
73 (specified as a number or service name) on the destination host. The
74 destination does not need to be listening on the given port \(en indeed,
75 it doesn't matter if the port is firewalled. The default port is 7
76 (echo), chosen because if it is active, we'll get an answer.
80 program attempts to find a correct answer even if ICMP
81 fragmentation-required packets are suppressed. It distinguishes between
82 the remote host dropping packets and an intermediate router failing to
83 report fragmentation-needed errors by sending a minimum-size packet and
84 seeing whether it gets any response to that.
88 program (currently) contains two different methods for MTU probing. One
89 uses the Linux-specific
93 socket options; this works fine even as an unprivileged user. The other
94 uses raw sockets, so it's fairly portable, but
96 must be installed setuid-root to work. (It attempts to create its raw
97 sockets as its first action \(en before processing the command line \(en
98 and drops privileges immediately afterwards, so the attack surface is
99 very tiny.) The raw sockets method is very slightly more robust:
100 specifically, it's much less likely to get confused by delayed errors.
102 Command-line options are as follows.
105 Writes a brief description of the command-line options available to
106 standard output and exits with status 0.
108 .B "\-V, \-\-version"
109 Writes tripe's version number to standard output and exits with status
113 Writes a brief usage summary to standard output and exits with status 0.
116 Look up hostnames only as IPv4 addresses.
119 Look up hostnames only as IPv6 addresses.
121 .BI "\-g, \-\-growth=" factor
122 Sets the retransmit interval growth factor. Each time a packet is
125 increases the amount of time it waits before retransmitting again by
128 The default growth factor is 3.
130 .BI "\-m, \-\-method=" name
131 Select the MTU probing method. The available methods are shown by
135 method is Linux-specific and might be confused by delayed errors under
136 some circumstances, but it's usable by unprivileged users; the
138 method is portable but requires
140 to be installed setuid-root.
142 .BI "\-r, \-\-retransmit=" interval
143 Sets the initial retransmit interval, in seconds. If no reply is
144 received to a probe within the interval, then a second packet is sent,
145 and the retransmit interval increased by the growth factor (see
147 The default initial retransmit interval is 0.333 seconds.
149 .BI "\-t, \-\-timeout=" timeout
150 Sets the time to wait for a reply, in seconds. If no reply or error is
151 received within the timeout, it is assumed that no reply will be
152 forthcoming. If we've ever received a reply from the remote host in the
155 assumes that a timeout indicates that the packet was too large, but the
156 ICMP fragmentation-required error was suppressed as a result of
157 administrative incompetence by someone responsible for an intermediate
160 sends a small packet to settle the question of where packets are being
161 dropped: if it doesn't receive a response to this packet either, then it
162 assumes that the timeout means that the remote host
164 receive the packet. The default timeout is 8 seconds.
166 .B "\-v, \-\-verbose"
167 Write a running human-readable commentary to standard error about the
168 progress of the operation. Usually,
170 does its job silently unless there are errors.
172 .BI "\-H, \-\-header=" header
173 Sets the packet header, in hexadecimal. If you set an explicit port
174 number, it may be worth setting the packet header too, so as not to
175 alarm anything which might be listening on that port. A sequence number
176 (in order to disambiguate replies) and some pseudorandom data are
177 appended to the header. The default header is empty.
179 .\"--------------------------------------------------------------------------
182 The whole business of probing path MTUs is rather unpleasant.
184 .\"--------------------------------------------------------------------------
187 Mark Wooding, <mdw@distorted.org.uk>
189 .\"----- That's all, folks --------------------------------------------------