I have need to use the old network-scripts and not NetworkManager. I did yum install network-scripts, I have ifcfg-eth0 set for ONBOOT=yes but it is not starting on boot. What have I missed ? Jerry
On Thu, Oct 03, 2019 at 02:42:54PM -0400, Jerry Geis wrote:> I have need to use the old network-scripts and not NetworkManager. > I did yum install network-scripts, I have ifcfg-eth0 set for ONBOOT=yes > but it is not starting on boot. > What have I missed ?systemctl status network -- Matthew Miller <mattdm at fedoraproject.org> Fedora Project Leader
>> systemctl status networkAT 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
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 -- Paul Heinlein heinlein at madboa.com 45?38' N, 122?6' W
Am 03.10.2019 um 21:14 schrieb Jerry Geis:> 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, > > JerrySet NM_CONTROLLED=no Alexander
On 10/3/19 2:42 PM, Jerry Geis wrote:> I have need to use the old network-scripts and not NetworkManager.Why? I'd like to understand more about the use case where this is a requirement. -- Jim Perrin The CentOS Project | http://www.centos.org twitter: @BitIntegrity | GPG Key: FA09AD77
On Fri, Oct 4, 2019 at 6:26 AM Jim Perrin <jperrin at centos.org> wrote:> > > On 10/3/19 2:42 PM, Jerry Geis wrote: > > I have need to use the old network-scripts and not NetworkManager. > > Why? I'd like to understand more about the use case where this is a > requirement. > > >One example we have is qemu virtual machine hosts where setting up the bridge in the ifcfg scripts is easier and avoiding NetworkManager messing things up in a non-intuitive way is critical. Also, we have 150+ machines with fixed IP addresses, always-on connections, and no wireless. Having NetworkManager do seemingly random things is not desirable. FWIW we disable NetworkManager with systemctl in our potinstall kickstart scripts and it seems to do what we want. --> Jim Perrin > The CentOS Project | http://www.centos.org > twitter: @BitIntegrity | GPG Key: FA09AD77 > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >-- *Matt Phelps* *Information Technology Specialist, Systems Administrator* (Computation Facility, Smithsonian Astrophysical Observatory) Center for Astrophysics | Harvard & Smithsonian 60 Garden Street | MS 39 | Cambridge, MA 02138 email: mphelps at cfa.harvard.edu cfa.harvard.edu | Facebook <http://cfa.harvard.edu/facebook> | Twitter <http://cfa.harvard.edu/twitter> | YouTube <http://cfa.harvard.edu/youtube> | Newsletter <http://cfa.harvard.edu/newsletter>
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