Cannot connect to the internet with a ethernet cable

Issues related to configuring your network
Post Reply
gerrietech
Posts: 1
Joined: 2021/12/08 22:33:10

Cannot connect to the internet with a ethernet cable

Post by gerrietech » 2021/12/08 22:41:29

I just installed centos 7 and i am trying to ping google.com
i get the error name or service not known and in the installation gui the ethernet cable didnt showed up either how do i fix this?

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot connect to the internet with a ethernet cable

Post by TrevorH » 2021/12/09 03:24:22

Is this a physical machine or a VM? What is the output from lspci -nn | grep -i net ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Cannot connect to the internet with a ethernet cable

Post by jlehtone » 2021/12/09 08:33:40

gerrietech wrote:
2021/12/08 22:41:29
in the installation gui the ethernet cable didnt showed up
If installer does not show connection, then it did not detect network device, which means that
installer (and CL7) lacks driver for the device. The output that Trevor did ask shows "device ID"
and with that ID one can search for additional drivers.


Note that if one does installation from local media, device is detected and shown in installer,
then one still has to explicitly enable it, or connection won't activate on boot.

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Cannot connect to the internet with a ethernet cable

Post by lightman47 » 2021/12/09 22:59:40

I've noticed that, during installation, my network devices seem to be disabled by default(?).

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Cannot connect to the internet with a ethernet cable

Post by jlehtone » 2021/12/10 07:53:58

lightman47 wrote:
2021/12/09 22:59:40
I've noticed that, during installation, my network devices seem to be disabled by default(?).
Yes. If you install from local media, then you don't need the network for the installation.
The installer still generates connection configs for all interfaces that it does find (but sets connection.autoconnect no on them).
It is enough to click on that On/Off switch in installer to change that. (If you do, then installer does enable NTP in Time settings too.)

However, if you do network-based install (either boot from image that uses online repos, or PXEboot) then the autoconnect is set to "yes".

A thread about CentOS Stream 8 viewtopic.php?f=54&t=78467 demonstrates a third scenario:
The initial install was not created by installer, but by some other (Google) routine; no config exists for interfaces but NetworkManager.service is enabled. The result is that NetworkManager automatically creates (non-persistent) connections for all "new" interfaces; the instance does get functional network on boot.

Why did Red Hat default local media installs with disabled connections? Your guess is as good as mine.


CentOS Stream 9 local installation does set connection.autoconnect yes.

Post Reply