CTRACE(1)

NAME
ctrace

SYNOPSIS
ctrace [options]

The only required option is -t target. The target may be specified as a hostname or IPv4 address.

DESCRIPTION
ctrace is an IPv4 traceroute tool that supports many features missing in standard 4.3BSD traceroute(8). It is programmed entirely in perl.

The primary difference between ctrace and other traceroute tools is its ability to trace routes in multiple protocols. ctrace also has some additional nifty features: Automatic round-trip-time (RTT) averaging, which makes output cleaner and more intelligible. One or more packets can be launched per TTL/hop. By way of contrast, 4.3BSD traceroute(8) forces at least two. This capability makes ctrace faster. 4.3BSD traceroute(8) emulation option, so that ctrace will hook in to existing parsers. The ability to skip an arbitrary number of hops, saving you time that would be normally wasted tracerouting your own network. Fine-grained control over trace packet headers, assisting in bypassing burdensome packet filters.

OPTIONS
Disable RTT averaging mode. RTT averaging mode shows one `ms/avg.' RTT per hop instead of seeing a collection of 4.3BSD traceroute(8)-like `ms' RTT values. This option has no effect if -q is set to 1. ICMP message code. An integer in the range 0-255 is expected. The default value for this field is 0. This option affects ICMP traces only (see -p option). Destination port number. The default value is 53. A value of 0 means that destination ports will be generated at random. This option affects TCP and UDP traces only (see -p option). Failing failhops consecutive hops will cause the program to abort. This is useful for preventing lengthy max-TTL timeout situations where packet filters are blocking further progress. In mass-traces of unknown networks, it drasitically improves speed. The default value is 2. Display command line help. This is also displayed if the -t argument is ommitted. ICMP message type. An integer in the range 0-255 is expected. The default value for this field is 8. This option affects ICMP traces only (see -p option). Start on the jumphops'th hop (ie: initilise the TTL to jumphops). This is useful for saving the time you waste mapping the first few hops (you and your ISP's networks) thousands of times over. The default is not to jump. Max time to live (TTL). This is the maximum number of hops that you want to make before giving up on reaching your target. The default value is 35. `Numeric mode'. In this mode, the program will not use DNS to resolve host names. The output in this mode is supposed to be compatible with 4.3BSD traceroute(8)'s -n mode. `Oldschool mode'. ctrace will emulate 4.3BSD traceroute(8) output almost perfectly. The only present differences from 4.3BSD traceroute(8) are that packet size is always reported as 40 bytes (irrespective of the protocol and options selected), and that ctrace will still allow -q of 1 (minimum 4.3BSD traceroute(8) is 2). Oldschool mode negates -v and implies -a. The protocol to conduct the trace with. Valid values are icmp, tcp and udp. The default value is udp. More protocols will probably be added in the future. The number of queries (packets) to send per hop. Packets are dispatched one at a time, so increasing this number will slow down yout trace. One seems to be sufficient for most cases, three is the recommended maximum. The default value is one. Source port number. The default value of 0 means that source ports will be generated at random. This option affects TCP and UDP traces only (see -p option). This is the target host of your trace. It can either be specified as a hostname, or an IPv4 address. Verbose mode. Displays additional information on ctrace's status. This feature is mainly used for debugging. This option is incompatible with -o (oldschool) mode, and will be disabled if both are specified. The time in seconds to wait for responses to packets before assuming that they will never come. The default value is 3. Enables exit-reporting mode. A human-readable summary of the exit condition will be printed to STDERR prior to program termination. Enables 'mix mode'. In this mode, STDERR and STDOUT are combined in to STDOUT. This is a parser-friendly mode, for traceroute parsers such as ct2db (http://pratyeka.org/ct2db/). Currently non-working flag intended for IP TOS specification. Toggles the FIN,PSH,RST,SYN,URG and reserved (unused) flags in outgoing TCP packets. These options only affect TCP traces (see -p option). Only the STN flag is turned on by default.

TYPES OF TRACES
Using the -i (ICMP type) and -c (ICMP code) switches, it is possible to send a variety of ICMP-based traces. Due to the nature of ICMP, most type/code combinations will not yield ICMP TTL expired messages (the basis of traceroute), thus will not work. Other types are either obsolete, or heavily filtered on modern routers (will not pass a couple of hops at most). Known good values for ICMP types and codes are; echo response (type 0, code 0), echo request (type 8, code 0). Destination ports of 80 (HTTP), 21 (FTP), 25 (SMTP), 110 (POP3) are probably good bets. If you cannot get through, altering TCP header flags (-F|P|R|S|U|X|Y) may be helpful. Source ports of 53 (DNS) and 20 (FTP) are often firewall 'special cases'. The classic UDP source and destination port is 53 (DNS), it is rarely filtered.

URL
The latest version of the code can be found at http://www.pratyeka.org/ctrace/

BUGS, SUGGESTIONS, ETC.
Send to the author.

AUTHOR
Walter Stanish <walter@pratyeka.org>, based upon code by ShaD0w.

SEE ALSO
ct2db (http://pratyeka.org/ct2db/). Net::RawIP, pcap(3), traceroute(8). RFC791 Internet Protocol (IP), RFC792 Internet Control Message Protocol (ICMP).

HISTORY
ctrace grew out of a couple of hacks to ShaD0w's Net::RawIP demonstration traceroute script. For the full history, see the HISTORY file in the distribution archive, also available on the ctrace website.