[CentOS] CentOS 8 network-scripts

Thu Oct 3 20:21:48 UTC 2019
Ljubomir Ljubojevic <centos at plnet.rs>

On 10/3/19 9:57 PM, Paul Heinlein wrote:
> On Thu, 3 Oct 2019, Jerry Geis wrote:
> 
>>>> systemctl status network
>>
>>
>> AT BOOT:
>> ● network.service - LSB: Bring up/down networking
>>   Loaded: loaded (/etc/rc.d/init.d/network; generated)
>>   Active: inactive (dead)
>>     Docs: man:systemd-sysv-generator(8)
>>
>> After: service network restart
>> ● network.service - LSB: Bring up/down networking
>>   Loaded: loaded (/etc/rc.d/init.d/network; generated)
>>   Active: active (running) since Thu 2019-10-03 15:12:05 EDT; 7s ago
>>     Docs: man:systemd-sysv-generator(8)
>>  Process: 7755 ExecStart=/etc/rc.d/init.d/network start (code=exited,
>> status=0/SUCCESS)
>>    Tasks: 1 (limit: 24034)
>>   Memory: 8.7M
>>   CGroup: /system.slice/network.service
>>           └─7940 /sbin/dhclient -1 -q -lf
>> /var/lib/dhclient/dhclient-6ada23ed-d1ad-4f37-935c-86163fe61e7b-eth0.lease
>>
>> -pf /run/dhclient-eth0.pid eth0
>>
>> Oct 03 15:12:02 localhost.localdomain network[7755]: WARN      :
>> [network]
>> 'network-scripts' will be removed in one of the next major releases of
>> RHEL.
>> Oct 03 15:12:02 localhost.localdomain network[7755]: WARN      :
>> [network]
>> It is advised to switch to 'NetworkManager' instead for network
>> management.
>> Oct 03 15:12:02 localhost.localdomain network[7755]: [46B blob data]
>> Oct 03 15:12:02 localhost.localdomain network[7755]: Bringing up
>> interface
>> eth0:
>> Oct 03 15:12:02 localhost.localdomain dhclient[7907]: DHCPREQUEST on eth0
>> to 255.255.255.255 port 67 (xid=0x75ae6376)
>> Oct 03 15:12:02 localhost.localdomain dhclient[7907]: DHCPACK from
>> 10.0.2.2
>> (xid=0x75ae6376)
>> Oct 03 15:12:04 localhost.localdomain dhclient[7907]: bound to
>> 10.0.2.15 --
>> renewal in 34365 seconds.
>> Oct 03 15:12:04 localhost.localdomain network[7755]: Determining IP
>> information for eth0... done.
>> Oct 03 15:12:04 localhost.localdomain network[7755]: [13B blob data]
>> Oct 03 15:12:05 localhost.localdomain systemd[1]: Started LSB: Bring
>> up/down networking.
>>
>> Contents of ifcfg-eth0
>> # Generated by parse-kickstart
>> TYPE="Ethernet"
>> DEVICE="eth0"
>> UUID="6ada23ed-d1ad-4f37-935c-86163fe61e7b"
>> ONBOOT="yes"
>> BOOTPROTO="dhcp"
>> IPV6INIT="yes"
>>
>>
>> Why is it not starting at boot ?
> 
> I'd take a look at what NetworkManager thinks about it:
> 
>   nmicli connection show eth0 | grep autoconnect:
> 
> If it's not set to 'yes', then you'll want to do so:
> 
>   nmcli connection modify eth0 connection.autoconnect yes
> 
> As to the 'why,' I don't know. Here's the official explanation:
> 
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_and_managing_networking/index#configuring-an-interface-with-static-network-settings-using-ifcfg-files_configuring-ip-networking-with-ifcfg-files
> 
> 

In ifcfg-eth0 you need:
NM_CONTROLED=NO

and/or to disable NetworkManager:

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

-- 
Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

StarOS, Mikrotik and CentOS/RHEL/Linux consultant