network off after reboot

Issues related to configuring your network
Post Reply
ron7000
Posts: 141
Joined: 2019/01/15 20:00:28

network off after reboot

Post by ron7000 » 2020/01/29 16:19:14

CentOS 7.7

My server is on a LAN. It has a simple static IP address setting.
After a reboot, the system comes up fine into graphical.target but the network does not automatically connect, it is off.
I have to manually log in at the console on the server, go to Settings - Network, and turn it on and then it works fine.
In that gui, I do have checked connect automatically but every time after boot the network is off.

I did notice, I think under /etc/sysconfig/network-scripts I am missing the corresponding ifcfg-enps11s0 file which corresponds to the output of ifconfig showing my one active network port.

I did do net.ifnames=0 in /etc/default/grub; grub2-mkconfig -o /boot/efi/efi/centos/grub.cfg to try and go back to using eth0 naming. I also have done *yum remove biosdevname*. On another identical server I am running on eth0 fine connecting automatically after boot.

But this one I am having this problem. What is the process for renewing or recreating what should be under /etc/sysconfig/network-scripts/ and making a typical ethernet connection with static IP start automatically after boot?

User avatar
TrevorH
Forum Moderator
Posts: 27727
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: network off after reboot

Post by TrevorH » 2020/01/29 16:47:38

Both the naming and the off-by-default behaviour are part of the FAQ.

https://wiki.centos.org/FAQ/CentOS7#Why ... able_it.3F and the bullet point directly underneath that one.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

ron7000
Posts: 141
Joined: 2019/01/15 20:00:28

Re: network off after reboot

Post by ron7000 » 2020/01/30 16:45:38

unfortunately that FAQ does not help me at all. Let me explain.

Dell optiplex 7010 pc, running centos7.7
If I do ifconfig it reports my current interface name as eno1 with a valid dchp gotten ipv4 address.
How I got to "eno1" I have no idea.
It originally was "em1" with biosdevname installed and not doing net.ifnames=0 on GRUB_CMDLINE_LINUX
Under /etc/sysconfig/network-scripts/ I do not have an "ifcfg-eno1" but I do have an "ifcfg-em1" which I had copied to "ifcfg-eth0" which at some point had worked giving me eth0. But now for whatever reason I have "eno1". And on this test pc when it boots the network connects automatically.

On a different server, same details except with static PIv4 address it does not connect automatically after boot.
I have to manually log in at the console, go to Settings - Network and under WIRED it will show OFF. As root if I turn it ON then it works fine until the next reboot. If I go in to the cog wheel for WIRED settings, i have checked "connect automatically" and "make available to other users". This connect automatically seems to not be working. Under Identity I have set it to "eth0" or any other corresponding "ifcfg-xxx" file under /etc/sysconfig/network-scripts/. Am I mistaken in thinking this identity name refers to an ifcfg-xxx file?

I was under the assumption that under Application - System - Network that I would be able to fix or reconfigure all that is network related. This seems to not be the case at all.

And per the centos faq for

Code: Select all

[root@example ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=dhcp
NM_CONTROLLED="no"
PERSISTENT_DHCLIENT=1
ONBOOT="yes"
TYPE=Ethernet
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="eth0"
with the exception of bootproto=dhcp I basically have this (for multiple interface names), and it's not working :(
I don't know what to do other than completely reinstall centos, which is more or less ok on my optiplex test pc. But kind of a not gonna happen on my server- which i wanted eth0 naming on for software licensing put it's becoming a pain every time after reboot to have to manually re-enable the static ip network interface. And what seems to be the common denominator is just my server having a static ip not enabling the network automatically after boot. The 2 or 3 other [test] computers all seem to enable the network automatically but they are all dchp, one of which I don't know how I got to an "eno1" interface name.

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

Re: network off after reboot

Post by jlehtone » 2020/01/31 15:24:32

ron7000 wrote:
2020/01/30 16:45:38
i wanted eth0 naming on for software licensing
Isn't that a "must have" rather than "wouldn't it be nice if we had"?
It would be nice, if those taking our money would stay up to date, wouldn't it?

Note: The ifconfig (net-tools) is deprecated, obsoleted by iproute2 utilities (for two decades now?)
Furthermore, CentOS defaults to NetworkManager rather than iproute2.

GUI can be "nice", but it is limiting and hard to explain.
These I would run (first) to see what I have:

Code: Select all

systemctl status network.service
systemctl status NetworkManager.service
ip li
ip -4 ad
ip ro
nmcli
nmcli d s
nmcli c s

ron7000
Posts: 141
Joined: 2019/01/15 20:00:28

Re: network off after reboot

Post by ron7000 » 2020/02/11 22:17:59

they can have ifconfig when they pry it from my cold dead hands 8-)

Post Reply

Return to “CentOS 7 - Networking Support”