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. if it's different for CentOS 6 and 7 I'd like to know that too. FYI - I tried searching about this but none of the info has really helped so far. Also consider this like "changing netmask for dummies" since I am not an administrator and am just searching and trying these things. Thanks very much in advance.KM
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.
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@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@centos.org https://lists.centos.org/mailman/listinfo/centos
On Thu, 2019-03-14 at 15:42 +0000, KM via CentOS wrote:
I should have mentioned that I tried nmtui but found no settings for a netmask anywhere. like I said …. dummy.
It's part of the IP address - so you put something like
192.168.0.1/24
for a 255.255.255.0 subnet. It's called a CIDR address.
P.
BTW - that seemed to work, thanks. putting /18 changed the netmask as i wanted. I see that the PREFIX value in the corresponding ifcfg-<int> file changes accordingly also. thanks againK On Thursday, March 14, 2019, 11:58:57 AM EDT, Pete Biggs pete@biggs.org.uk wrote:
On Thu, 2019-03-14 at 15:42 +0000, KM via CentOS wrote:
I should have mentioned that I tried nmtui but found no settings for a netmask anywhere. like I said …. dummy.
It's part of the IP address - so you put something like
192.168.0.1/24
for a 255.255.255.0 subnet. It's called a CIDR address.
P.
_______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos