Когда в товарищах согласья нет…

И этот ваш линукс тоже поганое дерьмо. Точнее, некоторые его разработчики. Потому что менять смысл ключей и параметров у одноимённых программ — это я не знаю, каким мудаком надо быть.

В дебиане/убунте первый параметр после destination IP означает destination port. А в в редахте/центосе – размер пакета. А destination port задаётся ключом -p. А в дебиане -p означает source port.

Соответственно, в первом случае tcptraceroute ip 22 воспринимается как трейс на 22 порт, а во втором – на дефолтовый 80-й, но 22-байтовыми пакетами.

Пидарасы.

$ tcptraceroute -h

tcptraceroute 1.5beta7
Copyright (c) 2001-2006 Michael C. Toren <mct@toren.net>
Updates are available from http://michael.toren.net/code/tcptraceroute/

Usage: tcptraceroute [-nNFSAE] [-i <interface>] [-f <first ttl>]
 [-l <packet length>] [-q <number of queries>] [-t <tos>]
 [-m <max ttl>] [-pP] <source port>] [-s <source address>]
 [-w <wait time>] <host> [destination port] [packet length]
$ tcptraceroute -?
Bad option `-?' (argc 1)

$ tcptraceroute -h
Bad option `-h' (argc 1)

$ tcptraceroute --version
Modern traceroute for Linux, version 2.0.1, Mar 11 2009
Copyright (c) 2006  Dmitry Butskoy,   License: GPL

$ tcptraceroute
Usage:
 tcptraceroute [ -46dFITUnrAV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w waittime ] [ -q nqueries ] [ -s src_addr ] [ -z sendwait ] host [ packetlen ]
Options:
 -4                          Use IPv4
 -6                          Use IPv6
 -d  --debug                 Enable socket level debugging
 -F  --dont-fragment         Set DF (don't fragment bit) on
 -f first_ttl  --first=first_ttl
 Start from the first_ttl hop (instead from 1)
 -g gate,...  --gateway=gate,...
 Route packets throw the specified gateway
 (maximum 8 for IPv4 and 127 for IPv6)
 -I  --icmp                  Use ICMP ECHO for tracerouting
 -T  --tcp                   Use TCP SYN for tracerouting
 -U  --udp                   Use UDP datagram (default) for tracerouting
 -i device  --interface=device
 Specify a network interface to operate with
 -m max_ttl  --max-hops=max_ttl
 Set the max number of hops (max TTL to be
 reached). Default is 30
 -N squeries  --sim-queries=squeries
 Set the number of probes to be tried
 simultaneously (default is 16)
 -n                          Do not resolve IP addresses to their domain names
 -p port  --port=port        Use destination port port. It is an initial value
 for the UDP destination port (incremented by each
 probe, default is 33434), for the ICMP seq number
 (incremented as well, default from 1), and the
 constant destination port for TCP tries (default
 is 80)
 -t tos  --tos=tos           Set the TOS (IPv4 type of service) or TC (IPv6
 traffic class) value for outgoing packets
 -l flow_label  --flowlabel=flow_label
 Use specified flow_label for IPv6 packets
 -w waittime  --wait=waittime
 Set the number of seconds to wait for response to
 a probe (default is 5.0). Non-integer (float
 point) values allowed too
 -q nqueries  --queries=nqueries
 Set the number of probes per each hop. Default is
 3
 -r                          Bypass the normal routing and send directly to a
 host on an attached network
 -s src_addr  --source=src_addr
 Use source src_addr for outgoing packets
 -z sendwait  --sendwait=sendwait
 Minimal time interval between probes (default 0).
 If the value is more than 10, then it specifies a
 number in milliseconds, else it is a number of
 seconds (float point values allowed too)
 -A  --as-path-lookups       Perform AS path lookups in routing registries and
 print results directly after the corresponding
 addresses
 -V  --version               Print version info and exit
 --help                      Read this help and exit

Arguments:
+     host          The host to traceroute to
 packetlen     Specify an alternate probe packet length (default is 40).
 Useless for TCP SYN
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply