You need to figure out what the problem is. Hook up the cable modem directly to one of your computers and see if you can get on the internet with that computer. If that works, then the problem is the config of your router. If it doesn't work, then the problem is your cable modem and you will need to call technical support of your cable provider.
Just because you get IPs on your computer doesn't mean everything should work. That just means your router is correctly assigned IPs on the LAN side, but your WAN isn't connecting. If the problem lies in the config of your router, you need to login to it, (Default User ID: Blank, Password: admin), and then look at all the setting required then call your cable provider and ask them for the settings to access the cable modem. Fill in the fields of your router config and try it again.