[CentOS] netmask set with ifconfig doesn't hold

Thu Mar 14 15:42:39 UTC 2019
KM <info4km at yahoo.com>

 I should have mentioned that I tried nmtui but found no settings for a netmask anywhere.  like I said …. dummy.KM
    On Thursday, March 14, 2019, 11:39:09 AM EDT, Pete Biggs <pete at biggs.org.uk> wrote:  
 
 On Thu, 2019-03-14 at 15:12 +0000, KM via CentOS wrote:
> I gather that ifconfig is a way of setting the netmask in the current
> shell instead of a persistent value.  I say this because I am running
> it and see it for my specific network interface, directly after
> running it.
> However if I restart the network service the netmask is reverted to
> the previous value.
> What is the correct way to set the new netmask for the network
> interface to make it persistent.  

CentOS 6 & 7 use network manager to control the interfaces.  Probably
the easiest way to edit a connection for inexperienced users from the
command line is 'nmtui'.

You can also use 'nmcli' from the command line, but you have to craft
the command yourself and it can get quite involved if you don't know
what you are doing.

You may need to restart the network to pick up the new config after
editing it.

P.

_______________________________________________
CentOS mailing list
CentOS at centos.org
https://lists.centos.org/mailman/listinfo/centos