In Linux, how do I send packets of a certain size to an IP?

23,366

Solution 1

You can specify the packet size in ping using "-s" flag:

-s packetsize
          Specifies the number of data bytes to be sent.  The default is 56, which  translates  into
          64 ICMP data bytes when combined with the 8 bytes of ICMP header data.

Solution 2

ping -s nnnn a.b.c.d

sends packets of size nnnn+8 bytes (including header data) to address a.b.c.d, according to the manpage.

Share:
23,366

Related videos on Youtube

Alex
Author by

Alex

Updated on September 17, 2022

Comments

  • Alex
    Alex over 1 year

    What commands can you run? (must be via the terminal)

  • Philip
    Philip over 13 years
    -1, the -s argument takes packet size as an integer, not a file name.