Can I override the default maximum size - 65535 bytes
of ICMP ping packets? If - then How?
7 Answers
The maximum size of an IPv4 packet is 65535 bytes of which some is protocol overhead so that data must be a couple bytes less than 65535 and a ping can't be more than one IP packet, so the answer is no.
Why would you want to send a larger ping?
-
6
Yes
In Windows, type:
Ping <target> -l xx
where xx is the buffer size.
For full options of the Windows ping command -
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name
Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet (IPv4-only).
-i TTL Time To Live.
-v TOS Type Of Service (IPv4-only. This setting has been deprecated
and has no effect on the type of service field in the IP Header).
-r count Record route for count hops (IPv4-only).
-s count Timestamp for count hops (IPv4-only).
-j host-list Loose source route along host-list (IPv4-only).
-k host-list Strict source route along host-list (IPv4-only).
-w timeout Timeout in milliseconds to wait for each reply.
-R Use routing header to test reverse route also (IPv6-only).
-S srcaddr Source address to use.
-4 Force using IPv4.
-6 Force using IPv6.
-
1doing so will say Bad value for option -l, valid range is from 0 to 65500.– N.KCommented Jul 21, 2017 at 3:44
Yes, there is a way to increase the default size. Which OS or network device are you referring to?
By the way, there really is no practical reason to increase the size unless you're super curious or just plain ol' malicious.
From a network operations perspective, the increased overhead will choke performance. This is a bad idea.
From a security perspective, and much like John T points out, increasing the packet size for ICMP messages will usually lead to denial of service
the max size is 65507 which is 65535 (max ip length) - 20 (ip hdr) - 8 (icmp/ping hdr) = 65507. Windows OS blocks max size at 65500 but in Linux you can ping up to the real limit
The short answer to your question is - "NO"
But,You can open multiple ICMP Ping
instances at the same time.
Open RUN > type ping IP -t -l 65500
and do the same for 10 or more times, it will multiply the packets.
Or, you can use my Java Program from HERE. [It opens 100 instances at the same time taking no more than 5%-6% of RAM]
Don't use it to perform ping of death
attack.
Updated Link(Also The Program)
OR,
Use PsPing
This is a tool by Mark Russinovich which is able to perform very fast
ping.
It can also perform TCP and UDP pings, supports many functions(ex - warmup). And many more.
Anser is # ping google.com -s 65535
Usage: ping [OPTIONS] HOST
Send ICMP ECHO_REQUESTs to HOST
-4,-6 Force IP or IPv6 name resolution
-c CNT Send only CNT pings
-s SIZE Send SIZE data bytes in packets (default 56)
-i SECS Interval
-A Ping as soon as reply is recevied
-t TTL Set TTL
-I IFACE/IP Source interface or IP address
-W SEC Seconds to wait for the first response (default 10)
(after all -c CNT packets are sent)
-w SEC Seconds until ping exits (default:infinite)
(can exit earlier with -c CNT)
-q Quiet, only display output at start/finish
-p HEXBYTE Payload pattern
-
The question is “Can the maximum size 65535 be increased”, you do not answer it.– TotoCommented Nov 26, 2021 at 15:23
If you increase the packet size more than 65500, the protocol does not have any idea to handle such kind of packets exceeding upper limit. The system is very likely to crash, an attack well known as the Ping of death
.
To prevent it most operating systems limits its max ping size. To cross the limit you need to hack your os and it depends on which os you use.