CentOS network issue/fix

Working through a fresh install of CentOS to do a lab and stumbled on a certain error right out of the gate. If you get this error, “cannot find a valid baseurl for repo” such as I did, I found this fix solved the problem.

  1. Use vi to edit the file “ifcfg-enp0s3” located at /etc/sysconfig/network-scripts/
    1. (This file could also be ifcfg-eth0 in format)
  2. Change the line “ONBOOT” from =no to =yes. Save file and restart network interface

Again, there are a number of ways to fix the original error and multiple things in this one file that could be the cause.

Solution found on Stack Exchange

You may also like...