Using Windows XP, motorola modem and linksys wireless G router. The router is connected to my desktop by an ethernet cable.

I was having trouble connecting to the internet. Suspecting a problem with the router, I bypassed the router and connected the modem directly to my computer, using the ethernet cable, and I was able to connect to the internet.

After several hours of this setup, I reconnected the router, which then worked for 5 or 6 hours. When it stopped working, I again connected the modem directly to the computer and was able to connect to the internet.

It seems like when the router has a chance to rest, and is then reconnected, it works.

Do I need a new router?

What might cause the router to work, stop working, then work again?