traceproto(8)

NAME

Traceproto - trace the route to a destination using a
specified protocol and port

SYNOPSIS

traceproto  [-cCTfAhvR]  [-p  protocol]  [-d dst_port] [-D
max_dst_port] [-s src_port] [-S max_src_port]  [-m  min_ttl]  [-M
max_ttl] [-w response_timeout] [-W send_delay] [-a account_level]
[-P    payload_size]    [-F    interface]    [-k    skips]    [-I
consecutive_trace_count]  [-H  packets_per_hop] [-i incr_pattern]
[-o output_style] [-t tcp_flags]

DESCRIPTION

traceproto is a replacement for the venerable traceroute.
It serves the same function, to determine the path that traffic
takes between the current host and a remote system. Like
traceroute it uses the IP time-to-live (TTL) field and watches
for the return ICMP packets from each successive gateway. In the
current Internet environment with ubiquitous firewalls and traf
fic filtering it is no longer enough to assume that if some traf
fic is getting to the remote machine that all of it is.
traceproto is an improvement to traceroute in this regard as it
lets you select the protocol and destination port to trace to.

OPTIONS

-p protocol
The protocol to use. The current options are tcp,
udp, and icmp with tcp as the default.
-d dst_port
The destination port to trace to. If -i is set to
'd' or 'D' then this is the minimum destination port. The de
fault value is 80 (HTTP).
-D max_dst_port
The maximum destination port. -i needs to be set
to 'd' or 'D' for this to have an effect.
-s src_port
The port to use as the local source port. If -i is
set to 's' or 'S' then it is the minimum source port. The de
fault is 10240.
-S max_src_port
The port to use as the maximum local source port.
-m min_ttl
Specifies the minimum time-to-live setting to use.
This sets how many hops away to start tracing. (For example, if
the first hop is a firewall that will not respond with an ICMP
TIME_EXCEEDED message but will allow packages through from hops
that are further away, you can set the min_ttl to 2 and thereby
avoid having to wait for the packets that timeout at the first
hop.) The default is 1.
-M Max_ttl
Specifies the maximum time-to-live setting. This
is the limit for how many hops away to trace. The default is 30.
(Very few locations on the Internet will be further away than
this.)
-w wait_timeout
The timeout in seconds to wait for a return packet.
The default is 5 seconds.
-W send_delay
The timeout before sending a new packet in mil
liseconds. The default is 100 milliseconds.
-a account_level
If accounting is enabled (ie. account_level set to
> 0) traceproto will print statistics after the run is complete
detailing minimum return time in milliseconds, average return
time in milliseconds, maximum return time in milliseconds, number
of packets returned successfully, and the number of packets that
generated no response. Possible account_levels:
0 No accounting printed.
1 Only the totals for all of the hops combined are
printed.
2 Stats are shown for each individual hop as well
as the total (this is the default).
Note that the -C flag will run traceproto in con
tinuous mode, restarting from scratch at the end of each run and
will generate stats after each run. Note also that CTRL-C will
abort the run, printing the stats at whatever level is specified
with -a and will abort traceproto. CTRL-Z will cause traceproto
to print the stats but does not abort the run.
-T Print timestamps with the output.
-P payload_size
This option specifies the payload size in bytes.
Currently the payload is filled with ' 's, though this may change
in the future. A word of caution, traceproto seems to have prob
lems with certain combinations of payload size and protocol, es
pecially udp with payloads of under 12 bytes. Hence the default
payload is 12 bytes. The cause of this has yet to be determined.
-k skips
Allows the user to specify a comma separated list
of hops to skip by number (ie. -k 5 will cause traceproto to
skip sending packets with a ttl of 5, going from 4 to 6). This
allows the user to skip a hop that is know to not respond, re
sponds slowly, or that should be avoided for some reason. The
skip list only allows comma separated hops at this point, not
ranges. Spaces in the list will also cause problems. Note that
-k 1 is functionally analogous to -m 2.
-c Trace continuously. This causes traceproto to re
set its counters and begin the trace from scratch once run has
been completed. Useful for finding intermittent problems and for
noting hops that use packet based routing (ie. the route used
for the packet may change from one packet to the next even during
the same connection). See also -C.
-C If -c is set, this prints the accumulated stats at
the end of each run. Meaningless unless -c is set.
-I consecutive_trace_count
Like -c and -C, -I does a continuous trace but un
like -c and -C, it only does consecutive_trace_count iterations.
-H packets_per_hop
This allows the user to specify the number of pack
ets sent out for each increment of the TTL. This must be a num
ber between 1 and 10. The default is 3 packets per hop.
-f Set the don't-fragment bit in the IP header. Can
be used in conjunction with the -P flag to determine at which hop
the MTR changes.
-F interface
Specify the network interface to use. Note that it
is quite possible to specify the wrong interface needed to reach
the target.
-A Do Autonomous System number lookups.
-i port_incr_pattern
This flag governs the source and destination incre
ment patterns. The pattern is a combination of one or two let
ters from the set [sSdDnN] where the meanings are:
s decrement the source port with each packet
S increment the source port with each packet (the
default for the source port)
d decrement the destination port with each packet
D increment the destination port with each packet
n use a static source port
N use a static destination port (the default for
the destination port)
Note that if contradictory options are given, the
last one seen is used (ie. -i Ss is the same as -i s). Note al
so that -i nN may cause traceproto problems in determining which
response is for which packet.
-o output_style
The default output style is designed to be reason
able legible and space conscious. There are other output styles
available:
s the standard output (default). Prints the hop
number, the response protocol and type, the response machine name
if available, and the response IP address on the first line. The
next line is a list of the response times as they arrive.
g graphical output. The first line is the same as
the standard output, but the response time is printed one line
per response with a variable length ascii bar indicating the rel
ative response time.
c classic output. An output style (almost) identi
cal to the original traceroute.
n no individual hop output. Stats will still print
at whatever level is set. (Note that -o n -a 0 is possible, but
silly.)
m minimal output. Prints the hop number and a sin
gle character indicating the response type. Response times are
not noted.
p scriptable output. Prints the hop number, ip,
return packet type, and time for each packet sent.
C (n)curses output.
-t flags
Sets the tcp flags to use.
S SYN (default)
A ACK
R RST
U URG
P PUSH
F FIN
E ECE
C CWR
Use -t SEC to test connections with Explicit Con
gestion Notification enabled.
-R Reverse trace. Starts at the max TTL and decre
ments the TTL for each hop.
-h A brief usage message summarizing the options.
-v Version info.

