If you can't ping an IP (if you ping a name you require a working DNS, if you ping an IP you don't) it indicates your connection is screwed up. It's probably not just a wrong setting.
When your wireless connection drops you have to reconnect. Maybe your signal strength is too weak or you have string interferences close by. If you ethernet connection drops it could be anything from a loose ethernet plug, to the cable, hub, or router.
Of course it could also be your Mac, but it's strange that the problem appears with both interfaces. Does the problem appear if you work with a fresh user account? Have you tried an Archive&Install? Have you ran Apple Hardware Test (boot from the install DVD pressing 'd')?