This for those who have installed CentOS recently and either on VMware workstation or Oracle's VirtualBox and having connectivity issues. In this short blog post wills show you how to quickly fix that.
Make sure that your VM is running, and then head to settings , access the network tab and make sure the Bridge Adapter is selected under your main network Adapter as shown in the image below 



Open nmtui with the command below


sudo nmtui