Content-type: text/html Manpage of CTRACE

CTRACE

Section: User Contributed Perl Documentation (1)
Updated: perl v5.6.0
Index Return to Main Contents
 

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 in most output, so it 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


-c icmpcode
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).
-d dstport
Destination port number. The default value of 0 means that destination ports will be generated at random. This option affects TCP and UDP traces only (see -p option).
-f failhops
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.
-h
Display command line help. This is also displayed if the -t argument is ommitted.
-i icmptype
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).
-j jumphops
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.
-m ttl
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.
-n
`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.
-p [protocol]
The protocol to conduct the trace with. Valid values are icmp, tcp and udp. The default value is tcp. More protocols will probably be added in the future.
-q queries
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.
-s srcport
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).
-t target
This is the target host of your trace. It can either be specified as a hostname, or an IPv4 address.
-v
Verbose mode. Displays additional information on ctrace's status. Mainly used for debugging.
-w secs
The time in seconds to wait for responses to packets before assuming that they will never come. The default value is 3.
-A
Enables RTT averaging mode. In RTT averaging mode, you will see one `ms/avg.' RTT per hop, instead of seeing a collection of 4.3BSD traceroute(8)-like `ms' RTT values. This mode has no effect if -q is set to 1.
-E
Enables exit-reporting mode. A human-readable summary of the exit condition will be printed to STDERR prior to program termination.
-F|P|R|S|U|X|Y
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


ICMP (protocol 2)
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).
TCP (protocol 6)
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) may be firewall 'special cases'. Your mileage may vary.
UDP (protocol 17)
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


Man Pages
Net::RawIP, pcap(3), traceroute(8).
RFCs
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.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
TYPES OF TRACES
URL
BUGS, SUGGESTIONS, ETC.
AUTHOR
SEE ALSO
HISTORY

This document was created by man2html, using the manual pages.
Time: 12:15:18 GMT, August 08, 2001