Showing results for 
Search instead for 
Did you mean: 

Changing netmask in real time

Go to solution
Respected Contributor

Changing netmask in real time

Hi ,

Will u please let me know whether changing a netmask in live setup affect my production ????
I do have a service guard in use...

Current netmask is ..
i want to change it too

Johnson Punniyalingam
Honored Contributor

Re: Changing netmask in real time

Please ...take ..note that before making this change/issuing this command - note that if you are connected using the same interface you will get momentorily disconnected. Also ensure that you have other settings/routing etc correct for say the desktop/workstation/server you are using to access this server.
It would be better to take a planned outage wherein you shutdown any services and carryout this activity, if it is point to one to many servers. (better if you could do changes via root login to CONSOLE) so that if you use any "PC/desktop connected to server will be disconnected.

Method 1:-

Permanent Changes :-

Backup ur existing netconf file

# cp -p /etc/rc.config.d/netconf /etc/rc.config.d/

Than use "vi edit"

# vi /etc/rc.config.d/netconf

SUBNET_MASK[0]="" --> change to

#/sbin/init.d/net stop
#/sbin/init.d/net start

Method 2:-
You also Use "SAM" to

SAM Networking and Communications ->
Network Interface Cards ->Select Card (i.e lanX) which lan ineterface you need to change
Actions -> Modify...
look for Subnet Mask and proceed to change -> OK

Method 3:-

If you want to make the changes effective on the fly - then you can use the ifconfig command to change the subnet mask as in

following example.

ifconfig lan0 netmask up
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: Changing netmask in real time

most import read the "docs"

if you satisfied with answers. please assign points.

Problems are common to all, but attitude makes the difference
Respected Contributor

Re: Changing netmask in real time

Thanks Johnson
IT Response
Esteemed Contributor

Re: Changing netmask in real time

Since you are running Serviceguard, you have many considerations. A complete list is documented in the "Managing Serviceguard" manual at .

They include:

You cannot delete a subnet or IP address from a node while a package that uses
it (as a monitored_subnet, ip_subnet, or ip_address) is configured to run on that node.
See the package networking parameter descriptions (page 272) for more information.

You cannot change the IP configuration of an interface (NIC) used by the cluster
in a single transaction (cmapplyconf).
You must first delete the NIC from the cluster configuration, then reconfigure the
NIC (using ifconfig (1m), for example), then add the NIC back into the cluster.
Examples of when you must do this include:
â moving a NIC from one subnet to another
â adding an IP address to a NIC
â removing an IP address from a NIC

I believe that support for some of these changes on a running cluster was added only recently, so check the manual that applies to your version of SG.

Steven E. Protter
Exalted Contributor

Re: Changing netmask in real time


If this is a floating IP address for serviceguard, you would reconfigure it by changing the package configuration.

Then cmcheckconf/cmapplyconf.

This can be done hot, thought if you make a mistake you will crash the package. Better to schedule a downtime or at least warn the users.

If this is one of the node addresses, then you can do it on the fly with ifconfig and change /etc/rc.config.d/netconf at your leisure. Don't keep a backup copy of netconf in /rec/rc.config.d, if you do both will be processed and you will have no networking.

If you make a mistake with ifconfig then you might knock one of your nodes out of the cluster, cause a TOC, or crash packages. User notification/warning is recommended.

Steven E Protter
Owner of ISN Corporation