I, too am experiencing this same issue. It is an arduino ethernet shield (wiznet with the sd card slot). I have written some very simple tcp code, that does not work on power up, but works just fine if you then press the reset button, ground the reset pin, or open a serial connection.

This sounds similar to a problem I had with my home-brew ethernet board (using the Wiznet module). I had a 3.3V regulator that was too small and had to add a 200ms sleep in setup() to get it to work reliably.

The Arduino ethernet shield's 3.3V regulator is not undersized, but I wonder if there is some similar issue? The Wiznet chip seems to be a bit picky about low voltage, and it's a bit hungry at 138mA to 183mA current consumption. It also needs 10ms from the time reset goes inactive until PLOCK is good. (I assume that's a PLL lock? no other mention of that parameter in the datasheet.)

Anyway, just as a wild guess, try putting a delay() in setup() to see if that helps.

Well, I have constructed a workaround to this issue, and it appears to be resolved. It's not exactly pretty... basically I took a little SPST, normally open relay and hooked the coil pins to ground and digital pin 02, and the switched pins to ground and the reset pin.

You can probably guess what comes next... before initializing the ethernet library, I look for a flag at an address in eeprom. If the flag is 0, we set it to 1 and then trigger the relay, and the unit resets. If the flag is 1, we assume that we just did a warm reset and set the flag back to 0, for next time we power up.

The pastie below is the code snippet I wrote if anyone is interested (let me know if there is a better way to accomplish this sort of thing, I'm new).

I've also had problems initializing the Ethernet shield after a cold reset/powerup.

My solution was to disconnect the shield's reset pin* so it could be reset independently of the arduino main board. I then ran a jumper from a digital output pin to the shield's reset line.

Before calling the Ethernet library, I enable that output pin, pull it low for 100ms, and then switch the port back to input mode with pullups disabled.

(* actually, my original Arduino USB board doesn't have a socket for the reset pin, so the line wasn't connected in the first place. If you have a newer board, you'd need to clip the shield's reset pin or cut a trace on the shield PCB.)

Hmm... Ethernet.begin() calls iinchip_init() and sysinit() which supposedly resets the W5100. Maybe the network / router doesn't expect the device to reset in that way? What if you use a random mac address each time (note that you'll need to call randomSeed() with something like the value of analog input before using random())? Or a random ip?

There's basically no code in the constructors of Client or Server, so it may be that the W5100 just doesn't work properly when powered up without a reset. We may need to allow for a reset of the W5100 from an Arduino pin.

I think the normal reset time is to short for the Ethernet-Shield.So I soldered a 100nF cap between the Reset-Pin and GND andthen the Ethernet-Shield works without pressing the reset button.(a good position for a 100nF SMD cap is between the pins from the reset switch)