I'm writing some documentation on configuring the network interfaces for a new CentOS 7 server. The specific section walks through setting the interface to a static IP address.
The steps thus far are:
# nmcli con mod eno16777984 ipv4.address 192.168.1.31/24 # nmcli con mod eno16777984 ipv4.gateway 192.168.1.1 # nmcli con mod eno16777984 ipv4.method manual # nmcli con mod eno16777984 ipv4.dns 8.8.8.8 # nmcli con reload eno16777984 I notice though, that the above steps don't set the interfaces IP to the static IP set above (via ip addr show), when I restart the network service via systemctl, it breaks the networking config (my connection dies). I log back in via the terminal and add NM_CONTROLLED=yes to the `/etc/sysconfig/network-scripts/ifcfg-eno16777984, and restart networking again, and it works just fine.
So basically, I just want to know if it's possible to set the NM_CONTROLLED value to yes, using nmcli itself?
I know I can just echo 'NM_CONTROLLED=yes' > /etc/sysconfig/network-scripts/ifcfg-eno16777984, but I was trying to script this out via nmcli itself.
I couldn't find much on this, so it may not be possible, but I thought id at least find out for sure