[Solved] Network Issue - Boot

Issues related to configuring your network
Post Reply
Posts: 2
Joined: 2020/05/07 17:53:00

[Solved] Network Issue - Boot

Post by bionemesis » 2020/05/07 19:31:27

I'm having a strange network issue that I'm struggling to track down the cause of. I'm running Centos8 as a KVM guest. The network device, ens18 has a static IP configured via /etc/sysconfig/network-scripts. The configuration is set with onboot enabled. However, when I reboot, the network isn't coming up. If I use nmtui, it shows me two instances of ens18. One is configured with the gateway and one is not. There is, however only a single instance of ifcfg-ens18 in /etc/sysconfig/network-scripts. I have to delete the entry without the gateway, at which point the network immediately comes back online. Everything is fine until I reboot. Rinse. Repeat. If I delete the entry with the gateway and edit the one without, it doesn't fix the issue no matter what I do. If I delete everything and manually re-add ifcfg-ens18, it will work until a reboot. I even tried editing the entry without the gateway and left both in place, rebooted, and ended up with 3 instances of ens18. I'm at a complete loss. FWIW, I have another KVM guest running Centos7 with almost an identical configuration (different public IP) without this issue. They are both running the same software.
Last edited by bionemesis on 2020/05/08 13:57:55, edited 1 time in total.

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

Re: Network Issue - Boot

Post by jlehtone » 2020/05/08 06:24:27

bionemesis wrote:
2020/05/07 19:31:27
The network device, ens18 has a static IP configured via /etc/sysconfig/network-scripts.

/etc/sysconfig/network-scripts were primarily for network.service and:

Code: Select all

$ sudo dnf -q provides */network.service
Error: No Matches found
Although deprecated package network-scripts does still exists.
See https://access.redhat.com/documentation ... networking

NetworkManager prefers to write its configuration by itself, rather than reading what users have written.
I don't say that you can't write, but that generally it is less painful to not to.

You might want to install package NetworkManager-config-server:

Code: Select all

Description  : This adds a NetworkManager configuration file to make it behave more
             : like the old "network" service. In particular, it stops NetworkManager
             : from automatically running DHCP on unconfigured ethernet devices, and
             : allows connections with static IP addresses to be brought up even on
             : ethernet devices with no carrier.
             : This package is intended to be installed by default for server
             : deployments.
That description hints that NM does by default create connections for all devices.

I prefer the nmcli as configuration tool. See example 10 in man nmcli-examples
This version disables IPv6:

Code: Select all

nmcli con add con-name my-con-em1 ifname em1 type ethernet ip4 gw4 ipv4.dns "" ipv6.method ignore
A point to note is that 'ifname' has to be set here. The above command binds the connection to device name "em1".
Alas, names can change. It is possible to bind a connection to MAC address of a device (802-3-ethernet.mac-address) and clear the ifname (connection.interface-name).

Commands to get info on what you have:

Code: Select all

nmcli d s
nmcli c s

Posts: 2
Joined: 2020/05/07 17:53:00

Re: Network Issue - Boot

Post by bionemesis » 2020/05/08 13:57:44

For the record, it already existed, nothing to do with me. I did a fresh Centos 8 install and it exists as part of the network setup.

In any case, the issue is now resolved. It turned out to be an issue with a 3rd party software on the server. Thank you.

Post Reply

Return to “CentOS 8 - Networking Support”