It depends what IP address it means.
If you're seeing the IP connecting message on your computer, then it's likely meaning the internal IP range, which is set by the router.
So, it's the router at fault.
It just sounds like it can't get a decent signal sometimes.
I'd:
1) Change the wifi channel, see if that helps.
2) Move as much stuff between laptop and router, ideally minimal walls, etc.
3) Move other transmitting things away too, like baby monitors, microwaves, cordless phones.