Cannot ping IPv4 address, but IPv6 ping works I have a Macbook and an Android device (Oneplus phone) on same network and the Macbook connects via USB LAN (or Wi-Fi), Android device via Wi-Fi. I detected the following anomaly:


I can ping the Oneplus from the Mac:


64 bytes from 192.168.1.127: icmp_seq=3 ttl=64 time=30.433 ms
--- 192.168.1.127 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss



I can ping the router from the Oneplus
However I cannot ping the IPv4 address of the Mac
I took a look at the traffic in Wireshark and I got the "host unreachable" message to the ICMP requests
I also started to host a simple HTTP server, but it seems the Mac does not response to the TCP SYN segments, because I could see RTO flagged segments (Retransmission Timeout). (3-Way handshake never completed)
Fan fact, recently my ISP started issuing IPv6 addresses and I tried to ping the Mac from the Oneplus:


--- 2001:*:*:*:*:*:*:7e50 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 6.737/33.397/108.664/43.467 ms


It was working as the above log shows.

Mac's firewall is disabled and there is no firewall rule applied in the router. I removed all network interface under the System Preferences / Network menu and added them again.

I also selected the Link-local only option at the System Preferences / Network / interface / Advanced / TCP/IP / IPv6 Configuration tab. Unfortunately none of them worked. 

My question is why did IPv6 ping work and IPv4 not? Could be the problem the recently introduced IPv6 addresses?

[Edit]

I created a Hotspot with my iPhone and connected with both of the Mac and the Oneplus. This Hotspot does not have any IPv6 configuration, but I experienced the same issue.

I also created a Hotspot with my Mac to eliminate the router from the circle and I connected to it with the Oneplus. Like every time, I could not ping the Mac, despite the Oneplus gets IP address via DHCP from the Mac. (So there was network traffic)
I had a similar issue and got a positive response when using IPv6 (ping6) but not IPv4 (ping). I also had the symptoms described in the question Why will my Mac only load Google and Facebook?.
This problem started to appear after disconnecting from the VPN. So, after terminating the VPN service, networking began to work fine again.
sudo killall -9 vpnagentd ciscod