Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
CTRACE(1)	      User Contributed Perl Documentation	     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.  Other valid	execution modes	 are  -W  (web
       traceroute gateway database update), and	-l (list gateways).

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  con-
	   trast,  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  by-
	   passing burdensome packet filters.

       .   Web-based traceroute	gateway	bounce support.

OPTIONS
       -a  Disable RTT averaging mode.	RTT averaging mode shows one "ms/avg."
	   RTT	per  hop  instead  of  seeing  a  collection of	4.3BSD tracer-
	   oute(8)-like	"ms" RTT values.  This option has no effect if	-q  is
	   set to 1.

       -b siteid
	   Bounce  mode.   Uses	 the website siteid to run the traceroute, re-
	   turning the results transparently.  Note that this feature is still
	   not as adaptable as hoped.  Use -l to list known bounce sites.

       -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 is 53.  A  value	 of  0
	   means that destination ports	will be	generated at random.  This op-
	   tion	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	 argu-
	   ment	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.

       -l  List	the web	traceroute gateways currently in the  local  database,
	   along with their siteid.  Used with -b.

       -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 de-
	   fault value is 35.

       -n  `Numeric mode'.  In this mode, the program will not use DNS to  re-
	   solve  host	names.	The output in this mode	is supposed to be com-
	   patible with	4.3BSD traceroute(8)'s -n mode.

       -o  `Oldschool mode'.  ctrace will emulate 4.3BSD traceroute(8)	output
	   almost perfectly.  The only present differences from	4.3BSD tracer-
	   oute(8)  are	that packet size is always reported as 40 bytes	(irre-
	   spective of the protocol and	options	 selected),  and  that	ctrace
	   will	still allow -q of 1 (minimum 4.3BSD traceroute(8) is 2).  Old-
	   school mode negates -v and implies -a.

       -p [protocol]
	   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.

       -q queries
	   The number of queries (packets) to send per hop.  Packets are  dis-
	   patched  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.
	   This	feature	is mainly used for debugging.  This option  is	incom-
	   patible  with -o (oldschool)	mode, and will be disabled if both are
	   specified.

       -w secs
	   The time in seconds to wait for responses to	packets	before	assum-
	   ing that they will never come.  The default value is	3.

       -E  Enables  exit-reporting mode.  A human-readable summary of the exit
	   condition will be printed to	STDERR prior to	program	termination.

       -M  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/).

       -T  Currently non-working flag intended for IP TOS specification.

       -F|P|R|S|U|X|Y
	   Toggles the FIN,PSH,RST,SYN,URG and reserved	(unused) flags in out-
	   going TCP packets.  These options only affect TCP  traces  (see  -p
	   option).  Only the STN flag is turned on by default.

       -W  Update  the	web  traceroute	 gateway ('bounce site') database from
	   www.traceroute.org.	Note that  you	are  better  off  compiling  a
	   sitelist  manually, as many traceroute.org sites are	either down or
	   do not cooperate with ctrace.

TYPES OF TRACES
       ICMP (protocol 2)
	   Using the -i	(ICMP type) and	-c (ICMP code) switches, it is	possi-
	   ble	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  re-
	   quest (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)	are often firewall 'special cases'.

       UDP (protocol 17)
	   The classic UDP source and destination port	is  53	(DNS),	it  is
	   rarely filtered.

       Bounced
	   Using  the  -b option, it is	possible to run	a trace	from a foreign
	   web traceroute gateway and return the results.  Useful for topology
	   discovery.

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

BUGS, SUGGESTIONS, ETC.
       Send  to	 the  author.  The current BUGS	and TODO files are distributed
       with the	latest version of the code.

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

SEE ALSO
       Related Code
	   ct2db (http://pratyeka.org/ct2db/).

       Man Pages
	   Net::RawIP, pcap(3),	traceroute(8).

       RFCs
	   RFC791 Internet Protocol (IP), RFC792 Internet Control Message Pro-
	   tocol (ICMP).

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

3rd Berkeley Distribution	  perl v5.6.1			     CTRACE(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=ctrace&sektion=1&manpath=FreeBSD+Ports+15.0>

home | help