Internet disconnects but reconnects on restart

My WiFi and Ethernet disconnects at random times and I have to restart my computer to get the internet again. It just disconnects at random times. And Ive looked up stuff on how to fix it, but none of the CMD commands work. It says that there's internet access and all that but whenever I open my web browser it still says no connection. Can someone help me on fixing it?
 
Log into your router, on the WAN side settings, change the MTU to 1492
 
Back