using Ethernet having a problem

After uploading the code ,sometimes the ip address is pinged and some times it is disconnected.and i need to restart the computer in order to ping the address.And sometimes even if it is pinged the webpage is not kindly solve my problem

You did not provide enough information.

What is the ethernet shield CAT5 cable connected to? Is it your computer? Or a router/switch?
What IP is the computer ethernet port assigned?
What IP is the ethernet shield assigned?