MTR - How to randomize packetsize?

129 views Asked by At

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.

2

There are 2 answers

0
Matthew Buckett On

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.

2
yvs2014 On

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