Operating System - HP-UX
1825003 Members
3477 Online
109678 Solutions
New Discussion юеВ

Re: Change of subnet mask for HP9000 system

 
chansp
New Member

Change of subnet mask for HP9000 system

The rest of the network parameters remain the same except the subnet mask. I would like to know the best way(s) to change the subnet mask of HP9000. Do I need to reboot the system after the changed? Thanks.
14 REPLIES 14
Patrick Wallek
Honored Contributor

Re: Change of subnet mask for HP9000 system

You could change it immediately via the ifconfig command. See the ifconfig man page for details.

To change it permanently, so it takes effect next time you reboot the machine, you need to edit the /etc/rc.config.d/netconf file.
Con O'Kelly
Honored Contributor

Re: Change of subnet mask for HP9000 system

Hi

From the console do the following:

1. Edit the following file:
/etc/rc.config.d/netconf
(Update the SUBNET_MASK parameter to the new subnet)

2. Then re-start networking:
# /sbin/init.d/net stop
# /sbin/init.d/net start

Cheers
Con
Steven E. Protter
Exalted Contributor

Re: Change of subnet mask for HP9000 system

Alternatively, you can use set_parms and do it interactively.

Make sure the network and subnet mask settings are compatible, or your machine could drop right off the network and stay there.

A make_tape_recovery backup is also a good precaution. You never know when a little mistake will cascade into an all nighter.

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
Rajeev  Shukla
Honored Contributor

Re: Change of subnet mask for HP9000 system

Hi,
Yes you can change the subnetmask without rebooting the machine use
#ifconfig netmask up

But this change remains only till the machine is up to make the effect permanent edit the file /etc/rc.config.d/netconf and assign the subnet mask there too.
Norman_21
Honored Contributor

Re: Change of subnet mask for HP9000 system

Hello,

I would make a copy of the netconf before I do any changes:

#cp /etc/rc.config.d/netconf /tmp/netconf.old
# vi /etc/rc.config.d/netconf
scroll down to :
IP_ADDRESS[1]=192.168.1.1
SUBNET_MASK[1]=255.255.255.0
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=192.168.1.255

It depends on how many NICs you have in your system. above example is for NIC number 1, then changet he SUBNET_MASK.

Good luck!

"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
KCS_1
Respected Contributor

Re: Change of subnet mask for HP9000 system

Hi,

All of them are the best answers.

Alternatively, on the command prompt

# set_parms addl_netwrk

you may see the interactive prompt Q&A .




Best Regards.

Patrick
Easy going at all.
chansp
New Member

Re: Change of subnet mask for HP9000 system

Thanks for those prompt replies. Those input matched with my plan.

Some background:
The server is at the remote relocation. And the analyst on site has very minimum knowledge on HPUX. So I cannot affort any downtime of the system.

Assume I changed the subnet mask via editing the file /etc/rc.config.d/netconf

What is the best way to make the change becomes effective? Thru reboot or net stop/start? I would like to minimize the down time of the system especially I am editing the subnet parameter from remote location.


Of course, I will perform make_recovery and file backup of /etc/rc.config.d/netconf prior the change.
Rajeev  Shukla
Honored Contributor

Re: Change of subnet mask for HP9000 system

As i explained above to make the changes with 0 downtime,
use ifconfig command as explained above
and parallely make /etc/rc.config.d/netconf file ready by editing for next reboot.
This way you can do it without rebooting the server or stoping any services.
Because if you stop /sbin/init.d/net you'll disconnect all users including you if you telnet
John Waller
Esteemed Contributor

Re: Change of subnet mask for HP9000 system

Under HP-UX 11.00 I have had problems using set_parms initial where most changes were lost so I now always manually edit the /etc/rc.config.d/netconf file. Just a littl;e warning, do not forget to modify your BROADCAST_ADDRESS if it has been set, as a change in subnet mask will change the broadcast. On our systems this field is just "" and it appears to work correctly but if a value has been added you will need to change it.

Elmar P. Kolkman
Honored Contributor

Re: Change of subnet mask for HP9000 system

Best way: do a /sbin/init.d/net start.

If you miss a double-quote the system won't come up at a reboot because all files in /etc/rc.config.d are parsed by the shell for each startup script, even though they contain parameters for other scripts.

But if you run the start script, it will only complain and not change anything, so you can correct it.

Also make sure your gateways are within the (new) subnet!
Every problem has at least one solution. Only some solutions are harder to find.
chansp
New Member

Re: Change of subnet mask for HP9000 system

Thanks for many prompt inputs from you guys.

Are there any area or files (beside netconf file.) I should pay more attention if the HP9000 system is on MC Service Guard environment?
Rajeev  Shukla
Honored Contributor

Re: Change of subnet mask for HP9000 system

Hi,
Ya thats the only file you have to concentrate, if you have MC/SG then you'll have to modify you'r package config files also if you have mentioned subnet there otherwise /etc/rc.config.d/netconf file is only you have to concentrate.

Also can you assign points looking at everyones replies, which you think benefited you.

Brian Markus
Valued Contributor

Re: Change of subnet mask for HP9000 system

For MC/Serviceguard, there is network information in the /etc/cmcluster/cmclconf.ascii file however, I don't think it has subnet information.

Hope this helps

-Brian.
When a sys-admin say's maybe, they don't mean 'yes'!
chansp
New Member

Re: Change of subnet mask for HP9000 system

Rajeev

Our plan is to change subnet mask in netconf from 255.255.255.0 to 255.255.254.00. The SUBNET in package.cfg and package.cntl are remain the same (please see below. those subnet in package files is the actual IP subnet.)

No change on package files (except netconf file, do we still need to re-apply the package via cmapplyconf command? DO advise.


package.cfg
SUBNET 158.25.0.0

package.cntl
IP[0]="158.25.112.5"
SUBNET[0]="158.25.0.0"