USAGE

The easiest way to invoke traceproto is simply to give it
a target machine by name or IP address. The default behavior is
to trace using tcp and destination port 80. Given the current
state of the Internet this is the most likely to succeed though
it certainly won't be appropriate for every situation.
traceproto assumes that the user has some understanding of
the protocols involved; users who are unfamiliar with them may
find that traceproto's options or output are hard to decipher.
Information on how the protocols function is widely available on
the Internet and is recommended reading for the traceproto user.
There are a fair number of options for traceproto and
there will probably be even more in the future. Many are contra
dictory or illogical in combination, but unless a combination is
actually problematic, traceproto will usually allow it to be
specified. Combinations that are illogical are generally ignored
in a sensible manner; contradictions are usually resolved using
the option furthest to the right on the command line.

ENVIRONMENT

There are a number of environmental variables that can be
set to effect traceproto's behavior. These variables override
the default behavior; in turn they are themselves are overridden
by their equivalent command line flags.
TP_TIMESTAMP_STYLE
Sets the format for the time-stamp printed by the
-T flag. Note that there is no equivalent command line flag for
this variable.
std The std day/alpha-month/year:hour:minute:second
format.
us US Style date of numeric
month/day/year:hour:minute:second format.
descend Descending time format:
year/month/day:hour:minute:second.
epoch Number of seconds since the unix epoch.
TP_DEFAULT_IF
Sets the default interface. Is overridden by the
-F flag. Setting this variable causes traceproto to print a mes
sage about which interface it is using, since traceproto will at
tempt to send the traces out that interface whether or not it is
the correct interface needed to reach the specified destination.
TP_OUTPUT_STYLE
Sets the default output style for traceproto. Is
overridden using the -o flag.
std The standard output style. The same as '-o s'.
graphical The graphical output style. The same as
'-o g'.
classic The classic output style. The same as '-o
c'.
none No output. The same as '-o n'.
minimal Minimal output. The same as '-o m'.
scriptable Output suitable for use in scripting.
The same as '-o p'.
curses (N)Curses output. The same as '-o C'.
RA_SERVER
and
TP_RA_SERVER
Sets the default server to to Autonomous System
number lookups. Mimics the NANOG traceroute behavior.

SEE ALSO

traceroute(8), hping2(8), tcptraceroute(1), mtr(8),
lft(8).

BUGS

None known at this time. Please report any bugs found.
traceproto March 12 2005
Copyright © 2010-2025 Platon Technologies, s.r.o.           Index | Man stránky | tLDP | Dokumenty | Utilitky | O projekte
Design by styleshout