I've noticed a strange behaviour (at least, I can't get out).
Ping IP, specifying packet size:
ping -s 128 8.8.8.8
I get:
PING 8.8.8.8 (8.8.8.8) 128(156) bytes of data.
72 bytes from 8.8.8.8: icmp_req=1 ttl=43 (truncated)
Ping website, specifying packet size:
ping -s 128 www.google.com
I get:
PING www.google.com (173.194.35.19) 128(156) bytes of data.
136 bytes from mil01s16-in-f19.1e100.net (173.194.35.19): icmp_req=1 ttl=52 time=8.36 ms
So, why pinging pure IP packet size has been truncated?
From Ping man, I get:
-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.
8.8.8.8
is a Google DNS server, butwww.google.com
will take you to a Google HTTP server which does not have that IP (notice "from 173.194.35.19"). So the second ping might as well use any domain what-so-ever. – goldilocks Jul 11 '14 at 14:18So I assume there is something related to the translation of the sites name to its ip.
– vfbsilva Jul 11 '14 at 14:19-s
controls the size of the packet sent, not received. The other side can send whatever they want. – phemmer Jul 11 '14 at 14:25ping -s 128 173.194.35.19
you will get the same answer. In fact you can see that 8.8.8.8 is refusing to answer more than 72 bytes and only answering with 72 bytes (that's the "truncated" note in ping response) – Pablo Martinez Jul 11 '14 at 15:26icmp
packet sizes. – Jul 11 '14 at 16:46