[CentOS] CentOS 8 network-scripts

Tristan Hoar

tristan.hoar at bgfl.org
Fri Oct 4 16:00:41 UTC 2019


On Thu, 2019-10-03 at 15:14 -0400, 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 ?
> Thanks,
> 
> Jerry
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
> 
> 
> 

Don't run systemctl disable NetworkManager. You need to mask the
service to ensure interdependent services are not starting it up for
you behind you back. i.e. systemctl mask NetworkManager
Also, when you start it ensure it is set to start on boot. e.g.
systemctl enable --now network

Finally, heed the advice in the log. this is going away. I've had very
few issues with NetworkManager since ~7.4 onward and would suggest
giving it a go. I find it much easier to work with in scripts.

Tris




More information about the CentOS mailing list