[Bug 207208] ping has a problem with fragemented replies

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 15 11:26:39 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207208

            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 at FreeBSD.org
          Reporter: jasper at siepkes.nl
                CC: freebsd-amd64 at FreeBSD.org
                CC: freebsd-amd64 at 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 didn't
receive a response. However with tcpdump I can see the replies being received.

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=0 ttl=245 time=22.851 ms

--- 80.113.23.178 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 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, length
980
12:13:48.731234 IP (tos 0x0, ttl 245, id 44677, offset 0, flags [none], proto
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 ICMP
(1), length 1500)
    192.168.93.148 > 80.113.23.178: ICMP echo request, id 54562, seq 0, length
1480
12:14:45.394407 IP (tos 0x0, ttl 64, id 63325, offset 1480, flags [none], proto
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 only
seems to have problems with fragement replies. I've also tested this on Linux,
Mac OS X and OpenBSD and they don't seem to have this problem.

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

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


More information about the freebsd-amd64 mailing list