Operating System - HP-UX
1753259 Members
5262 Online
108792 Solutions
New Discussion юеВ

Re: Is possible to change mask from one ip without stop?

 
SOLVED
Go to solution
Carme Torca
Super Advisor

Is possible to change mask from one ip without stop?

Hi,

I have to change de mask of one ips, now its 255.255.255.192 and it must be 255.255.255.128.... Is it possible to change the mask without stop? Which are the tasks to do?

Thanks a lot of!
Carmen.
Users are not too bad ;-)
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: Is possible to change mask from one ip without stop?

Hi Carmen,

I believe it's going to have to temporarily stop because, in order to change the netmask, you will have to delete the route, then re-add it. Have a look at the man page for route.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: Is possible to change mask from one ip without stop?

Shalom,

You need a quick stop/start to make this work.

Either
ifconfig eth0 down
ifconfig eth0 ipaddress netmask 255.255.255.128.

Or change it in /etc/sysconfig/netowrk-scripts/ifcfg-eth0

and

service network restart

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: Is possible to change mask from one ip without stop?

Sorry Carmen - make that ifconfig, not route.


Pete

Pete
Carme Torca
Super Advisor

Re: Is possible to change mask from one ip without stop?

And how can I do this in hp-ux?
Thanks!
Carmen.
Users are not too bad ;-)
Pete Randall
Outstanding Contributor
Solution

Re: Is possible to change mask from one ip without stop?

Well, if you weren't comfortable with the ifconfig command, you could always use SAM > Networking and Communications > Network Interface Cards, then select the interface and, under Actions, click on modify.


Pete

Pete
Marvin Strong
Honored Contributor

Re: Is possible to change mask from one ip without stop?

You can change it the same way as shown above with ifconfig

Also be sure to update your /etc/rc.config.d/netconf file.

ifconfig lan0 down
ifconfig lan0 netmask xxx.xxx.xxx.xxx

man ifconfig for more details.