Change Netmask – How To Change Netmask From The Command Prompt

Here are some simple steps to change Netmask for an IP in Linux from command prompt.

Login into your Linux box

From command prompt open the /etc/ips file which contains the IP configuration and netmask.

vi /etc/ips

If you have many IP addresses then search for the IP address for which you wish to change the netmask.

Change the netmask, save the file and exit.

Now you want to restart the IP aliases as well, which you can do from following commands.

service ipaliases restart

Once done you can verify the change from following command

cat /etc/ips | grep 1.2.3.4

replace 1.2.3.4 with your IP Address for which you have changed the netmask.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *