Blame man/mtr-packet.8.in

Packit b802ec
.TH MTR-PACKET 8 "@VERSION@" "mtr-packet" "System Administration"
Packit b802ec
.HP 7
Packit b802ec
.SH NAME
Packit b802ec
mtr-packet - send and receive network probes
Packit b802ec
.SH DESCRIPTION
Packit b802ec
.B mtr-packet
Packit b802ec
is a tool for sending network probes to measure network connectivity and
Packit b802ec
performance.  Many network probes can be sent simultaneously by a single
Packit b802ec
process instance of
Packit b802ec
.B mtr-packet
Packit b802ec
and additional probes can be generated by an instance of
Packit b802ec
.B mtr-packet
Packit b802ec
which already has network probes in flight.  It is intended to be used
Packit b802ec
by programs which invoke it with Unix pipes attached to its standard input
Packit b802ec
and output streams.
Packit b802ec
.LP
Packit b802ec
.B mtr-packet
Packit b802ec
reads command requests from
Packit b802ec
.IR stdin ,
Packit b802ec
each separated by a newline character, and responds with command replies to
Packit b802ec
.IR stdout ,
Packit b802ec
also each separated by a newline character.  The syntactic structure of
Packit b802ec
requests and replies are the same.  The following format is used:
Packit b802ec
.LP
Packit b802ec
.RS
Packit b802ec
.I TOKEN
Packit b802ec
.I COMMAND
Packit b802ec
[\c
Packit b802ec
.I ARGUMENT-NAME
Packit b802ec
.I ARGUMENT-VALUE
Packit b802ec
\&...]
Packit b802ec
.RE
Packit b802ec
.LP
Packit b802ec
.I TOKEN
Packit b802ec
is a unique integer value.  The same value will be used as the
Packit b802ec
.I TOKEN
Packit b802ec
for the response.  This is necessary for associating replies with requests,
Packit b802ec
as commands may be completed in a different order than they are requested.
Packit b802ec
The invoker of
Packit b802ec
.B mtr-packet
Packit b802ec
should always use the
Packit b802ec
.I TOKEN
Packit b802ec
value to determine which command request has completed.
Packit b802ec
.LP
Packit b802ec
.I COMMAND
Packit b802ec
is a string identifying the command request type.  A common command is
Packit b802ec
.BR send-probe ,
Packit b802ec
which will transmit one network probe.
Packit b802ec
.LP
Packit b802ec
.I ARGUMENT-NAME
Packit b802ec
strings and
Packit b802ec
.I ARGUMENT-VALUE
Packit b802ec
strings always come in pairs.  It is a syntactic error to provide an
Packit b802ec
.I ARGUMENT-NAME
Packit b802ec
without a corresponding
Packit b802ec
.IR ARGUMENT-VALUE .
Packit b802ec
Valid
Packit b802ec
.I ARGUMENT-NAME
Packit b802ec
strings depend on the
Packit b802ec
.I COMMAND
Packit b802ec
being used.
Packit b802ec
.SH REQUESTS
Packit b802ec
.TP
Packit b802ec
.B send-probe
Packit b802ec
Send a network probe to a particular IP address.  Either an
Packit b802ec
.B ip-4
Packit b802ec
or
Packit b802ec
.B ip-6
Packit b802ec
argument must be provided.
Packit b802ec
A valid
Packit b802ec
.B send-probe
Packit b802ec
command will reply with
Packit b802ec
.BR reply ,
Packit b802ec
.BR no-reply ,
Packit b802ec
or
Packit b802ec
.BR ttl-expired .
Packit b802ec
.IP
Packit b802ec
The following arguments may be used:
Packit b802ec
.IP
Packit b802ec
.B ip-4
Packit b802ec
.I IP-ADDRESS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The Internet Protocol version 4 address to probe.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B ip-6
Packit b802ec
.I IP-ADDRESS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The Internet Protocol version 6 address to probe.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B protocol
Packit b802ec
.I PROTOCOL
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The protocol to use for the network probe.
Packit b802ec
.BR icmp ,
Packit b802ec
.BR sctp ,
Packit b802ec
.BR tcp ,
Packit b802ec
and
Packit b802ec
.B udp
Packit b802ec
may be used.  The default protocol is
Packit b802ec
.BR icmp.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B port
Packit b802ec
.I PORT-NUMBER
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The destination port to use for
Packit b802ec
.BR sctp ,
Packit b802ec
.BR tcp ,
Packit b802ec
or
Packit b802ec
.B udp
Packit b802ec
probes.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B local-ip-4
Packit b802ec
.I IP-ADDRESS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The local Internet Procol version 4 address to use when sending probes.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B local-ip-6
Packit b802ec
.I IP-ADDRESS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The local Internet Protocol version 6 address to use when sending probes.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B local-port
Packit b802ec
.I PORT-NUMBER
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
For
Packit b802ec
.B udp
Packit b802ec
probes, the local port number from which to send probes.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B timeout
Packit b802ec
.I TIMEOUT-SECONDS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The number of seconds to wait for a response to the probe before discarding
Packit b802ec
the probe as lost, and generating a
Packit b802ec
.B no-reply
Packit b802ec
command reply.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B ttl
Packit b802ec
.I TIME-TO-LIVE
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The time-to-live value for the Internet Protocol packet header used in
Packit b802ec
constructing the probe.  This value determines the number of network hops
Packit b802ec
through which the probe will travel before a response is generated by an
Packit b802ec
intermediate network host.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B size
Packit b802ec
.I PACKET-SIZE
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The size of the packet used to send the probe, in bytes, including the
Packit b802ec
Internet Protocol header and transport protocol header.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B bit-pattern
Packit b802ec
.I PATTERN-VALUE
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The packet payload is filled with bytes of the value specified.
Packit b802ec
Valid pattern values are in the range 0 through 255.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.IP
Packit b802ec
.B tos
Packit b802ec
.I TYPE-OF-SERVICE
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
In the case of IPv4, the "type of service" field in the IP header
Packit b802ec
is set to this value.  In the case of IPv6, the "traffic class"
Packit b802ec
field is set.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B mark
Packit b802ec
.I ROUTING-MARK
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The packet mark value to be used by mark-based routing.
Packit b802ec
(Available only on Linux.)
Packit b802ec
.HP 7
Packit b802ec
.TP
Packit b802ec
.B check-support
Packit b802ec
Check for support for a particular feature in this version of
Packit b802ec
.B mtr-packet
Packit b802ec
and in this particular operating environment.
Packit b802ec
.B check-support
Packit b802ec
will reply with
Packit b802ec
.BR feature-supported .
Packit b802ec
A
Packit b802ec
.B feature
Packit b802ec
argument is required.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B feature
Packit b802ec
.I FEATURE-NAME
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The name of a feature requested.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
Some features which can be checked are
Packit b802ec
.BR send-probe ,
Packit b802ec
.BR ip-4 ,
Packit b802ec
.BR ip-6 ,
Packit b802ec
.BR icmp ,
Packit b802ec
.BR sctp ,
Packit b802ec
.BR tcp ,
Packit b802ec
.BR udp ,
Packit b802ec
and
Packit b802ec
.BR mark .
Packit b802ec
The feature
Packit b802ec
.B version
Packit b802ec
can be checked to retrieve the version of
Packit b802ec
.BR mtr-packet .
Packit b802ec
.SH REPLIES
Packit b802ec
.TP
Packit b802ec
.B reply
Packit b802ec
The destination host received the
Packit b802ec
.B send-probe
Packit b802ec
probe and replied.  Arguments of
Packit b802ec
.B reply
Packit b802ec
are:
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B ip-4
Packit b802ec
.I IP-ADDRESS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The Internet Protocol version 4 address of the host which replied
Packit b802ec
to the probe.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B ip-6
Packit b802ec
.I IP-ADDRESS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The Internet Protocol version 6 address of the host which replied
Packit b802ec
to the probe.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B round-trip-time
Packit b802ec
.I TIME
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The time which passed between the transmission of the probe and its
Packit b802ec
response.  The time is provided as a integral number of microseconds
Packit b802ec
elapsed.
Packit b802ec
.HP 7
Packit b802ec
.TP
Packit b802ec
.B no-reply
Packit b802ec
No response to the probe request was received before the timeout
Packit b802ec
expired.
Packit b802ec
.TP
Packit b802ec
.B ttl-expired
Packit b802ec
The time-to-live value of the transmitted probe expired before the probe
Packit b802ec
arrived at its intended destination.  Arguments of
Packit b802ec
.B ttl-expired
Packit b802ec
are:
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B ip-4
Packit b802ec
.I IP-ADDRESS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The Internet Protocol version 4 address of the host at which the
Packit b802ec
time-to-live value expired.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B ip-6
Packit b802ec
.I IP-ADDRESS
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The Internet Protocol version 6 address of the host at which the
Packit b802ec
time-to-live value expired.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B round-trip-time
Packit b802ec
.I TIME
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
The time which passed between the transmission of the probe and its
Packit b802ec
response.  The time is provided as a integral number of microseconds
Packit b802ec
elapsed.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B mpls
Packit b802ec
.I MPLS-LABEL-LIST
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
A list of Multiprotocol Label Switching values returned
Packit b802ec
with the probe response.
Packit b802ec
If the
Packit b802ec
.B mpls
Packit b802ec
argument is present, one or more MPLS labels will be represented by
Packit b802ec
a comma separated list of values.  The values are provided in groups
Packit b802ec
of four.  The first four values in the list correspond to the
Packit b802ec
first MPLS label, the next four values correspond to the second MPLS
Packit b802ec
label, and so on.  The values are provided in this order:
Packit b802ec
.IR label ,
Packit b802ec
.IR experimental-use ,
Packit b802ec
.IR bottom-of-stack ,
Packit b802ec
.IR ttl .
Packit b802ec
.HP 7
Packit b802ec
.TP
Packit b802ec
.B no-route
Packit b802ec
There was no route to the host used in a
Packit b802ec
.B send-probe
Packit b802ec
request.
Packit b802ec
.TP
Packit b802ec
.B network-down
Packit b802ec
A probe could not be sent because the network is down.
Packit b802ec
.TP
Packit b802ec
.B probes-exhausted
Packit b802ec
A probe could not be sent because there are already too many unresolved
Packit b802ec
probes in flight.
Packit b802ec
.TP
Packit b802ec
.B permission-denied
Packit b802ec
The operating system denied permission to send the probe with the
Packit b802ec
specified options.
Packit b802ec
.TP
Packit b802ec
.B invalid-argument
Packit b802ec
The command request contained arguments which are invalid.
Packit b802ec
.TP
Packit b802ec
.B feature-support
Packit b802ec
A reply to provided to
Packit b802ec
.B check-support
Packit b802ec
indicating the availability of a particular feature.  The argument provided
Packit b802ec
is:
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.B support
Packit b802ec
.I PRESENT
Packit b802ec
.HP 14
Packit b802ec
.IP
Packit b802ec
In most cases, the
Packit b802ec
.I PRESENT
Packit b802ec
value will be either
Packit b802ec
.BR ok ,
Packit b802ec
indicating the feature is supported, or
Packit b802ec
.BR no ,
Packit b802ec
indicating no support for the feature.
Packit b802ec
.IP
Packit b802ec
In the case that
Packit b802ec
.B version
Packit b802ec
is the requested
Packit b802ec
.IR FEATURE-NAME ,
Packit b802ec
the version of
Packit b802ec
.B mtr-packet
Packit b802ec
is provided as the
Packit b802ec
.I PRESENT
Packit b802ec
value.
Packit b802ec
.HP 7
Packit b802ec
.IP
Packit b802ec
.SH EXAMPLES
Packit b802ec
A controlling program may start
Packit b802ec
.B mtr-packet
Packit b802ec
as a child process and issue the following command on
Packit b802ec
.IR stdin :
Packit b802ec
.LP
Packit b802ec
.RS
Packit b802ec
42 send-probe ip-4 127.0.0.1
Packit b802ec
.RE
Packit b802ec
.LP
Packit b802ec
This will send a network probe to the loopback interface.  When the probe
Packit b802ec
completes,
Packit b802ec
.B
Packit b802ec
mtr-packet
Packit b802ec
will provide a response on
Packit b802ec
.I stdout
Packit b802ec
such as the following:
Packit b802ec
.LP
Packit b802ec
.RS
Packit b802ec
42 reply ip-4 127.0.0.1 round-trip-time 126
Packit b802ec
.RE
Packit b802ec
.LP
Packit b802ec
This indicates that the loopback address replied to the probe, and the
Packit b802ec
round-trip time of the probe was 126 microseconds.
Packit b802ec
.LP
Packit b802ec
In order to trace the route to a remote host, multiple
Packit b802ec
.B send-probe
Packit b802ec
commands, each with a different
Packit b802ec
.B ttl
Packit b802ec
value, are used.
Packit b802ec
.LP
Packit b802ec
.RS
Packit b802ec
11 send-probe ip-4 8.8.8.8 ttl 1
Packit b802ec
.RS 0
Packit b802ec
12 send-probe ip-4 8.8.8.8 ttl 2
Packit b802ec
.RS 0
Packit b802ec
13 send-probe ip-4 8.8.8.8 ttl 3
Packit b802ec
.RS 0
Packit b802ec
\&...
Packit b802ec
.RE 0
Packit b802ec
.LP
Packit b802ec
Each interemediate host would respond with a
Packit b802ec
.B ttl-expired
Packit b802ec
message, and the destination host would respond with a
Packit b802ec
.BR reply :
Packit b802ec
.LP
Packit b802ec
.RS
Packit b802ec
11 ttl-expired ip-4 192.168.254.254 round-trip-time 1634
Packit b802ec
.RS 0
Packit b802ec
12 ttl-expired ip-4 184.19.243.240 round-trip-time 7609
Packit b802ec
.RS 0
Packit b802ec
13 ttl-expired ip-4 172.76.20.169 round-trip-time 8643
Packit b802ec
.RS 0
Packit b802ec
14 ttl-expired ip-4 74.40.1.101 round-trip-time 9755
Packit b802ec
.RS 0
Packit b802ec
15 ttl-expired ip-4 74.40.5.126 round-trip-time 10695
Packit b802ec
.RS 0
Packit b802ec
17 ttl-expired ip-4 108.170.245.97 round-trip-time 14077
Packit b802ec
.RS 0
Packit b802ec
16 ttl-expired ip-4 74.40.26.131 round-trip-time 15253
Packit b802ec
.RS 0
Packit b802ec
18 ttl-expired ip-4 209.85.245.101 round-trip-time 17080
Packit b802ec
.RS 0
Packit b802ec
19 reply ip-4 8.8.8.8 round-trip-time 17039
Packit b802ec
.RE 0
Packit b802ec
.LP
Packit b802ec
Note that the replies in this example are printed out of order.
Packit b802ec
(The reply to probe 17 arrives prior to the reply to probe 16.)
Packit b802ec
This is the reason that it is important to send commands with unique
Packit b802ec
token values, and to use those token values to match replies with
Packit b802ec
their originating commands.
Packit b802ec
.SH CONTACT INFORMATION
Packit b802ec
.PP
Packit b802ec
For the latest version, see the mtr web page at
Packit b802ec
.UR http://\:www.\:bitwizard.\:nl/\:mtr/
Packit b802ec
.UE
Packit b802ec
.PP
Packit b802ec
For patches, bug reports, or feature requests, please open an issue on
Packit b802ec
GitHub at:
Packit b802ec
.UR https://\:github\:.com/\:traviscross/\:mtr
Packit b802ec
.UE .
Packit b802ec
.SH "SEE ALSO"
Packit b802ec
.BR mtr (8),
Packit b802ec
.BR icmp (7),
Packit b802ec
.BR tcp (7),
Packit b802ec
.BR udp (7),
Packit b802ec
TCP/IP Illustrated (Stevens, ISBN 0201633469).