centos8.3 - static ip with ifcfg and nm_controlled=no
centos8.3 - static ip with ifcfg and nm_controlled=no
hello all
this is a question regarding minimal install from CentOS-8.3.2011-x86_64-dvd1.iso.
i am trying to set a static ip by modifying the ifcfg but i am failing.
When i do not use nm_controlled=no, the static ip is assigned fine but when i use nm_controlled=no i am missing something.
The interface remains down and still when i use ip link set dev ens33 up and the int goes up the IP is not assigned.
Can you please give me some clue what else do i need to modify to make it work? I mean what else does the networkmanager modifies when i do not use NM_CONTROLLED=no
[root@localhost network-scripts]# cat ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=2752ae2b-5579-475e-8aa2-c1793b387a0b
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.65.10
PREFIX=24
GATEWAY=192.168.65.2
DNS1=192.168.65.2
NM_CONTROLLED=no
this is a question regarding minimal install from CentOS-8.3.2011-x86_64-dvd1.iso.
i am trying to set a static ip by modifying the ifcfg but i am failing.
When i do not use nm_controlled=no, the static ip is assigned fine but when i use nm_controlled=no i am missing something.
The interface remains down and still when i use ip link set dev ens33 up and the int goes up the IP is not assigned.
Can you please give me some clue what else do i need to modify to make it work? I mean what else does the networkmanager modifies when i do not use NM_CONTROLLED=no
[root@localhost network-scripts]# cat ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=2752ae2b-5579-475e-8aa2-c1793b387a0b
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.65.10
PREFIX=24
GATEWAY=192.168.65.2
DNS1=192.168.65.2
NM_CONTROLLED=no
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
I think NetworkManager is enabled by default, you could try to disable it:
https://www.thegeekdiary.com/how-to-dis ... os-rhel-8/
https://www.thegeekdiary.com/how-to-dis ... os-rhel-8/
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
Minimal install installs packages that are in Minimal Install yum environment group. That group includes yum group Core:
Code: Select all
# dnf group info minimal-environment
Last metadata expiration check: 1:56:18 ago on Mon 31 May 2021 08:40:27 PM EEST.
Environment Group: Minimal Install
Description: Basic functionality.
Mandatory Groups:
Core
Optional Groups:
Guest Agents
Standard
Code: Select all
Group: Core
Description: Smallest possible installation
Mandatory Packages:
NetworkManager
...
You could as well set the static IP with NetworkManager
(although I prefer to configure DHCP server to hand out persistent addresses).
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
there was no specific reason. i was trying to follow some guides and learnGiven that NetworkManager is installed (and enabled) by default, why do you try to bypass it?
in order to apply those changes to ifcfg i do reboot all the time as the systemctl restart network is not working.
so with networkmanager not controlling the config(nm_controlled=no) how can i put in effect the static configuration? i thought it's something easy to do, if not it's ok i can do it with networkmanager as you said.
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
There are many "guides". Alas, some are outdated and thus no longer apply.
Even worse, some were never correct; they contain errors or are based on bad assumptions.
Trouble is, even trained eye can fail to spot misinformation.
The network.service has to be explicitly installed:
https://www.golinuxcloud.com/unit-netwo ... l-8-linux/
What do you get with these:
NetworkManager in RHEL 6 was pathetic. No match for initscripts.
By RHEL 7.3 NM's feature coverage got decent.
NM in RHEL 8 is still missing support for some special features, but frankly I don't know how network.service could do those either.
Even worse, some were never correct; they contain errors or are based on bad assumptions.
Trouble is, even trained eye can fail to spot misinformation.
The network.service has to be explicitly installed:
https://www.golinuxcloud.com/unit-netwo ... l-8-linux/
What do you get with these:
Code: Select all
readlink -f $(which ifup)
systemctl status network
By RHEL 7.3 NM's feature coverage got decent.
NM in RHEL 8 is still missing support for some special features, but frankly I don't know how network.service could do those either.
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
thank you for helping me jlehtone.
i got busy with work recently so now i found again time to check what you wrote me
[root@localhost ~]# readlink -f $(which ifup)
/usr/libexec/nm-ifup
[root@localhost ~]# systemctl status network
Unit network.service could not be found.
i got busy with work recently so now i found again time to check what you wrote me
[root@localhost ~]# readlink -f $(which ifup)
/usr/libexec/nm-ifup
[root@localhost ~]# systemctl status network
Unit network.service could not be found.
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
Ok, you have only NetworkManager.service.
You do not have network.service installed.
Your ifup is not the old ifup of initscripts, but a wrapper to NetworkManager.
With NM_CONTROLLED=no you say to NetworkManager: "Do not touch this!"
However, NetworkManager is the only network configuration tool that you have.
You have two choices:
You do not have network.service installed.
Your ifup is not the old ifup of initscripts, but a wrapper to NetworkManager.
With NM_CONTROLLED=no you say to NetworkManager: "Do not touch this!"
However, NetworkManager is the only network configuration tool that you have.
You have two choices:
- Use NetworkManager. Clean out the bogus configs.
- Install the deprecated network.service. See link in tunk's post.
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
so to manage networking basically you have the Network Manager, the deprecated network service ( Is it the network scripts that i am reading about on guides?) or the manual editing of ifcfg file?
yeah i got this from reading the guides pretty clearly.With NM_CONTROLLED=no you say to NetworkManager: "Do not touch this!"
that is what i was missing as i thought that those scripts are somewhere around so if i put nm_controlled=no somehow i could make it workHowever, NetworkManager is the only network configuration tool that you have.
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
Manual edit of a file is useless, if nothing uses that file.
Configuration is stored in files. During boot a service starts, reads the files, and activates connections.
Option 1:
Have NetworkManager installed and NetworkManager.service enabled. This is the default. Use nmcli, nmtui, or GUI applet to configure connections.
Option 2:
Have network-scripts installed and network.service enabled. Manually edit ifcfg-files.
Re: centos8.3 - static ip with ifcfg and nm_controlled=no
ok i see what you mean now.Manual edit of a file is useless, if nothing uses that file.
i checked again the tunk's link and i see that it replies my question about network scripts and network service as you also explained as well.
I think i will stick then with network manager as i saw the nmcli, nmtui and gui that you explained to me