nmcli changes not taking

Issues related to configuring your network
Post Reply
vtwin@cox.net
Posts: 38
Joined: 2017/02/16 16:41:29

nmcli changes not taking

Post by vtwin@cox.net » 2022/12/23 20:06:25

Haven't seen this one before.

nmcli con show public | grep ipv4.gateway

ipv4.gateway: --

nmcli con mod public ipv4.gateway "192.168.1.254"

(no errors, etc., returns to shell prompt)

nmcli con show public | grep ipv4.gateway

ipv4.gateway: --

None of the changes I attempt to make to the public interface stick. The ipv4.method is currently set to manual.

Any ideas why or how to fix it?

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

Re: nmcli changes not taking

Post by jlehtone » 2022/12/24 10:42:35

Usually one does not need to look at the files, but in this case ... what is in the file now?
That would be /etc/sysconfig/network-scripts/ifcfg-public, I presume.

You did run the commands as root?

User avatar
TrevorH
Site Admin
Posts: 32524
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: nmcli changes not taking

Post by TrevorH » 2022/12/24 12:40:39

Also the ipv4.gateway needs to be within the subnet allocated to the interface or it will not be able to reach it.
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke

Post Reply