I spent many months trying to get a W5100 Ethernet shield working consistently, and failed.
The LEDs on the Ethernet shield would eventually start flashing rapidly and the connection would be lost. The only solution was to press the reset button on the shied to reset the connection - and this wouldn’t work all of the time.
There are discussions about placing a capacitor across the reset button, or a resistor and a capacitor and bending one of the legs out of the way to overcome a problem, like this:
These solutions didn’t work for me, and I eventually implemented a solution where I’d use one if the GPIO pins on the Arduino to simulate a hardware reset of the Ethernet shield, and do a ping to check that the reset had worked and if not repeat the process.
Even this didn’t always work with some Ethernet shields and eventually ‘saw the light’ and abandoned Arduinos and moved over to NodeMCU boards with WiFi connections and I’ve never looked back.
Pete.