Hello @kwojtyra
If you can ping the local gateway but lose connectivity when trying to ping a non-existent IP address ; you should have an issue with the ARP or MAC address table management in the network.
When you ping an IP that doesn't exist, the network devices may generate ARP requests to resolve the unknown IP. If there are many such ARP requests, it can overload the ARP table or CPU on some devices, affecting the handling of other traffic, including legitimate ARP requests for the gateway.
Use the command show mac address-table on the switches to identify if the same MAC address appears on multiple VLANs or different ports. Check if any device in the network is configured to use a static MAC address or is acting as a bridge between VLANs.
On Router or Layer 3 device, use the show ip arp command to see if the ARP table is filling up or if there are any unusual entries. Clear the ARP cache (clear ip arp) and see if the issue persists.
Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.