1 .\" $NetBSD: mtrace.8,v 1.2 2003/02/04 23:07:31 perry Exp $
3 .\" Copyright (c) 1995 by the University of Southern California
4 .\" All rights reserved.
6 .\" Permission to use, copy, modify, and distribute this software and its
7 .\" documentation in source and binary forms for non-commercial purposes
8 .\" and without fee is hereby granted, provided that the above copyright
9 .\" notice appear in all copies and that both the copyright notice and
10 .\" this permission notice appear in supporting documentation, and that
11 .\" any documentation, advertising materials, and other materials related
12 .\" to such distribution and use acknowledge that the software was
13 .\" developed by the University of Southern California, Information
14 .\" Sciences Institute. The name of the University may not be used to
15 .\" endorse or promote products derived from this software without
16 .\" specific prior written permission.
18 .\" THE UNIVERSITY OF SOUTHERN CALIFORNIA makes no representations about
19 .\" the suitability of this software for any purpose. THIS SOFTWARE IS
20 .\" PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
21 .\" INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
22 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
24 .\" Other copyrights might apply to parts of this software and are so
25 .\" noted when applicable.
27 .\" This manual page (but not the software) was derived from the
28 .\" manual page for the traceroute program which bears the following
31 .\" Copyright (c) 1988 The Regents of the University of California.
32 .\" All rights reserved.
34 .TH MTRACE 8 "May 8, 1995"
37 mtrace \- print multicast path from a source to a receiver
84 Assessing problems in the distribution of IP multicast traffic
87 uses a tracing feature implemented in multicast routers
89 version 3.3 and later) that is
90 accessed via an extension to the IGMP protocol. A trace query is
91 passed hop-by-hop along the reverse path from the
95 collecting hop addresses, packet counts, and routing error conditions
96 along the path, and then the response is returned to the requestor.
98 The only required parameter is the
100 host name or address. The default
102 is the host running mtrace, and the default
104 is "MBone Audio" (224.2.0.1), which is sufficient if packet loss
105 statistics for a particular multicast group are not needed. These two
106 optional parameters may be specified to test the path to some other
107 receiver in a particular group, subject to some constraints as
108 detailed below. The two parameters can be distinguished because the
110 is a unicast address and the
112 is a multicast address.
114 NOTE: For Solaris 2.4/2.5, if the multicast interface is not the default
115 interface, the -i option must be used to set the local address.
119 Send the trace query via unicast directly to the multicast router
121 rather than multicasting the query.
122 This must be the last-hop router on the path from the intended
129 Versions 3.3 and 3.5 of
131 will crash if a trace query is received via a
136 address. Therefore, do not use the
138 option unless the target
140 has been verified to be 3.4 or newer than 3.5.
146 as the local interface address (on a multi-homed host) for sending the
147 trace query and as the default for the
149 and the response destination.
152 Loop indefinitely printing packet rate and loss statistics for the
153 multicast path every 10 seconds (see
158 Always send the response using multicast rather than attempting
164 the maximum number of hops that will be traced from the
168 The default is 32 hops (infinity for the DVMRP routing protocol).
171 Print hop addresses numerically rather than symbolically and numerically
172 (saves a nameserver address-to-name lookup for each router found on the
176 Set the maximum number of query attempts for any hop to
181 Listen passively for multicast responses from traces initiated by
182 others. This works best when run on a multicast router.
185 Send the trace response to
187 rather than to the host on which
189 is being run, or to a multicast address other than the one registered
190 for this purpose (224.0.1.32).
193 Print a short form output including only the multicast path and not
194 the packet rate and loss statistics.
197 Change the interval between statistics gathering traces to
199 seconds (default 10 seconds).
204 (time-to-live, or number of hops) for multicast trace queries and
205 responses. The default is 64, except for local queries to the "all
206 routers" multicast group which use ttl 1.
209 Verbose mode; show hop times on the initial trace and statistics display.
212 Set the time to wait for a trace response to
214 seconds (default 3 seconds).
217 The technique used by the
219 tool to trace unicast network paths will not work for IP multicast
220 because ICMP responses are specifically forbidden for multicast traffic.
221 Instead, a tracing feature has been built into the multicast routers.
222 This technique has the advantage that additional information about
223 packet rates and losses can be accumulated while the number of packets
227 reverse path forwarding, the trace is run backwards from the
231 A trace query packet is sent to the last
232 hop multicast router (the leaf router for the desired
234 address). The last hop router builds a trace response packet, fills in
235 a report for its hop, and forwards the trace packet using unicast to
236 the router it believes is the previous hop for packets originating
239 Each router along the path adds its report and forwards the packet.
240 When the trace response packet reaches the first hop router (the router
241 that is directly connected to the source's net), that router sends the
242 completed response to the response destination address specified in
245 If some multicast router along the path does not implement the
246 multicast traceroute feature or if there is some outage, then no
247 response will be returned. To solve this problem, the trace query
248 includes a maximum hop count field to limit the number of hops traced
249 before the response is returned. That allows a partial path to be
252 The reports inserted by each router contain not only the address of
253 the hop, but also the ttl required to forward and some flags to indicate
254 routing errors, plus counts of the total number of packets on the
255 incoming and outgoing interfaces and those forwarded for the specified
257 Taking differences in these counts for two traces separated in time
258 and comparing the output packet counts from one hop with the input
259 packet counts of the next hop allows the calculation of packet rate
260 and packet loss statistics for each hop to isolate congestion
262 .SS Finding the Last-Hop Router
263 The trace query must be sent to the multicast router which is the
264 last hop on the path from the
268 If the receiver is on the local subnet (as determined using the subnet
269 mask), then the default method is to multicast the trace query to
270 all-routers.mcast.net (224.0.0.2) with a ttl of 1. Otherwise, the
271 trace query is multicast to the
273 address since the last hop router will be a member of that group if
274 the receiver is. Therefore it is necessary to specify a group that
275 the intended receiver has joined. This multicast is sent with a
276 default ttl of 64, which may not be sufficient for all cases (changed
280 If the last hop router is known, it may also be addressed directly
283 option). Alternatively, if it is desired to trace a group that the
284 receiver has not joined, but it is known that the last-hop router is a
285 member of another group, the
287 option may also be used to specify a different multicast address for the
290 When tracing from a multihomed host or router, the default receiver
291 address may not be the desired interface for the path from the source.
292 In that case, the desired interface should be specified explicitly as
295 .SS Directing the Response
298 first attempts to trace the full reverse path, unless the number of
299 hops to trace is explicitly set with the
301 option. If there is no response within a 3 second timeout interval
304 option), a "*" is printed and the probing switches to hop-by-hop mode.
305 Trace queries are issued starting with a maximum hop count of one and
306 increasing by one until the full path is traced or no response is
307 received. At each hop, multiple probes are sent (default is three,
310 option). The first half of the attempts (default is one) are made with
311 the unicast address of the host running
313 as the destination for the response. Since the unicast route may be
314 blocked, the remainder of attempts request that the response be
315 multicast to mtrace.mcast.net (224.0.1.32) with the ttl set to 32 more
316 than what's needed to pass the thresholds seen so far along the path
317 to the receiver. For the last quarter of the attempts (default is
318 one), the ttl is increased by another 32 each time up to a maximum of
319 192. Alternatively, the ttl may be set explicitly with the
321 option and/or the initial unicast attempts can be forced to use
322 multicast instead with the
324 option. For each attempt, if no response is received within the
325 timeout, a "*" is printed. After the specified number of attempts
328 will try to query the next hop router with a DVMRP_ASK_NEIGHBORS2
329 request (as used by the
331 program) to see what kind of router it is.
335 is in two sections. The first section is a short listing of the hops
336 in the order they are queried, that is, in the reverse of the order
341 For each hop, a line is printed showing the hop number (counted
342 negatively to indicate that this is the reverse path); the multicast
343 routing protocol (DVMRP, MOSPF, PIM, etc.); the threshold required to
344 forward data (to the previous hop in the listing as indicated by the
345 up-arrow character); and the cumulative delay for the query to reach
346 that hop (valid only if the clocks are synchronized). This first
347 section ends with a line showing the round-trip time which measures
348 the interval from when the query is issued until the response is
349 received, both derived from the local system clock. A sample use and
354 oak.isi.edu 80# mtrace -l caraway.lcs.mit.edu 224.2.0.3
355 Mtrace from 18.26.0.170 to 128.9.160.100 via group 224.2.0.3
356 Querying full reverse path...
357 0 oak.isi.edu (128.9.160.100)
358 -1 cub.isi.edu (128.9.160.153) DVMRP thresh^ 1 3 ms
359 -2 la.dart.net (140.173.128.1) DVMRP thresh^ 1 14 ms
360 -3 dc.dart.net (140.173.64.1) DVMRP thresh^ 1 50 ms
361 -4 bbn.dart.net (140.173.32.1) DVMRP thresh^ 1 63 ms
362 -5 mit.dart.net (140.173.48.2) DVMRP thresh^ 1 71 ms
363 -6 caraway.lcs.mit.edu (18.26.0.170)
364 Round trip time 124 ms
367 The second section provides a pictorial view of the path in the
368 forward direction with data flow indicated by arrows pointing downward
369 and the query path indicated by arrows pointing upward. For each hop,
370 both the entry and exit addresses of the router are shown if
371 different, along with the initial ttl required on the packet in order
372 to be forwarded at this hop and the propagation delay across the hop
373 assuming that the routers at both ends have synchronized clocks. The
374 right half of this section is composed of several columns of
375 statistics in two groups. Within each group, the columns are the
376 number of packets lost, the number of packets sent, the percentage
377 lost, and the average packet rate at each hop. These statistics are
378 calculated from differences between traces and from hop to hop as
379 explained above. The first group shows the statistics for all traffic
380 flowing out the interface at one hop and in the interface at the next
381 hop. The second group shows the statistics only for traffic forwarded
387 These statistics are shown on one or two lines for each hop. Without
388 any options, this second section of the output is printed only once,
389 approximately 10 seconds after the initial trace. One line is shown
390 for each hop showing the statistics over that 10-second period. If
393 option is given, the second section is repeated every 10 seconds and
394 two lines are shown for each hop. The first line shows the statistics
395 for the last 10 seconds, and the second line shows the cumulative
396 statistics over the period since the initial trace, which is 101
397 seconds in the example below. The second section of the output is
403 . ie \w'i'<>\w'm' \{\" looks like this is not proper Courier font
404 (If this example is not properly columned with a fixed-width font, get
412 Waiting to accumulate statistics... Results after 101 seconds:
414 Source Response Dest Packet Statistics For Only For Traffic
415 18.26.0.170 128.9.160.100 All Multicast Traffic From 18.26.0.170
416 | __/ rtt 125 ms Lost/Sent = Pct Rate To 224.2.0.3
417 v / hop 65 ms --------------------- ------------------
419 140.173.48.2 mit.dart.net
420 | ^ ttl 1 0/6 = --% 0 pps 0/2 = --% 0 pps
421 v | hop 8 ms 1/52 = 2% 0 pps 0/18 = 0% 0 pps
423 140.173.32.1 bbn.dart.net
424 | ^ ttl 2 0/6 = --% 0 pps 0/2 = --% 0 pps
425 v | hop 12 ms 1/52 = 2% 0 pps 0/18 = 0% 0 pps
427 140.173.64.1 dc.dart.net
428 | ^ ttl 3 0/271 = 0% 27 pps 0/2 = --% 0 pps
429 v | hop 34 ms -1/2652 = 0% 26 pps 0/18 = 0% 0 pps
431 140.173.128.1 la.dart.net
432 | ^ ttl 4 -2/831 = 0% 83 pps 0/2 = --% 0 pps
433 v | hop 11 ms -3/8072 = 0% 79 pps 0/18 = 0% 0 pps
435 128.9.160.153 cub.isi.edu
436 | \\__ ttl 5 833 83 pps 2 0 pps
437 v \\ hop -8 ms 8075 79 pps 18 0 pps
438 128.9.160.100 128.9.160.100
439 Receiver Query Source
442 Because the packet counts may be changing as the trace query is
443 propagating, there may be small errors (off by 1 or 2) in these
444 statistics. However, those errors should not accumulate, so the
445 cumulative statistics line should increase in accuracy as a new trace
446 is run every 10 seconds. There are two sources of larger errors, both
447 of which show up as negative losses:
453 If the input to a node is from a multi-access network with more than
454 one other node attached, then the input count will be (close to) the
455 sum of the output counts from all the attached nodes, but the output
456 count from the previous hop on the traced path will be only part of
457 that. Hence the output count minus the input count will be negative.
460 In release 3.3 of the DVMRP multicast forwarding software for SunOS
461 and other systems, a multicast packet generated on a router will be
462 counted as having come in an interface even though it did not. This
463 creates the negative loss that can be seen in the example above.
467 Note that these negative losses may mask positive losses.
469 In the example, there is also one negative hop time. This simply
470 indicates a lack of synchronization between the system clocks across
471 that hop. This example also illustrates how the percentage loss is
472 shown as two dashes when the number of packets sent is less than 10
473 because the percentage would not be statistically valid.
475 A second example shows a trace to a receiver that is not local; the
476 query is sent to the last-hop router with the
478 option. In this example, the trace of the full reverse path resulted
479 in no response because there was a node running an old version of
481 that did not implement the multicast traceroute function, so
483 switched to hop-by-hop mode. The \*(lqRoute pruned\*(rq error code
484 indicates that traffic for group 224.2.143.24 would not be forwarded.
488 oak.isi.edu 108# mtrace -g 140.173.48.2 204.62.246.73 \\
489 butter.lcs.mit.edu 224.2.143.24
490 Mtrace from 204.62.246.73 to 18.26.0.151 via group 224.2.143.24
491 Querying full reverse path... * switching to hop-by-hop:
492 0 butter.lcs.mit.edu (18.26.0.151)
493 -1 jam.lcs.mit.edu (18.26.0.144) DVMRP thresh^ 1 33 ms Route pruned
494 -2 bbn.dart.net (140.173.48.1) DVMRP thresh^ 1 36 ms
495 -3 dc.dart.net (140.173.32.2) DVMRP thresh^ 1 44 ms
496 -4 darpa.dart.net (140.173.240.2) DVMRP thresh^ 16 47 ms
497 -5 * * * noc.hpc.org (192.187.8.2) [mrouted 2.2] didn't respond
498 Round trip time 95 ms
501 Implemented by Steve Casner based on an initial prototype written by
502 Ajit Thyagarajan. The multicast traceroute mechanism was designed by
503 Van Jacobson with help from Steve Casner, Steve Deering, Dino
504 Farinacci, and Deb Agrawal; it was implemented in
506 by Ajit Thyagarajan and Bill Fenner. The option syntax and the output
509 are modeled after the unicast
511 program written by Van Jacobson.