// disable SD card if one in the slot pinMode(4,OUTPUT); digitalWrite(4,HIGH);
@shivaprasad: You didn't post enough information. Which ethernet shield/module are you using? Does it have a w5100, w5500, or ENC28J60 IC?
Do you have a SD card in the shield's slot? If you are using a w5100, do not use the Ethernet2 library. That is for the w5500. Use the standard ethernet library included weith the IDE.