MBP connects to WiFi but not to internet This happens periodically, but I still don’t know why....very frustrating.
2011 MacBook Pro, High Sierra 10.13.5. 10 other devices in the house using WiFi no problem, between Galaxy S9, 3 iPads, an HP laptop and numerous smart TVs.... this has happened at home as well as on the road and I know that it is my MBP, but usually I manage to fix it- not this time. Have reset both SMC and PRAM. Have deleted WiFi service and re-added it. Have manually entered IPv4 addresses and DNS servers. Probably did some other things that I don’t remember anymore... 

Restarted numerous times. Don’t know what to do anymore... usually it comes back by now, but no such luck. What else can I try?  I have even been in Terminal running some commands to try to clear my caches etc...When I ping a DNS server in Terminal like Google’s, 8.8.8.8, I get responses, but I have to manually set my IPv4 address and subnet mask to 255.255.255.0. When everything is configured like normal, i.e. IPv4 using DHCP and IPv6 configured automatically, I do not have a self-assigned IP address, but it does show me having an IPv6 address, which is weird and don’t recall seeing that before, usually it is an IPv4 address. When I get my IP address in terminal, it is not a class C, starting in 192, but rather a class B starting with 169 and the subnet mask is then 255.255.0.0, which I never see.  

I also cannot boot into Safe mode for some reason. When i get to the logo screen and the progress bar underneath, the progress bar gets halfway and then the screen goes dark and it powers off. I can boot into recovery mode and if I use the Get Help Online section and open Safari, I GET ON THE INTERNET JUST FINE.... so what the heck gives?? Doesn’t make any sense... Please help...
Thank you!
After talking in a chat with the OP. I suggested the following solution, which in the end solved the issue.



Follow these instructions to reinstall macOS:


  Start up from macOS Recovery
  
  
  macOS Recovery installs different versions of macOS depending on the key combination you use while starting up. Turn on or restart your
  Mac, then immediately hold down one of these combinations:
  
  
  
  2.Release the keys when you see the Apple logo or a spinning globe.
  
  Install macOS
  
  
  Choose Reinstall macOS (or Reinstall OS X) from the utilities window.
  Click Continue, then follow the onscreen instructions. You'll be asked to select your disk. If you don't see it, click Show All Disks.
  Click Install. Your Mac restarts after installation is complete.