1

In reviewing the options on MTR in the manual page of MTR, there is an option for packetsize. Quote: -s PACKETSIZE, --psize PACKETSIZE This option sets the packet size used for probing. It is in bytes, inclusive IP and ICMP headers. If set to a negative number, every iteration will use a different, random packet size up to that number.

I have attempted different combinations to randomize the packetsize using negative numbers but I do not seem to get this right. I always get errors of invalid syntax.

I have tried these mtr combinations:

mtr -b -c 5 -u4 --port 80 --psize -111 meet.google.com
mtr -b -c 5 -u4 --psize negative10 meet.google.com
mtr -b -c 5 -u4 --psize=_-10_ meet.google.com
mtr -b -c 5 -u4 --psize=-10 meet.google.com
mtr -b -c 5 -u4 --psize ((-10)) meet.google.com
mtr -b -c 5 -u4 --psize (-10) meet.google.com

The results were: -bash: syntax error or mtr: invalid argument

May anyone please advise what I am doing wrong? Does this option even work? Thank you for the help.

tpfiler
  • 19
  • 2

2 Answers2

0

It doesn't work for me either. However once mtr is running you can use the s key to set the packet size and this allows you to set a negative number, however I can't tell what size packets it is sending in the interface.

Matthew Buckett
  • 4,073
  • 1
  • 36
  • 28
0

it depends on version of mtr or its fork, so far it's possible only in older versions https://github.com/traviscross/mtr/issues/475

yvs2014
  • 303
  • 2
  • 7
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/34472893) – user16217248 Jun 01 '23 at 17:29
  • @user16217248 there's a minor slip-up in code in part of comparison for signed/unsigned integers in new mtr versions, something like conversion of signed integer into unsigned one. Details are in the mentioned link. – yvs2014 Jun 01 '23 at 20:18