I had the same problem, my buffalo router just wouldn't get an IP from the DHCP server.
After long hours of research and trial and error, I finally got it working.
Note: I have the Buffalo WZR-HP-G300NH2
This is what I did:
Unplug power from both my buffalo router and gateway.
Unplug network cable running from gateway to router on both devices.
Wait at least 30 seconds.
Plug in network cable in both devices.
Plug in power to buffalo router.
Wait 10 seconds.
Plug in the power to the gateway.
Then I got IP from DHCP server and internet.
Hope this helps someone.