Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2016 11:26:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-amd64@FreeBSD.org
Subject:   [Bug 207208] ping has a problem with fragemented replies
Message-ID:  <bug-207208-6@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207208

            Bug ID: 207208
           Summary: ping has a problem with fragemented replies
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: jasper@siepkes.nl
                CC: freebsd-amd64@FreeBSD.org
                CC: freebsd-amd64@FreeBSD.org

When using ping with a packet size larger then the interfaces MTU (in my
example 1500) which leads to a fragemented reply ping will always say it di=
dn't
receive a response. However with tcpdump I can see the replies being receiv=
ed.

Single ping request with a total packet size of a 1000 bytes (within MTU of
interface):
---8<------------------
$ ping -c 1 -s 972 80.113.23.178
PING 80.113.23.178 (80.113.23.178): 972 data bytes
980 bytes from 80.113.23.178: icmp_seq=3D0 ttl=3D245 time=3D22.851 ms

--- 80.113.23.178 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev =3D 22.851/22.851/22.851/0.000 ms
---8<------------------

Resulting tcpdump output:
---8<------------------
# tcpdump -nvvvs 9000 -i igb0 icmp
12:13:48.708408 IP (tos 0x0, ttl 64, id 63061, offset 0, flags [none], proto
ICMP (1), length 1000)
    192.168.93.148 > 80.113.23.178: ICMP echo request, id 50210, seq 0, len=
gth
980
12:13:48.731234 IP (tos 0x0, ttl 245, id 44677, offset 0, flags [none], pro=
to
ICMP (1), length 1000)
    80.113.23.178 > 192.168.93.148: ICMP echo reply, id 50210, seq 0, length
980
---8<------------------

Single ping request with a requested payload size of 2500 bytes (which will
result in a packet larger then MTU of interface):

---8<------------------
ping -c 1 -s 2500 80.113.23.178
PING 80.113.23.178 (80.113.23.178): 2500 data bytes

--- 80.113.23.178 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
---8<------------------

Resulting tcpdump output:
---8<------------------
# tcpdump -nvvvs 9000 -i igb0 icmp
12:14:45.394397 IP (tos 0x0, ttl 64, id 63325, offset 0, flags [+], proto I=
CMP
(1), length 1500)
    192.168.93.148 > 80.113.23.178: ICMP echo request, id 54562, seq 0, len=
gth
1480
12:14:45.394407 IP (tos 0x0, ttl 64, id 63325, offset 1480, flags [none], p=
roto
ICMP (1), length 1048)
    192.168.93.148 > 80.113.23.178: ip-proto-1
12:14:45.418429 IP (tos 0x0, ttl 245, id 23347, offset 0, flags [+], proto =
ICMP
(1), length 1500)
    80.113.23.178 > 192.168.93.148: ICMP echo reply, id 54562, seq 0, length
1480
12:14:45.418436 IP (tos 0x0, ttl 245, id 23347, offset 1480, flags [none],
proto ICMP (1), length 1048)
    80.113.23.178 > 192.168.93.148: ip-proto-1
---8<------------------

Beware that some hosts will just truncate the echo reply even if you send a
large packet. 'www.nu.nl' does this for example (probably to prevent getting
dos'ed). The echo reply is then not fragmented and ping works fine. ping on=
ly
seems to have problems with fragement replies. I've also tested this on Lin=
ux,
Mac OS X and OpenBSD and they don't seem to have this problem.

I've observed this behavior on 10.2-RELEASE-p12.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207208-6>