root@liujie-desktop:/over/aaa/tftp-1.1# ping
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]
[-p pattern] [-s packetsize] [-t ttl] [-I interface or address]
[-M mtu discovery hint] [-S sndbuf]
[ -T timestamp option ] [ -Q tos ] [hop1 ...] destination
root@liujie-desktop:/over/aaa/tftp-1.1# ping -s 65535 172.16.20.120
Error: packet size 65535 is too large. Maximum is 65507
root@liujie-desktop:/over/aaa/tftp-1.1# ping -s 65515 172.16.20.120
WARNING: packet size 65515 is too large. Maximum is 65507
PING 172.16.20.120 (172.16.20.120) 65515(65543) bytes of data.
ping: local error: Message too long, mtu=1500
ping: local error: Message too long, mtu=1500
ping: local error: Message too long, mtu=1500
ping: local error: Message too long, mtu=1500
ping: local error: Message too long, mtu=1500
ping: local error: Message too long, mtu=1500
^C
--- 172.16.20.120 ping statistics ---
6 packets transmitted, 0 received, +6 errors, 100% packet loss, time 4999ms
root@liujie-desktop:/over/aaa/tftp-1.1# ping -s 65507 172.16.20.120
PING 172.16.20.120 (172.16.20.120) 65507(65535) bytes of data.
65515 bytes from 172.16.20.120: icmp_seq=1 ttl=128 time=2.85 ms
65515 bytes from 172.16.20.120: icmp_seq=2 ttl=128 time=1.89 ms
65515 bytes from 172.16.20.120: icmp_seq=3 ttl=128 time=1.92 ms
65515 bytes from 172.16.20.120: icmp_seq=4 ttl=128 time=1.82 ms
65515 bytes from 172.16.20.120: icmp_seq=5 ttl=128 time=1.91 ms
^C
--- 172.16.20.120 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 1.820/2.081/2.857/0.393 ms
发送一个数据包,包大小为65507
root@liujie-desktop:/over/aaa/tftp-1.1# ping -s 65507 -c 1 172.16.20.120
PING 172.16.20.120 (172.16.20.120) 65507(65535) bytes of data.
65515 bytes from 172.16.20.120: icmp_seq=1 ttl=128 time=2.32 ms
--- 172.16.20.120 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
C:\Documents and Settings\Administrator>ping -l 65501 192.168.10.14
Bad value for option -l, valid range is from 0 to 65500.
C:\Documents and Settings\Administrator>ping -l 65500 192.168.10.14
Pinging 192.168.10.14 with 65500 bytes of data:
Reply from 192.168.10.14: bytes=65500 time=4ms TTL=64
Reply from 192.168.10.14: bytes=65500 time=1ms TTL=64
Reply from 192.168.10.14: bytes=65500 time=1ms TTL=64
Reply from 192.168.10.14: bytes=65500 time=1ms TTL=64
Ping statistics for 192.168.10.14:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 4ms, Average = 1ms
100 ==20字节的首部 + TYPE(1byte icmp消息类型) + code (1) + 校验和(2) + 标识 (2) + 序号(2) + 92 数据
root@liujie-desktop:/over/aaa/tftp-1.1# ping -s 92 -c 1 172.16.20.120
PING 172.16.20.120 (172.16.20.120) 92(120) bytes of data.
100 bytes from 172.16.20.120: icmp_seq=1 ttl=128 time=0.370 ms
--- 172.16.20.120 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.370/0.370/0.370/0.000 ms